summaryrefslogtreecommitdiff
path: root/src/gui/browserbox.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-01-21 20:31:33 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-01-21 20:31:33 +0000
commit5359640b6f271af31f6423df9d661433eff89a3e (patch)
treeb96ecd2ddffe43b57fd1927cebd7ac1fe6baf5c5 /src/gui/browserbox.cpp
parent14d43383605281885ed576664594343d167e57f1 (diff)
downloadmana-client-5359640b6f271af31f6423df9d661433eff89a3e.tar.gz
mana-client-5359640b6f271af31f6423df9d661433eff89a3e.tar.bz2
mana-client-5359640b6f271af31f6423df9d661433eff89a3e.tar.xz
mana-client-5359640b6f271af31f6423df9d661433eff89a3e.zip
Small followup change.
Diffstat (limited to 'src/gui/browserbox.cpp')
-rw-r--r--src/gui/browserbox.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp
index 9fab4f52..d34ce979 100644
--- a/src/gui/browserbox.cpp
+++ b/src/gui/browserbox.cpp
@@ -175,10 +175,11 @@ void BrowserBox::addRow(const std::string& row)
if (mMode == AUTO_WRAP)
{
- unsigned int i, j, x = 0, y = 0;
+ unsigned int i, j, y = 0;
unsigned int nextChar;
char hyphen = '~';
int hyphenWidth = browserFont->getWidth(hyphen);
+ int x = 0;
for (i = 0; i < mTextRows.size(); i++)
{
std::string row = mTextRows[i];
@@ -199,7 +200,7 @@ void BrowserBox::addRow(const std::string& row)
row.substr(nextChar,
(nextSpacePos - nextChar)));
- if ((int)(x + nextWordWidth + 10) > getWidth())
+ if ((x + nextWordWidth + 10) > getWidth())
{
x = 15; // Ident in new line
y += 1;
@@ -207,7 +208,7 @@ void BrowserBox::addRow(const std::string& row)
}
}
// Wrapping looong lines (brutal force)
- else if ((int)(x + 2 * hyphenWidth) > getWidth())
+ else if ((x + 2 * hyphenWidth) > getWidth())
{
x = 15; // Ident in new line
y += 1;