1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 14:02:59 +01:00

Close #12428: Refactor OBJECT_SOURCE_GAME to use strong enum

This commit is contained in:
Haven Kim
2020-10-17 13:27:02 -07:00
committed by GitHub
parent a9316869fc
commit 8a4df108ba
13 changed files with 71 additions and 71 deletions

View File

@@ -41,7 +41,7 @@ struct ObjectRepositoryItem
std::string Path;
std::string Name;
std::vector<std::string> Authors;
std::vector<uint8_t> Sources;
std::vector<ObjectSourceGame> Sources;
Object* LoadedObject{};
struct
{
@@ -54,12 +54,12 @@ struct ObjectRepositoryItem
std::vector<rct_object_entry> Entries;
} SceneryGroupInfo;
OBJECT_SOURCE_GAME GetFirstSourceGame() const
ObjectSourceGame GetFirstSourceGame() const
{
if (Sources.empty())
return OBJECT_SOURCE_CUSTOM;
return ObjectSourceGame::Custom;
else
return static_cast<OBJECT_SOURCE_GAME>(Sources[0]);
return static_cast<ObjectSourceGame>(Sources[0]);
}
};