mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 14:54:30 +01:00
Use std::string for objects
This commit is contained in:
committed by
Michael Steenbeek
parent
eed00ea363
commit
31e112cf3b
@@ -57,25 +57,22 @@ void StexObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 heigh
|
||||
gfx_draw_string_centred(dpi, STR_WINDOW_NO_IMAGE, x, y, COLOUR_BLACK, nullptr);
|
||||
}
|
||||
|
||||
const utf8 * StexObject::GetName() const
|
||||
std::string StexObject::GetName() const
|
||||
{
|
||||
return GetScenarioName();
|
||||
}
|
||||
|
||||
const utf8 * StexObject::GetScenarioName() const
|
||||
std::string StexObject::GetScenarioName() const
|
||||
{
|
||||
const utf8 * name = GetStringTable()->GetString(OBJ_STRING_ID_SCENARIO_NAME);
|
||||
return name != nullptr ? name : "";
|
||||
return GetStringTable()->GetString(OBJ_STRING_ID_SCENARIO_NAME);
|
||||
}
|
||||
|
||||
const utf8 * StexObject::GetScenarioDetails() const
|
||||
std::string StexObject::GetScenarioDetails() const
|
||||
{
|
||||
const utf8 * name = GetStringTable()->GetString(OBJ_STRING_ID_SCENARIO_DETAILS);
|
||||
return name != nullptr ? name : "";
|
||||
return GetStringTable()->GetString(OBJ_STRING_ID_SCENARIO_DETAILS);
|
||||
}
|
||||
|
||||
const utf8 * StexObject::GetParkName() const
|
||||
std::string StexObject::GetParkName() const
|
||||
{
|
||||
const utf8 * name = GetStringTable()->GetString(OBJ_STRING_ID_PARK_NAME);
|
||||
return name != nullptr ? name : "";
|
||||
return GetStringTable()->GetString(OBJ_STRING_ID_PARK_NAME);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user