1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 05:23:04 +01:00

Fix macOS compilation (hopefully)

This commit is contained in:
Gymnasiast
2021-07-29 15:12:30 +02:00
parent 0bc54aa69d
commit 5293b3683e

View File

@@ -54,6 +54,7 @@
#include <cstdint>
#include <ctime>
#include <numeric>
#include <optional>
#include <string_view>
#include <vector>
@@ -4424,14 +4425,16 @@ static const FootpathMapping* GetFootpathMapping(const ObjectEntryDescriptor& de
if (desc.Generation == ObjectGeneration::JSON)
{
auto datPathName = GetDATPathName(desc.Identifier);
if (datPathName == std::nullopt)
if (datPathName.has_value())
{
rct_object_entry objectEntry = {};
objectEntry.SetName(datPathName.value());
return GetFootpathSurfaceId(ObjectEntryDescriptor(objectEntry));
}
else
{
return nullptr;
}
rct_object_entry objectEntry = {};
objectEntry.SetName(datPathName.value());
return GetFootpathSurfaceId(ObjectEntryDescriptor(objectEntry));
}
// Even old .park saves with DAT identifiers somehow exist.