glibmm r807 - in branches/glibmm-2-18: . tools/m4



Author: daniel
Date: Thu Mar 26 12:23:52 2009
New Revision: 807
URL: http://svn.gnome.org/viewvc/glibmm?rev=807&view=rev

Log:
Fix generated code to not trigger a warning

* tools/m4/list.m4 (GP_LIST_FIND): Rewrite the two find() loops
to avoid a GCC warning about a lone semicolon as a loop body.


Modified:
   branches/glibmm-2-18/   (props changed)
   branches/glibmm-2-18/ChangeLog
   branches/glibmm-2-18/tools/m4/list.m4

Modified: branches/glibmm-2-18/tools/m4/list.m4
==============================================================================
--- branches/glibmm-2-18/tools/m4/list.m4	(original)
+++ branches/glibmm-2-18/tools/m4/list.m4	Thu Mar 26 12:23:52 2009
@@ -166,14 +166,16 @@
 __LISTNAME__::iterator __LISTNAME__::find(const_reference w)
 {
   iterator i = begin();
-  for(i = begin(); i != end() && (i->ifelse($1,,,$1()->)gobj() != w.ifelse($1,,,$1()->)gobj()); i++);
+  while (i != end() && (i->ifelse($1,,,$1()->)gobj() != w.ifelse($1,,,$1()->)gobj()))
+    ++i;
   return i;
 }
 
 __LISTNAME__::iterator __LISTNAME__::find(Widget& w)
 {
-  iterator i;
-  for(i = begin(); i != end() && ((GtkWidget*)i->ifelse($1,,,$1()->)gobj() != w.gobj()); i++);
+  iterator i = begin();
+  while (i != end() && ((GtkWidget*)i->ifelse($1,,,$1()->)gobj() != w.gobj()))
+    ++i;
   return i;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]