From 81db0022e50e25d922ac7d67d9ec6017b8856f13 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 25 Feb 2012 21:28:51 +0300 Subject: Fix old casts. --- src/gui/widgets/browserbox.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/gui/widgets/browserbox.cpp') diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index 5856a91b1..47c5616b6 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -232,15 +232,17 @@ void BrowserBox::addRow(const std::string &row, bool atTop) tempRow.substr(nextChar, (nextSpacePos - nextChar))); - if ((x + nextWordWidth + 10) > (unsigned)getWidth()) + if ((x + nextWordWidth + 10) + > static_cast(getWidth())) { x = 15; // Ident in new line y += 1; - j++; + j ++; } } // Wrapping looong lines (brutal force) - else if ((x + 2 * hyphenWidth) > (unsigned)getWidth()) + else if ((x + 2 * hyphenWidth) + > static_cast(getWidth())) { x = 15; // Ident in new line y += 1; @@ -249,7 +251,7 @@ void BrowserBox::addRow(const std::string &row, bool atTop) } setHeight(font->getHeight() * (static_cast( - mTextRows.size()) + y)); + mTextRows.size()) + y)); } else { @@ -423,7 +425,7 @@ int BrowserBox::calcHeight() if (row.find("---", 0) == 0) { const int dashWidth = fontWidthMinus; - for (x = 0; x < (unsigned)getWidth(); x++) + for (x = 0; x < static_cast(getWidth()); x ++) { mLineParts.push_back(LinePart(x, y, selColor, "-", false)); x += dashWidth - 2; @@ -557,9 +559,8 @@ int BrowserBox::calcHeight() width = font->getWidth(part); // Auto wrap mode - if (mMode == AUTO_WRAP && getWidth() > 0 - && width > 0 - && (x + width + 10) > (unsigned)getWidth()) + if (mMode == AUTO_WRAP && getWidth() > 0 && width > 0 + && (x + width + 10) > static_cast(getWidth())) { bool forced = false; @@ -592,9 +593,8 @@ int BrowserBox::calcHeight() else width = font->getWidth(part); } - while (end > start && width > 0 - && (x + width + 10) - > (unsigned)getWidth()); + while (end > start && width > 0 && (x + width + 10) + > static_cast(getWidth())); if (forced) { -- cgit v1.2.3-70-g09d2