summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-16 20:24:01 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-16 20:24:01 +0300
commit79114bbfe4bddf95345c33505a750f3aa80f1c56 (patch)
tree39751d014470c8c918d6bdb0d3893a1e7a841fa8
parent7f7ac0e998506fb2b19b03ae4f2ef6ef04b87b13 (diff)
downloadmanaverse-79114bbfe4bddf95345c33505a750f3aa80f1c56.tar.gz
manaverse-79114bbfe4bddf95345c33505a750f3aa80f1c56.tar.bz2
manaverse-79114bbfe4bddf95345c33505a750f3aa80f1c56.tar.xz
manaverse-79114bbfe4bddf95345c33505a750f3aa80f1c56.zip
fix compilation warnings.
-rw-r--r--src/being/being.cpp1
-rw-r--r--src/gui/popups/speechbubble.cpp8
-rw-r--r--src/gui/windows/updaterwindow.cpp4
3 files changed, 4 insertions, 9 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 98b83bcf7..34f6b64ce 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -2843,7 +2843,6 @@ std::string Being::loadComment(const std::string &name, const int type)
str.append(stringToHexPath(name)).append("/comment.txt");
logger->log("load from: %s", str.c_str());
- StringVect lines;
const ResourceManager *const resman = ResourceManager::getInstance();
if (resman->existsLocal(str))
diff --git a/src/gui/popups/speechbubble.cpp b/src/gui/popups/speechbubble.cpp
index 7febfdf4c..0c40676f6 100644
--- a/src/gui/popups/speechbubble.cpp
+++ b/src/gui/popups/speechbubble.cpp
@@ -74,22 +74,18 @@ void SpeechBubble::setText(const std::string &text, const bool showName)
mSpeechBox->setForegroundColorAll(getThemeColor(Theme::BUBBLE_TEXT),
getThemeColor(Theme::BUBBLE_TEXT_OUTLINE));
- const int pad = mPadding;
int width = mCaption->getWidth();
mSpeechBox->clearRows();
mSpeechBox->addRow(text);
mSpeechBox->setWidth(mSpeechBox->getDataWidth());
- const int speechWidth = mSpeechBox->getWidth();
- const int fontHeight = getFont()->getHeight();
+ const int speechWidth = mSpeechBox->getWidth();
const int nameHeight = showName ? mCaption->getHeight() + mSpacing : 0;
- int height = fontHeight + nameHeight;
if (width < speechWidth)
width = speechWidth;
- setContentSize(width, height);
-
+ setContentSize(width, getFont()->getHeight() + nameHeight);
mCaption->setPosition(0, 0);
mSpeechBox->setPosition(0, nameHeight);
}
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 36cdba6dd..f185c1ed5 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -970,8 +970,8 @@ void UpdaterWindow::loadFile(std::string file)
trim(file);
StringVect lines;
- ResourceManager::getInstance()->loadTextFileLocal(
- mUpdatesDir + "/local/help/news.txt", lines);
+ const ResourceManager *const resman = ResourceManager::getInstance();
+ resman->loadTextFileLocal(mUpdatesDir + "/local/help/news.txt", lines);
for (size_t i = 0, sz = lines.size(); i < sz; ++i)
mBrowserBox->addRow(lines[i]);