diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-09-09 19:43:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-09-09 19:43:40 +0300 |
commit | 4484b433abc8f07bcf7d4d22fd946e00b66b078d (patch) | |
tree | d8d04c6ea9526b90334e7b0a4abf44e2508a3597 /src/gui/widgets/browserbox.cpp | |
parent | c1fb0bf9dc98e2a30f33cbbf4f74604b36efbcba (diff) | |
download | manaverse-4484b433abc8f07bcf7d4d22fd946e00b66b078d.tar.gz manaverse-4484b433abc8f07bcf7d4d22fd946e00b66b078d.tar.bz2 manaverse-4484b433abc8f07bcf7d4d22fd946e00b66b078d.tar.xz manaverse-4484b433abc8f07bcf7d4d22fd946e00b66b078d.zip |
Fix first part of shadow variables/methods errors.
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index 65a25363d..c20eb4622 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -210,23 +210,23 @@ void BrowserBox::addRow(const std::string &row, bool atTop) for (TextRowIterator i = mTextRows.begin(); i != mTextRows.end(); ++i) { - std::string row = *i; - for (unsigned int j = 0; j < row.size(); j++) + std::string tempRow = *i; + for (unsigned int j = 0; j < tempRow.size(); j++) { - std::string character = row.substr(j, 1); + std::string character = tempRow.substr(j, 1); x += font->getWidth(character); nextChar = j + 1; // Wraping between words (at blank spaces) - if ((nextChar < row.size()) && (row.at(nextChar) == ' ')) + if (nextChar < tempRow.size() && tempRow.at(nextChar) == ' ') { int nextSpacePos = static_cast<int>( - row.find(" ", (nextChar + 1))); + tempRow.find(" ", (nextChar + 1))); if (nextSpacePos <= 0) - nextSpacePos = static_cast<int>(row.size()) - 1; + nextSpacePos = static_cast<int>(tempRow.size()) - 1; unsigned nextWordWidth = font->getWidth( - row.substr(nextChar, + tempRow.substr(nextChar, (nextSpacePos - nextChar))); if ((x + nextWordWidth + 10) > (unsigned)getWidth()) |