From ab2ad3822020a5094c763f5476b1c6745805b47f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 15 Jan 2020 14:48:19 -0500 Subject: [PATCH] CPatterned: Mark CMaterialList instance in CollidedWith as constexpr This isn't ever modified, so we can mark it constexpr to eliminate potential runtime initializers. --- Runtime/World/CPatterned.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/World/CPatterned.cpp b/Runtime/World/CPatterned.cpp index 0591d5edc..4af3e0a18 100644 --- a/Runtime/World/CPatterned.cpp +++ b/Runtime/World/CPatterned.cpp @@ -357,8 +357,8 @@ void CPatterned::CollidedWith(TUniqueId other, const CCollisionInfoList& list, C } } } - static CMaterialList testList(EMaterialTypes::Solid, EMaterialTypes::Ceiling, EMaterialTypes::Wall, - EMaterialTypes::Floor, EMaterialTypes::Character); + static constexpr CMaterialList testList(EMaterialTypes::Solid, EMaterialTypes::Ceiling, EMaterialTypes::Wall, + EMaterialTypes::Floor, EMaterialTypes::Character); for (const CCollisionInfo& info : list) { if (info.GetMaterialLeft().Intersection(testList)) { if (!info.GetMaterialLeft().HasMaterial(EMaterialTypes::Floor)) {