summaryrefslogtreecommitdiff
path: root/src/gui/widgets/browserbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r--src/gui/widgets/browserbox.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index d5b853b2..2fe3b5b1 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -185,9 +185,8 @@ void BrowserBox::addRow(const std::string &row)
int tildeWidth = font->getWidth(tilde);
int x = 0;
- for (auto i = mTextRows.begin(); i != mTextRows.end(); i++)
+ for (auto row : mTextRows)
{
- std::string row = *i;
for (unsigned int j = 0; j < row.size(); ++j)
{
std::string character = row.substr(j, 1);
@@ -316,11 +315,8 @@ void BrowserBox::draw(gcn::Graphics *graphics)
}
}
- for (auto i = mLineParts.begin();
- i != mLineParts.end();
- i ++)
+ for (auto &part : mLineParts)
{
- const LinePart &part = *i;
if (part.getY() + 50 < mYStart)
continue;
if (part.getY() > yEnd)
@@ -385,9 +381,8 @@ int BrowserBox::calcHeight()
mLineParts.clear();
- for (auto i = mTextRows.begin(); i != mTextRows.end(); i++)
+ for (auto row : mTextRows)
{
- const std::string row = *(i);
bool wrapped = false;
x = 0;