glibmm r806 - in trunk: . tools/m4



Author: daniel
Date: Thu Mar 26 10:47:51 2009
New Revision: 806
URL: http://svn.gnome.org/viewvc/glibmm?rev=806&view=rev

Log:
Fix generated code to not trigger warnings

* 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:
   trunk/ChangeLog
   trunk/tools/m4/list.m4

Modified: trunk/tools/m4/list.m4
==============================================================================
--- trunk/tools/m4/list.m4	(original)
+++ trunk/tools/m4/list.m4	Thu Mar 26 10:47:51 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]