From 15396fee5df1f3d37590722617e829cfff34c616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Sun, 7 Nov 2021 17:30:59 +0200 Subject: [PATCH] Add static GetNull member --- src/openrct2/core/Identifier.hpp | 5 +++++ src/openrct2/peep/GuestPathfinding.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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)