1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 01:04:50 +01:00

Close #12430: Refactor OBJ_STRING_ID to use strong enum (#12796)

This commit is contained in:
Łukasz Pękalski
2020-08-29 04:36:58 +02:00
committed by GitHub
parent 731a93dc39
commit bfdc1f6d2a
15 changed files with 46 additions and 46 deletions

View File

@@ -86,9 +86,9 @@ void RideObject::ReadLegacy(IReadObjectContext* context, IStream* stream)
_legacyType.shop_item[0] = stream->ReadValue<uint8_t>();
_legacyType.shop_item[1] = stream->ReadValue<uint8_t>();
GetStringTable().Read(context, stream, OBJ_STRING_ID_NAME);
GetStringTable().Read(context, stream, OBJ_STRING_ID_DESCRIPTION);
GetStringTable().Read(context, stream, OBJ_STRING_ID_CAPACITY);
GetStringTable().Read(context, stream, ObjectStringID::NAME);
GetStringTable().Read(context, stream, ObjectStringID::DESCRIPTION);
GetStringTable().Read(context, stream, ObjectStringID::CAPACITY);
// Read preset colours, by default there are 32
_presetColours.count = stream->ReadValue<uint8_t>();
@@ -393,12 +393,12 @@ void RideObject::DrawPreview(rct_drawpixelinfo* dpi, [[maybe_unused]] int32_t wi
std::string RideObject::GetDescription() const
{
return GetString(OBJ_STRING_ID_DESCRIPTION);
return GetString(ObjectStringID::DESCRIPTION);
}
std::string RideObject::GetCapacity() const
{
return GetString(OBJ_STRING_ID_CAPACITY);
return GetString(ObjectStringID::CAPACITY);
}
void RideObject::SetRepositoryItem(ObjectRepositoryItem* item) const