mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 21:43:06 +01:00
Refactor ResearchItem Type to an enum class (#12346)
* Change type of ResearchItem.type to enum class This is to prevent any future issues caused by confusion as to what the type is and further improves the codebase. * Specifiy a size for the type Also remove the static cast where not required * Apply review comments
This commit is contained in:
@@ -296,7 +296,7 @@ static void remove_selected_objects_from_research(const rct_object_entry* instal
|
||||
for (auto rideType : rideEntry->ride_type)
|
||||
{
|
||||
ResearchItem tmp = {};
|
||||
tmp.type = RESEARCH_ENTRY_TYPE_RIDE;
|
||||
tmp.type = Research::EntryType::Ride;
|
||||
tmp.entryIndex = entry_index;
|
||||
tmp.baseRideType = rideType;
|
||||
research_remove(&tmp);
|
||||
@@ -305,7 +305,7 @@ static void remove_selected_objects_from_research(const rct_object_entry* instal
|
||||
else if (entry_type == OBJECT_TYPE_SCENERY_GROUP)
|
||||
{
|
||||
ResearchItem tmp = {};
|
||||
tmp.type = RESEARCH_ENTRY_TYPE_SCENERY;
|
||||
tmp.type = Research::EntryType::Scenery;
|
||||
tmp.entryIndex = entry_index;
|
||||
research_remove(&tmp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user