mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 21:43:06 +01:00
* Used smart pointers * Changed functions to take vector as input
This commit is contained in:
@@ -321,7 +321,7 @@ void unload_unselected_objects()
|
||||
const ObjectRepositoryItem* items = object_repository_get_items();
|
||||
|
||||
size_t numObjectsToUnload = 0;
|
||||
rct_object_entry* objectsToUnload = static_cast<rct_object_entry*>(malloc(numItems * sizeof(rct_object_entry)));
|
||||
std::vector<rct_object_entry> objectsToUnload;
|
||||
|
||||
for (int32_t i = 0; i < numItems; i++)
|
||||
{
|
||||
@@ -335,7 +335,6 @@ void unload_unselected_objects()
|
||||
}
|
||||
|
||||
object_manager_unload_objects(objectsToUnload, numObjectsToUnload);
|
||||
free(objectsToUnload);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user