From: pabs Date: Tue, 18 Dec 2007 03:22:23 +0000 (+0000) Subject: Fix g++ warning: variables created in a for loop should not be used outside of it. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=bc1d6a30ce80636edbaabf4d5e9845268c14ca68;p=synfig.git Fix g++ warning: variables created in a for loop should not be used outside of it. git-svn-id: http://svn.voria.com/code@1211 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/time.cpp b/synfig-core/trunk/src/synfig/time.cpp index b751e8e..6755b80 100644 --- a/synfig-core/trunk/src/synfig/time.cpp +++ b/synfig-core/trunk/src/synfig/time.cpp @@ -251,7 +251,8 @@ Time::get_string(float fps, Time::Format format)const // skip trailing zeros int count = 0; - for (String::reverse_iterator i = seconds.rbegin(); (*i) == '0'; i++) + String::reverse_iterator i = seconds.rbegin(); + for ( ; (*i) == '0'; i++) count++; // if we removed too many, go back one place, leaving one zero