refactor: introducing correct, optimized iterator loop
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Wed, 1 Aug 2012 22:33:55 +0000 (15:33 -0700)
committerU. Artie Eoff <ullysses.a.eoff@intel.com>
Wed, 1 Aug 2012 22:33:55 +0000 (15:33 -0700)
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
src/efl/test_fileselector_button.cpp

index 1d0037e..d93bf89 100644 (file)
@@ -44,8 +44,9 @@ public:
                window_.show();
                control_.show();
 
-               vector<Eina_Bool>::iterator it;
-               for (it = states_.begin(); it != states_.end(); it++)
+               typedef vector<Eina_Bool>::const_iterator CIterator;
+               const CIterator endIt(states_.end());
+               for (CIterator it(states_.begin()); it != endIt; ++it)
                {
                        queueCallback(
                                ModifyCheckCallback(