summaryrefslogtreecommitdiff
path: root/src/gui/widgets/browserbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-27 21:41:20 +0300
committerAndrei Karas <akaras@inbox.ru>2011-03-27 21:41:20 +0300
commit964ffbb9b6ed5246b14a7d0c0d065f7d38af0912 (patch)
treeedef1b3f31183402e2d0f86ee48c9734c2a03c7e /src/gui/widgets/browserbox.cpp
parent41ac086fcd38fd472b579a495a8e8e7685ae4722 (diff)
downloadmanaverse-964ffbb9b6ed5246b14a7d0c0d065f7d38af0912.tar.gz
manaverse-964ffbb9b6ed5246b14a7d0c0d065f7d38af0912.tar.bz2
manaverse-964ffbb9b6ed5246b14a7d0c0d065f7d38af0912.tar.xz
manaverse-964ffbb9b6ed5246b14a7d0c0d065f7d38af0912.zip
Fix some warnings and improve code from gcc 4.6 compilation.
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r--src/gui/widgets/browserbox.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 8546cbd7e..bc5583148 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -178,7 +178,7 @@ void BrowserBox::addRow(const std::string &row, bool atTop)
unsigned int nextChar;
const char *hyphen = "~";
int hyphenWidth = font->getWidth(hyphen);
- int x = 0;
+ unsigned x = 0;
for (TextRowIterator i = mTextRows.begin(); i != mTextRows.end(); ++i)
{
@@ -197,7 +197,7 @@ void BrowserBox::addRow(const std::string &row, bool atTop)
if (nextSpacePos <= 0)
nextSpacePos = static_cast<int>(row.size()) - 1;
- int nextWordWidth = font->getWidth(
+ unsigned nextWordWidth = font->getWidth(
row.substr(nextChar,
(nextSpacePos - nextChar)));
@@ -335,7 +335,7 @@ void BrowserBox::draw(gcn::Graphics *graphics)
int BrowserBox::calcHeight()
{
- int x = 0, y = 0;
+ unsigned x = 0, y = 0;
int wrappedLines = 0;
int link = 0;
gcn::Font *font = getFont();
@@ -360,7 +360,7 @@ int BrowserBox::calcHeight()
if (row.find("---", 0) == 0)
{
const int dashWidth = fontWidthMinus;
- for (x = 0; x < getWidth(); x++)
+ for (x = 0; x < (unsigned)getWidth(); x++)
{
mLineParts.push_back(LinePart(x, y, selColor, "-"));
x += dashWidth - 2;