mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r25381) -Fix: Silent story book compiler warnings
This commit is contained in:
parent
d460e047e2
commit
7389a08738
@ -86,16 +86,16 @@
|
|||||||
StoryPage *p = StoryPage::Get(pe->page);
|
StoryPage *p = StoryPage::Get(pe->page);
|
||||||
::StoryPageElementType type = pe->type;
|
::StoryPageElementType type = pe->type;
|
||||||
|
|
||||||
EnforcePrecondition(false, (type != SPET_TEXT && type != SPET_LOCATION) || (text != NULL && !StrEmpty(text->GetEncodedText())));
|
EnforcePrecondition(false, (type != ::SPET_TEXT && type != ::SPET_LOCATION) || (text != NULL && !StrEmpty(text->GetEncodedText())));
|
||||||
EnforcePrecondition(false, type != SPET_LOCATION || ::IsValidTile(reference));
|
EnforcePrecondition(false, type != ::SPET_LOCATION || ::IsValidTile(reference));
|
||||||
EnforcePrecondition(false, type != SPET_GOAL || ScriptGoal::IsValidGoal((ScriptGoal::GoalID)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_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,
|
pe->page,
|
||||||
type == SPET_GOAL ? reference : 0,
|
type == ::SPET_GOAL ? reference : 0,
|
||||||
CMD_UPDATE_STORY_PAGE_ELEMENT,
|
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);
|
&ScriptInstance::DoCommandReturnStoryPageElementID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +234,6 @@ protected:
|
|||||||
uint16 page_num = 1;
|
uint16 page_num = 1;
|
||||||
for (const StoryPage *const*iter = this->story_pages.Begin(); iter != this->story_pages.End(); iter++) {
|
for (const StoryPage *const*iter = this->story_pages.Begin(); iter != this->story_pages.End(); iter++) {
|
||||||
const StoryPage *p = *iter;
|
const StoryPage *p = *iter;
|
||||||
char *title = p->title;
|
|
||||||
bool current_page = p->index == this->selected_page_id;
|
bool current_page = p->index == this->selected_page_id;
|
||||||
DropDownListStringItem *item = NULL;
|
DropDownListStringItem *item = NULL;
|
||||||
if (p->title != NULL) {
|
if (p->title != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user