summaryrefslogtreecommitdiff
path: root/src/gui/widgets/browserbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-31 16:54:22 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-01 03:56:16 +0300
commit761682b6254a3d43e65ff45e07683c61afa6f1e4 (patch)
tree2ee462840f3aadb1e96bfa5c6784ec2cc0d2861a /src/gui/widgets/browserbox.cpp
parenta39f63cdfa5ce15b22f294a8bb1db3a036ce462d (diff)
downloadmanaverse-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.gz
manaverse-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.bz2
manaverse-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.xz
manaverse-761682b6254a3d43e65ff45e07683c61afa6f1e4.zip
Last part of fixes.
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r--src/gui/widgets/browserbox.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 5ef7adfcd..6b5263aa9 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -105,7 +105,9 @@ void BrowserBox::addRow(const std::string &row, bool atTop)
{
std::string tmp = row;
std::string newRow;
- std::string::size_type idx1, idx2, idx3;
+ size_t idx1;
+ size_t idx2;
+ size_t idx3;
gcn::Font *font = getFont();
if (getWidth() < 0)
@@ -479,7 +481,7 @@ int BrowserBox::calcHeight()
// TODO: Check if we must take texture size limits into account here
// TODO: Check if some of the O(n) calls can be removed
- for (std::string::size_type start = 0, end = std::string::npos;
+ for (size_t start = 0, end = std::string::npos;
start != std::string::npos;
start = end, end = std::string::npos)
{
@@ -566,8 +568,7 @@ int BrowserBox::calcHeight()
}
}
- std::string::size_type len =
- end == std::string::npos ? end : end - start;
+ size_t len = (end == std::string::npos) ? end : end - start;
if (start >= row.length())
break;