From: U. Artie Eoff Date: Wed, 1 Aug 2012 22:12:26 +0000 (-0700) Subject: refactor: more foreach conversion X-Git-Tag: upstream/0.2.1~256 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=79edf5c38f326472a2b7ccc9ea260f9b23ff4a62;p=test%2Fgeneric%2Fwayland-fits.git refactor: more foreach conversion Signed-off-by: U. Artie Eoff --- diff --git a/src/efl/test_fileselector.cpp b/src/efl/test_fileselector.cpp index bd11beb..c3b5b88 100644 --- a/src/efl/test_fileselector.cpp +++ b/src/efl/test_fileselector.cpp @@ -38,8 +38,6 @@ public: states_.push_back(EINA_TRUE); states_.push_back(EINA_FALSE); states_.push_back(EINA_TRUE); - - return; } void setup() @@ -47,13 +45,12 @@ public: window_.show(); control_.show(); - vector::iterator it; - for (it = states_.begin(); it != states_.end(); it++) + foreach (Eina_Bool state, states_) { queueCallback( ModifyCheckCallback( - boost::bind(elm_fileselector_expandable_set, boost::ref(control_), *it), - boost::bind(&FileselectorExpandableTest::checkExpandable, boost::ref(*this), *it) + boost::bind(elm_fileselector_expandable_set, boost::ref(control_), state), + boost::bind(&FileselectorExpandableTest::checkExpandable, boost::ref(*this), state) ) ); } @@ -65,8 +62,8 @@ public: } private: - Window window_; - EvasObject control_; + Window window_; + EvasObject control_; vector states_; }; @@ -85,8 +82,6 @@ public: states_.push_back(EINA_TRUE); states_.push_back(EINA_FALSE); states_.push_back(EINA_TRUE); - - return; } void setup() @@ -94,13 +89,12 @@ public: window_.show(); control_.show(); - vector::iterator it; - for (it = states_.begin(); it != states_.end(); it++) + foreach (Eina_Bool state, states_) { queueCallback( ModifyCheckCallback( - boost::bind(elm_fileselector_folder_only_set, boost::ref(control_), *it), - boost::bind(&FileselectorFolderOnlyTest::checkFolderOnly, boost::ref(*this), *it) + boost::bind(elm_fileselector_folder_only_set, boost::ref(control_), state), + boost::bind(&FileselectorFolderOnlyTest::checkFolderOnly, boost::ref(*this), state) ) ); } @@ -112,8 +106,8 @@ public: } private: - Window window_; - EvasObject control_; + Window window_; + EvasObject control_; vector states_; }; @@ -132,8 +126,6 @@ public: states_.push_back(EINA_TRUE); states_.push_back(EINA_FALSE); states_.push_back(EINA_TRUE); - - return; } void setup() @@ -141,13 +133,12 @@ public: window_.show(); control_.show(); - vector::iterator it; - for (it = states_.begin(); it != states_.end(); it++) + foreach (Eina_Bool state, states_) { queueCallback( ModifyCheckCallback( - boost::bind(elm_fileselector_is_save_set, boost::ref(control_), *it), - boost::bind(&FileselectorIsSaveTest::checkIsSave, boost::ref(*this), *it) + boost::bind(elm_fileselector_is_save_set, boost::ref(control_), state), + boost::bind(&FileselectorIsSaveTest::checkIsSave, boost::ref(*this), state) ) ); } @@ -159,8 +150,8 @@ public: } private: - Window window_; - EvasObject control_; + Window window_; + EvasObject control_; vector states_; }; @@ -177,8 +168,6 @@ public: states_.push_back(ELM_FILESELECTOR_GRID); states_.push_back(ELM_FILESELECTOR_LIST); states_.push_back(ELM_FILESELECTOR_GRID); - - return; } void setup() @@ -189,13 +178,12 @@ public: window_.show(); control_.show(); - vector::iterator it; - for (it = states_.begin(); it != states_.end(); it++) + foreach (Elm_Fileselector_Mode state, states_) { queueCallback( ModifyCheckCallback( - boost::bind(elm_fileselector_mode_set, boost::ref(control_), *it), - boost::bind(&FileselectorModeTest::checkMode, boost::ref(*this), *it) + boost::bind(elm_fileselector_mode_set, boost::ref(control_), state), + boost::bind(&FileselectorModeTest::checkMode, boost::ref(*this), state) ) ); } @@ -207,8 +195,8 @@ public: } private: - Window window_; - EvasObject control_; + Window window_; + EvasObject control_; vector states_; }; @@ -224,8 +212,6 @@ public: states_.push_back(EINA_TRUE); states_.push_back(EINA_FALSE); states_.push_back(EINA_TRUE); - - return; } void setup() @@ -236,13 +222,12 @@ public: window_.show(); control_.show(); - vector::iterator it; - for (it = states_.begin(); it != states_.end(); it++) + foreach (Eina_Bool state, states_) { queueCallback( ModifyCheckCallback( - boost::bind(elm_fileselector_buttons_ok_cancel_set, boost::ref(control_), *it), - boost::bind(&FileselectorOkCancelTest::checkOkCancel, boost::ref(*this), *it) + boost::bind(elm_fileselector_buttons_ok_cancel_set, boost::ref(control_), state), + boost::bind(&FileselectorOkCancelTest::checkOkCancel, boost::ref(*this), state) ) ); } @@ -254,8 +239,8 @@ public: } private: - Window window_; - EvasObject control_; + Window window_; + EvasObject control_; vector states_; };