diff --git a/src/openrct2/core/Identifier.hpp b/src/openrct2/core/Identifier.hpp index ffebd40aba..b3934bd9d9 100644 --- a/src/openrct2/core/Identifier.hpp +++ b/src/openrct2/core/Identifier.hpp @@ -34,6 +34,11 @@ public: { } + static constexpr TIdentifier GetNull() noexcept + { + return Null; + } + static constexpr TIdentifier FromUnderlying(const T val) noexcept { return TIdentifier{ val }; diff --git a/src/openrct2/peep/GuestPathfinding.cpp b/src/openrct2/peep/GuestPathfinding.cpp index 56f3a09079..74f90026d8 100644 --- a/src/openrct2/peep/GuestPathfinding.cpp +++ b/src/openrct2/peep/GuestPathfinding.cpp @@ -1744,7 +1744,7 @@ static int32_t guest_path_find_park_entrance(Peep* peep, uint8_t edges) if (!(peep->PeepFlags & PEEP_FLAGS_PARK_ENTRANCE_CHOSEN)) { - ParkEntranceIndex chosenEntrance = ParkEntranceIndex::Null; + auto chosenEntrance = ParkEntranceIndex::GetNull(); uint16_t nearestDist = 0xFFFF; uint8_t entranceNum = 0; for (const auto& entrance : gParkEntrances)