diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-01-20 20:43:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-01-20 23:48:07 +0300 |
commit | 2744e4fa8f39cd06bfe557a5a3881830bd11501c (patch) | |
tree | 2ec96c6ee820cfe0e5e76480fe828501bf555a4b /src/gui/widgets/browserbox.cpp | |
parent | 531433248fbad49e2b8e9d90de9855f3ea9b2257 (diff) | |
download | manaverse-2744e4fa8f39cd06bfe557a5a3881830bd11501c.tar.gz manaverse-2744e4fa8f39cd06bfe557a5a3881830bd11501c.tar.bz2 manaverse-2744e4fa8f39cd06bfe557a5a3881830bd11501c.tar.xz manaverse-2744e4fa8f39cd06bfe557a5a3881830bd11501c.zip |
Last part with FOR_EACH changes.
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index e931c7626..8236dbdd3 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -253,8 +253,7 @@ void BrowserBox::addRow(const std::string &row, const bool atTop) const int hyphenWidth = font->getWidth(hyphen); unsigned x = 0; - for (TextRowCIter i = mTextRows.begin(), i_end = mTextRows.end(); - i != i_end; ++ i) + FOR_EACH (TextRowCIter, i, mTextRows) { std::string tempRow = *i; for (unsigned int j = 0, sz = static_cast<unsigned int>( @@ -413,8 +412,7 @@ void BrowserBox::draw(gcn::Graphics *graphics) gcn::Font *const font = getFont(); - for (LinePartCIter i = mLineParts.begin(), i_end = mLineParts.end(); - i != i_end; ++i) + FOR_EACH (LinePartCIter, i, mLineParts) { const LinePart &part = *i; if (part.mY + 50 < mYStart) @@ -465,8 +463,7 @@ int BrowserBox::calcHeight() mLineParts.clear(); - for (TextRowCIter i = mTextRows.begin(), i_end = mTextRows.end(); - i != i_end; ++ i) + FOR_EACH (TextRowCIter, i, mTextRows) { const std::string row = *(i); bool wrapped = false; @@ -753,8 +750,7 @@ std::string BrowserBox::getTextAtPos(const int x, const int y) const int lastY = 0; - for (LinePartCIter i = mLineParts.begin(), i_end = mLineParts.end(); - i != i_end; ++i) + FOR_EACH (LinePartCIter, i, mLineParts) { const LinePart &part = *i; if (part.mY + 50 < mYStart) |