[glibmm] Revert "Class: A use of range-based for."
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Revert "Class: A use of range-based for."
- Date: Thu, 23 Feb 2017 12:20:26 +0000 (UTC)
commit 021029df6c9946c3b8639bd1c8960fe98b54c50d
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Feb 23 12:48:50 2017 +0100
Revert "Class: A use of range-based for."
Because the original code starts at 1, not 0, so this was not
equivalent.
This reverts commit b0a3e10d17f21254c15781bb7ff57736a9bea569.
glib/glibmm/class.cc | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glib/glibmm/class.cc b/glib/glibmm/class.cc
index 7875c25..29ab8cf 100644
--- a/glib/glibmm/class.cc
+++ b/glib/glibmm/class.cc
@@ -202,11 +202,11 @@ Class::custom_class_init_function(void* g_class, void* class_data)
gobject_class->set_property = &Glib::custom_set_property_callback;
// Call extra class init functions, if any.
- for (auto func : class_init_funcs)
+ for (std::size_t i = 1; i < class_init_funcs.size(); ++i)
{
- if (auto extra_init_func = std::get<GClassInitFunc>(func))
+ if (auto extra_init_func = std::get<GClassInitFunc>(class_init_funcs[i]))
{
- auto extra_class_data = std::get<void*>(func);
+ auto extra_class_data = std::get<void*>(class_init_funcs[i]);
(*extra_init_func)(g_class, extra_class_data);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]