From 53d2e785f5638cee8f09173ed0d724fbe5552815 Mon Sep 17 00:00:00 2001 From: zuu Date: Sun, 9 Jun 2013 14:13:59 +0000 Subject: (svn r25381) -Fix: Silent story book compiler warnings --- src/script/api/script_story_page.cpp | 14 +++++++------- src/story_gui.cpp | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/script/api/script_story_page.cpp b/src/script/api/script_story_page.cpp index 8d6253b3c..aabe6befc 100644 --- a/src/script/api/script_story_page.cpp +++ b/src/script/api/script_story_page.cpp @@ -86,16 +86,16 @@ StoryPage *p = StoryPage::Get(pe->page); ::StoryPageElementType type = pe->type; - EnforcePrecondition(false, (type != SPET_TEXT && type != SPET_LOCATION) || (text != NULL && !StrEmpty(text->GetEncodedText()))); - EnforcePrecondition(false, type != SPET_LOCATION || ::IsValidTile(reference)); - EnforcePrecondition(false, type != SPET_GOAL || ScriptGoal::IsValidGoal((ScriptGoal::GoalID)reference)); - EnforcePrecondition(false, type != SPET_GOAL || !(p->company == INVALID_COMPANY && Goal::Get(reference)->company != INVALID_COMPANY)); + EnforcePrecondition(false, (type != ::SPET_TEXT && type != ::SPET_LOCATION) || (text != NULL && !StrEmpty(text->GetEncodedText()))); + EnforcePrecondition(false, type != ::SPET_LOCATION || ::IsValidTile(reference)); + EnforcePrecondition(false, type != ::SPET_GOAL || ScriptGoal::IsValidGoal((ScriptGoal::GoalID)reference)); + EnforcePrecondition(false, type != ::SPET_GOAL || !(p->company == INVALID_COMPANY && Goal::Get(reference)->company != INVALID_COMPANY)); - return ScriptObject::DoCommand(type == SPET_LOCATION ? reference : 0, + return ScriptObject::DoCommand(type == ::SPET_LOCATION ? reference : 0, pe->page, - type == SPET_GOAL ? reference : 0, + type == ::SPET_GOAL ? reference : 0, CMD_UPDATE_STORY_PAGE_ELEMENT, - type == SPET_TEXT || type == SPET_LOCATION ? text->GetEncodedText() : NULL, + type == ::SPET_TEXT || type == ::SPET_LOCATION ? text->GetEncodedText() : NULL, &ScriptInstance::DoCommandReturnStoryPageElementID); } diff --git a/src/story_gui.cpp b/src/story_gui.cpp index 9efee829e..48555995a 100644 --- a/src/story_gui.cpp +++ b/src/story_gui.cpp @@ -234,7 +234,6 @@ protected: uint16 page_num = 1; for (const StoryPage *const*iter = this->story_pages.Begin(); iter != this->story_pages.End(); iter++) { const StoryPage *p = *iter; - char *title = p->title; bool current_page = p->index == this->selected_page_id; DropDownListStringItem *item = NULL; if (p->title != NULL) { -- cgit v1.2.3-70-g09d2