diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-07-29 22:00:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-07-30 00:36:10 +0300 |
commit | 6fcbad4dc14b65acde858781cb0b0be1e9df9436 (patch) | |
tree | 22a555d054fc28f59477f91287df1a513c10b91a /src/gui | |
parent | b59601f599e84ed3b271a15ae4033f44e2c55763 (diff) | |
download | manaverse-6fcbad4dc14b65acde858781cb0b0be1e9df9436.tar.gz manaverse-6fcbad4dc14b65acde858781cb0b0be1e9df9436.tar.bz2 manaverse-6fcbad4dc14b65acde858781cb0b0be1e9df9436.tar.xz manaverse-6fcbad4dc14b65acde858781cb0b0be1e9df9436.zip |
Fix code style.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/questswindow.cpp | 6 | ||||
-rw-r--r-- | src/gui/questswindow.h | 2 | ||||
-rw-r--r-- | src/gui/sdlinput.cpp | 2 | ||||
-rw-r--r-- | src/gui/sdlinput.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/itemlinkhandler.cpp | 7 |
5 files changed, 12 insertions, 7 deletions
diff --git a/src/gui/questswindow.cpp b/src/gui/questswindow.cpp index e9eb37600..a33de32b6 100644 --- a/src/gui/questswindow.cpp +++ b/src/gui/questswindow.cpp @@ -133,8 +133,8 @@ QuestsWindow::~QuestsWindow() delete mQuestsModel; mQuestsModel = nullptr; - for (std::map<int, std::vector<QuestItem*>>::iterator it = mQuests.begin(), - it_end = mQuests.end(); it != it_end; ++ it) + for (std::map<int, std::vector<QuestItem*> >::iterator it + = mQuests.begin(), it_end = mQuests.end(); it != it_end; ++ it) { std::vector<QuestItem*> &quests = (*it).second; for (std::vector<QuestItem*>::iterator it2 = quests.begin(), @@ -195,7 +195,7 @@ void QuestsWindow::loadQuest(int var, XmlNodePtr node) } quest->incomplete = splitToIntSet(incompleteStr, ','); quest->complete = splitToIntSet(completeStr, ','); - if (quest->incomplete.size() + quest->complete.size() == 0) + if (quest->incomplete.empty() && quest->complete.empty()) { logger->log("complete flags incorrect"); delete quest; diff --git a/src/gui/questswindow.h b/src/gui/questswindow.h index 8454b80f5..4694acb8d 100644 --- a/src/gui/questswindow.h +++ b/src/gui/questswindow.h @@ -74,7 +74,7 @@ class QuestsWindow : public Window, public gcn::ActionListener ScrollArea *mTextScrollArea; Button *mCloseButton; std::map<int, int> mVars; - std::map<int, std::vector<QuestItem*>> mQuests; + std::map<int, std::vector<QuestItem*> > mQuests; std::vector<QuestItem*> mQuestLinks; Image *mCompleteIcon; Image *mIncompleteIcon; diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp index 55a4e0e6c..283d1b33e 100644 --- a/src/gui/sdlinput.cpp +++ b/src/gui/sdlinput.cpp @@ -284,7 +284,7 @@ int SDLInput::convertKeyCharacter(SDL_Event event) value = Key::ESCAPE; break; case SDLK_DELETE: - value = Key::DELETE; + value = Key::DELETE_; break; case SDLK_INSERT: value = Key::INSERT; diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h index c3c0628ff..b6b41fe5c 100644 --- a/src/gui/sdlinput.h +++ b/src/gui/sdlinput.h @@ -91,7 +91,7 @@ namespace Key INSERT, HOME, PAGE_UP, - DELETE, + DELETE_, END, PAGE_DOWN, ESCAPE, diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index c09aea04c..45cb25463 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -67,9 +67,14 @@ void ItemLinkHandler::handleLink(const std::string &link, mItemPopup->setItem(itemInfo, 1, true); if (mItemPopup->isVisible()) + { mItemPopup->setVisible(false); + } else if (viewport) - mItemPopup->position(viewport->getMouseX(), viewport->getMouseY()); + { + mItemPopup->position(viewport->getMouseX(), + viewport->getMouseY()); + } } } else |