From 9d4f79bcfcd7b4423b737e73729222c348f528be Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 17 Mar 2012 15:24:47 +0100 Subject: [PATCH 1/2] GCC compile fix --- apps/openmw/mwdialogue/dialoguemanager.cpp | 2 +- apps/openmw/mwdialogue/dialoguemanager.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwdialogue/dialoguemanager.cpp b/apps/openmw/mwdialogue/dialoguemanager.cpp index eb78e9e9d..c469f12a0 100644 --- a/apps/openmw/mwdialogue/dialoguemanager.cpp +++ b/apps/openmw/mwdialogue/dialoguemanager.cpp @@ -472,7 +472,7 @@ namespace MWDialogue void DialogueManager::parseText(std::string text) { - std::map>::iterator it; + std::map >::iterator it; for(it = actorKnownTopics.begin();it != actorKnownTopics.end();it++) { MWGui::DialogueWindow* win = mEnvironment.mWindowManager->getDialogueWindow(); diff --git a/apps/openmw/mwdialogue/dialoguemanager.hpp b/apps/openmw/mwdialogue/dialoguemanager.hpp index f32305b46..2ea157562 100644 --- a/apps/openmw/mwdialogue/dialoguemanager.hpp +++ b/apps/openmw/mwdialogue/dialoguemanager.hpp @@ -31,7 +31,7 @@ namespace MWDialogue void parseText(std::string text); std::map knownTopics;// Those are the topics the player knows. - std::map> actorKnownTopics; + std::map > actorKnownTopics; MWScript::CompilerContext mCompilerContext; std::ostream mErrorStream; From 21143f006bbaeef65261ef0e811afe7e8355e637 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 17 Mar 2012 15:47:22 +0100 Subject: [PATCH 2/2] fix several warnings --- apps/openmw/mwgui/dialogue.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index 88b44c9c4..91ad18e7b 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -104,7 +104,7 @@ void DialogueWindow::onSelectTopic(MyGUI::List* _sender, size_t _index) { if (_index == MyGUI::ITEM_NONE) return; - std::string topic = _sender->getItem(_index); + std::string topic = _sender->getItemNameAt(_index); mEnvironment.mDialogueManager->keywordSelected(lower_string(topic)); } @@ -126,8 +126,8 @@ void DialogueWindow::removeKeyword(std::string keyWord) { if(topicsList->findItemIndexWith(keyWord) != MyGUI::ITEM_NONE) { - std::cout << topicsList->findItem(keyWord); - topicsList->removeItemAt(topicsList->findItem(keyWord)); + std::cout << topicsList->findItemIndexWith(keyWord); + topicsList->removeItemAt(topicsList->findItemIndexWith(keyWord)); pTopicsText.erase(keyWord); } } @@ -158,9 +158,9 @@ void addColorInString(std::string& str, const std::string& keyword,std::string c std::string DialogueWindow::parseText(std::string text) { - for(int i = 0;igetItemCount();i++) + for(unsigned int i = 0;igetItemCount();i++) { - std::string keyWord = topicsList->getItem(i); + std::string keyWord = topicsList->getItemNameAt(i); addColorInString(text,keyWord,"#686EBA","#B29154"); } return text;