diff options
author | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2013-07-10 08:37:53 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2013-07-10 08:37:53 +0200 |
commit | a38f51a9c3833ce581610e368eee1dc360d4de55 (patch) | |
tree | 43a86894b637fcfaa700c27fc49ee176b6dfc870 /glib/src/optiongroup.ccg | |
parent | 6346c25f5835a48df6e75d5cac286cc883f17020 (diff) | |
download | glibmm-a38f51a9c3833ce581610e368eee1dc360d4de55.tar.gz |
Use std::memset() instead of GLIBMM_INITIALIZE_STRUCT.
* glib/glibmm/utility.h: Add a comment that GLIBMM_INITIALIZE_STRUCT is
deprecated. It generates compiler warnings when __STRICT_ANSI__ is defined.
* glib/glibmm/value.cc:
* glib/src/optiongroup.ccg:
* tools/m4/class_boxedtype_static.m4: Replace GLIBMM_INITIALIZE_STRUCT
by std::memset().
Diffstat (limited to 'glib/src/optiongroup.ccg')
-rw-r--r-- | glib/src/optiongroup.ccg | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/glib/src/optiongroup.ccg b/glib/src/optiongroup.ccg index baa1331c..d2f81ffb 100644 --- a/glib/src/optiongroup.ccg +++ b/glib/src/optiongroup.ccg @@ -21,6 +21,7 @@ #include <glibmm/exceptionhandler.h> //#include <glibmm/containers.h> #include <glib.h> // g_malloc +#include <cstring> // std::memset() namespace Glib { @@ -308,7 +309,7 @@ void OptionGroup::add_entry(const OptionEntry& entry) //Create a temporary array, just so we can give the correct thing to g_option_group_add_entries: GOptionEntry array[2]; array[0] = *(entry.gobj()); //Copy contents. - GLIBMM_INITIALIZE_STRUCT(array[1], GOptionEntry); + std::memset(&array[1], 0, sizeof(GOptionEntry)); g_option_group_add_entries(gobj(), array); } |