mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-21 03:12:41 +01:00
Codechange: use explicit TileIndex constructor for tile 0
This commit is contained in:
@@ -134,7 +134,7 @@
|
||||
EnforcePrecondition(false, CanProspectIndustry(industry_type));
|
||||
|
||||
uint32_t seed = ScriptBase::Rand();
|
||||
return ScriptObject::Command<CMD_BUILD_INDUSTRY>::Do(0, industry_type, 0, false, seed);
|
||||
return ScriptObject::Command<CMD_BUILD_INDUSTRY>::Do(TileIndex{}, industry_type, 0, false, seed);
|
||||
}
|
||||
|
||||
/* static */ bool ScriptIndustryType::IsBuiltOnWater(IndustryType industry_type)
|
||||
|
||||
@@ -80,7 +80,7 @@ static inline bool StoryPageElementTypeRequiresText(StoryPageElementType type)
|
||||
EnforcePrecondition(STORY_PAGE_ELEMENT_INVALID, type != SPET_GOAL || !(StoryPage::Get(story_page_id)->company == INVALID_COMPANY && Goal::Get(reference)->company != INVALID_COMPANY));
|
||||
|
||||
uint32_t refid = 0;
|
||||
TileIndex reftile = 0;
|
||||
TileIndex reftile{};
|
||||
switch (type) {
|
||||
case SPET_LOCATION:
|
||||
reftile = reference;
|
||||
@@ -129,7 +129,7 @@ static inline bool StoryPageElementTypeRequiresText(StoryPageElementType type)
|
||||
EnforcePrecondition(false, type != ::SPET_GOAL || !(p->company == INVALID_COMPANY && Goal::Get(reference)->company != INVALID_COMPANY));
|
||||
|
||||
uint32_t refid = 0;
|
||||
TileIndex reftile = 0;
|
||||
TileIndex reftile{};
|
||||
switch (type) {
|
||||
case ::SPET_LOCATION:
|
||||
reftile = reference;
|
||||
|
||||
Reference in New Issue
Block a user