diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-01-19 15:25:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-01-20 17:05:57 +0300 |
commit | 48071e171de41a23197c7328ba038331a936e0eb (patch) | |
tree | 73c7ef1da8e5dd76469d75c0336d88c3371e4263 /src/touchmanager.cpp | |
parent | d07fba228b5251862ad670e1d4f079c9456fab4b (diff) | |
download | ManaVerse-48071e171de41a23197c7328ba038331a936e0eb.tar.gz ManaVerse-48071e171de41a23197c7328ba038331a936e0eb.tar.bz2 ManaVerse-48071e171de41a23197c7328ba038331a936e0eb.tar.xz ManaVerse-48071e171de41a23197c7328ba038331a936e0eb.zip |
Replace for to FOR_EACH in some classes.
Diffstat (limited to 'src/touchmanager.cpp')
-rw-r--r-- | src/touchmanager.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/touchmanager.cpp b/src/touchmanager.cpp index c8d813998..18bcd4a0d 100644 --- a/src/touchmanager.cpp +++ b/src/touchmanager.cpp @@ -158,11 +158,8 @@ void TouchManager::clear() Theme *theme = Theme::instance(); if (!theme) return; - for (TouchItemVectorCIter it = mObjects.begin(), it_end = mObjects.end(); - it != it_end; ++ it) - { + FOR_EACH (TouchItemVectorCIter, it, mObjects) unload(*it); - } mObjects.clear(); mRedraw = true; } @@ -175,9 +172,7 @@ void TouchManager::draw() { mRedraw = false; mVertexes->clear(); - for (TouchItemVectorCIter it = mObjects.begin(), - it_end = mObjects.end(); - it != it_end; ++ it) + FOR_EACH (TouchItemVectorCIter, it, mObjects) { const TouchItem *const item = *it; if (item && item->images && (mShow || @@ -199,9 +194,7 @@ void TouchManager::draw() } else { - for (TouchItemVectorCIter it = mObjects.begin(), - it_end = mObjects.end(); - it != it_end; ++ it) + FOR_EACH (TouchItemVectorCIter, it, mObjects) { const TouchItem *const item = *it; if (item && item->images && (mShow || @@ -226,8 +219,7 @@ bool TouchManager::processEvent(const MouseInput &mouseInput) const int x = mouseInput.getTouchX(); const int y = mouseInput.getTouchY(); - for (TouchItemVectorCIter it = mObjects.begin(), it_end = mObjects.end(); - it != it_end; ++ it) + FOR_EACH (TouchItemVectorCIter, it, mObjects) { const TouchItem *const item = *it; if (!item || (!mShow && (item != mKeyboard || !mShowKeyboard))) @@ -278,8 +270,7 @@ bool TouchManager::isActionActive(const int index) const void TouchManager::resize(int width, int height) { mRedraw = true; - for (TouchItemVectorCIter it = mObjects.begin(), - it_end = mObjects.end(); it != it_end; ++ it) + FOR_EACH (TouchItemVectorCIter, it, mObjects) { TouchItem *const item = *it; if (!item) @@ -338,8 +329,7 @@ void TouchManager::unloadTouchItem(TouchItem **unloadItem) Theme *theme = Theme::instance(); if (!theme) return; - for (TouchItemVectorIter it = mObjects.begin(), it_end = mObjects.end(); - it != it_end; ++ it) + FOR_EACH (TouchItemVectorIter, it, mObjects) { TouchItem *item = *it; if (item && *unloadItem == item) |