[glibmm] ConstructParams: Do not increment allocation size twice
- From: Daniel Elstner <daniel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] ConstructParams: Do not increment allocation size twice
- Date: Tue, 9 May 2017 22:33:29 +0000 (UTC)
commit a84268368307e97d50c8c1ce33dd1d58cf2866d3
Author: Daniel Elstner <daniel kitta gmail com>
Date: Tue May 9 20:10:39 2017 +0200
ConstructParams: Do not increment allocation size twice
glib/glibmm/object.cc | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/glib/glibmm/object.cc b/glib/glibmm/object.cc
index 58166b7..ce14269 100644
--- a/glib/glibmm/object.cc
+++ b/glib/glibmm/object.cc
@@ -71,8 +71,9 @@ ConstructParams::ConstructParams(
}
if (n_parameters >= n_alloced_params) {
- parameter_names = g_renew(const char*, parameter_names, n_alloced_params += 8);
- parameter_values = g_renew(GValue, parameter_values, n_alloced_params += 8);
+ n_alloced_params += 8;
+ parameter_names = g_renew(const char*, parameter_names, n_alloced_params);
+ parameter_values = g_renew(GValue, parameter_values, n_alloced_params);
}
auto& param_name = parameter_names[n_parameters];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]