From cadc0f8b6d0bd71f319c3e6576af05dcd0a7533f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 19 Nov 2012 01:25:34 +0300 Subject: Fix compilation error without C++11 flags. Error was introduced in previous commits. --- src/gui/questswindow.cpp | 11 ++++++----- src/gui/widgets/browserbox.cpp | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/gui') diff --git a/src/gui/questswindow.cpp b/src/gui/questswindow.cpp index 2e77da8ac..3991c8172 100644 --- a/src/gui/questswindow.cpp +++ b/src/gui/questswindow.cpp @@ -230,11 +230,11 @@ void QuestsWindow::loadQuest(const int var, const XmlNodePtr node) std::string str = translator->getStr(data); if (xmlNameEqual(dataNode, "text")) - quest->texts.push_back(QuestItemText(str, QuestType::QUEST_TEXT)); + quest->texts.push_back(QuestItemText(str, QUEST_TEXT)); else if (xmlNameEqual(dataNode, "name")) - quest->texts.push_back(QuestItemText(str, QuestType::QUEST_NAME)); + quest->texts.push_back(QuestItemText(str, QUEST_NAME)); else if (xmlNameEqual(dataNode, "reward")) - quest->texts.push_back(QuestItemText(str, QuestType::QUEST_REWARD)); + quest->texts.push_back(QuestItemText(str, QUEST_REWARD)); } mQuests[var].push_back(quest); } @@ -378,11 +378,12 @@ void QuestsWindow::showQuest(const QuestItem *const quest) const QuestItemText &data = *it; switch (data.type) { - case QuestType::QUEST_TEXT: + case QUEST_TEXT: + case QUEST_REWARD: default: mText->addRow(translator->getStr(data.text)); break; - case QuestType::QUEST_NAME: + case QUEST_NAME: mText->addRow("[" + translator->getStr(data.text) + "]"); break; } diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index f8b6b0b06..51420e8c7 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -661,7 +661,7 @@ int BrowserBox::calcHeight() } y += fontHeight; } - if (wWidth != maxWidth) + if ((signed)wWidth != maxWidth) { wWidth = maxWidth; setWidth(maxWidth); -- cgit v1.2.3-70-g09d2