diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-27 21:41:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-27 21:41:20 +0300 |
commit | 964ffbb9b6ed5246b14a7d0c0d065f7d38af0912 (patch) | |
tree | edef1b3f31183402e2d0f86ee48c9734c2a03c7e /src/gui/widgets/browserbox.cpp | |
parent | 41ac086fcd38fd472b579a495a8e8e7685ae4722 (diff) | |
download | mv-964ffbb9b6ed5246b14a7d0c0d065f7d38af0912.tar.gz mv-964ffbb9b6ed5246b14a7d0c0d065f7d38af0912.tar.bz2 mv-964ffbb9b6ed5246b14a7d0c0d065f7d38af0912.tar.xz mv-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.cpp | 8 |
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; |