summaryrefslogtreecommitdiff
path: root/src/textmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-01-19 15:25:24 +0300
committerAndrei Karas <akaras@inbox.ru>2013-01-20 17:05:57 +0300
commit48071e171de41a23197c7328ba038331a936e0eb (patch)
tree73c7ef1da8e5dd76469d75c0336d88c3371e4263 /src/textmanager.cpp
parentd07fba228b5251862ad670e1d4f079c9456fab4b (diff)
downloadplus-48071e171de41a23197c7328ba038331a936e0eb.tar.gz
plus-48071e171de41a23197c7328ba038331a936e0eb.tar.bz2
plus-48071e171de41a23197c7328ba038331a936e0eb.tar.xz
plus-48071e171de41a23197c7328ba038331a936e0eb.zip
Replace for to FOR_EACH in some classes.
Diffstat (limited to 'src/textmanager.cpp')
-rw-r--r--src/textmanager.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/textmanager.cpp b/src/textmanager.cpp
index 702b024f1..96f5612bb 100644
--- a/src/textmanager.cpp
+++ b/src/textmanager.cpp
@@ -48,8 +48,7 @@ void TextManager::moveText(Text *const text, const int x, const int y)
void TextManager::removeText(const Text *const text)
{
- for (TextList::iterator ptr = mTextList.begin(),
- pEnd = mTextList.end(); ptr != pEnd; ++ptr)
+ FOR_EACH (TextList::iterator, ptr, mTextList)
{
if (*ptr == text)
{
@@ -67,12 +66,8 @@ void TextManager::draw(Graphics *const graphics,
const int xOff, const int yOff)
{
BLOCK_START("TextManager::draw")
- for (TextList::const_iterator bPtr = mTextList.begin(),
- ePtr = mTextList.end();
- bPtr != ePtr; ++ bPtr)
- {
+ FOR_EACH (TextList::const_iterator, bPtr, mTextList)
(*bPtr)->draw(graphics, xOff, yOff);
- }
BLOCK_END("TextManager::draw")
}
@@ -110,10 +105,8 @@ void TextManager::place(const Text *const textObj, const Text *const omit,
}
}
bool ok = true;
- for (int i = wantedTop; i < wantedTop + h; ++i)
- {
+ for (int i = wantedTop; i < wantedTop + h; ++ i)
ok = ok && !occupied[i];
- }
if (ok)
return;