refactor: finish foreach
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Wed, 1 Aug 2012 23:48:55 +0000 (16:48 -0700)
committerU. Artie Eoff <ullysses.a.eoff@intel.com>
Wed, 1 Aug 2012 23:48:55 +0000 (16:48 -0700)
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
src/efl/templates.h
src/efl/test_icon.cpp
src/efl/test_window.cpp

index 2acdd98..4557a31 100644 (file)
@@ -83,9 +83,9 @@ public:
                window_.show();
                object_.show();
 
-               foreach (const int& x, xs_)
+               foreach (const int x, xs_)
                {
-                       foreach (const int& y, ys_)
+                       foreach (const int y, ys_)
                        {
                                queueCallback(
                                        ModifyCheckCallback(
index 9c403db..1e2d4ce 100644 (file)
@@ -65,8 +65,6 @@ public:
                control_.setPosition(50, 10);
 
                elm_icon_standard_set(control_, "home");
-
-               return;
        }
 
        void setup()
@@ -74,13 +72,12 @@ public:
                window_.show();
                control_.show();
 
-               vector<string>::iterator it;
-               for (it = icons_.begin(); it != icons_.end(); it++)
+               foreach (const std::string& name, icons_)
                {
                        queueCallback(
                                ModifyCheckCallback(
-                                       boost::bind(&IconStandardTest::setStandard, boost::ref(*this), *it),
-                                       boost::bind(&IconStandardTest::checkStandard, boost::ref(*this), *it)
+                                       boost::bind(&IconStandardTest::setStandard, boost::ref(*this), boost::cref(name)),
+                                       boost::bind(&IconStandardTest::checkStandard, boost::ref(*this), boost::cref(name))
                                )
                        );
                }
index 421b957..fce162e 100644 (file)
@@ -267,13 +267,12 @@ public:
        {
                window_.show();
 
-               vector<int>::iterator it;
-               for (it = degrees_.begin(); it != degrees_.end(); it++)
+               foreach (const int degree, degrees_)
                {
                        queueCallback(
                                ModifyCheckCallback(
-                                       boost::bind(&Window::rotate, boost::ref(window_), *it),
-                                       boost::bind(&Window::checkRotation, boost::ref(window_), *it)
+                                       boost::bind(&Window::rotate, boost::ref(window_), degree),
+                                       boost::bind(&Window::checkRotation, boost::ref(window_), degree)
                                )
                        );
                }