From c882003d378c1bdd0271d9613f29f0bb5e0b151c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 3 Oct 2019 00:32:17 -0400 Subject: [PATCH] CAtomicAlpha: Make skBombLocators an internal array This is only used within the cpp file, so we can relocate its definition there to make it fully internally-linked. --- Runtime/MP1/World/CAtomicAlpha.cpp | 10 ++++++++-- Runtime/MP1/World/CAtomicAlpha.hpp | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Runtime/MP1/World/CAtomicAlpha.cpp b/Runtime/MP1/World/CAtomicAlpha.cpp index ce7430285..6332e60eb 100644 --- a/Runtime/MP1/World/CAtomicAlpha.cpp +++ b/Runtime/MP1/World/CAtomicAlpha.cpp @@ -1,5 +1,7 @@ #include "Runtime/MP1/World/CAtomicAlpha.hpp" +#include + #include "Runtime/CStateManager.hpp" #include "Runtime/Weapon/CPlayerGun.hpp" #include "Runtime/World/CGameArea.hpp" @@ -8,8 +10,12 @@ #include "Runtime/World/CWorld.hpp" namespace urde::MP1 { -const std::string_view CAtomicAlpha::skBombLocators[4] = {"bomb1_LCTR"sv, "bomb2_LCTR"sv, "bomb3_LCTR"sv, - "bomb4_LCTR"sv}; +constexpr std::array skBombLocators{ + "bomb1_LCTR"sv, + "bomb2_LCTR"sv, + "bomb3_LCTR"sv, + "bomb4_LCTR"sv, +}; CAtomicAlpha::CAtomicAlpha(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, CModelData&& mData, const CActorParameters& actParms, const CPatternedInfo& pInfo, diff --git a/Runtime/MP1/World/CAtomicAlpha.hpp b/Runtime/MP1/World/CAtomicAlpha.hpp index 75c9554d7..951f52ccd 100644 --- a/Runtime/MP1/World/CAtomicAlpha.hpp +++ b/Runtime/MP1/World/CAtomicAlpha.hpp @@ -9,7 +9,6 @@ namespace urde::MP1 { class CAtomicAlpha : public CPatterned { - static const std::string_view skBombLocators[4]; static constexpr u32 skBombCount = 4; struct SBomb { std::string x0_locatorName;