mirror of https://github.com/AxioDL/metaforce.git
CPatterned: Mark CMaterialList instance in CollidedWith as constexpr
This isn't ever modified, so we can mark it constexpr to eliminate potential runtime initializers.
This commit is contained in:
parent
677687f228
commit
ab2ad38220
|
@ -357,8 +357,8 @@ void CPatterned::CollidedWith(TUniqueId other, const CCollisionInfoList& list, C
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static CMaterialList testList(EMaterialTypes::Solid, EMaterialTypes::Ceiling, EMaterialTypes::Wall,
|
static constexpr CMaterialList testList(EMaterialTypes::Solid, EMaterialTypes::Ceiling, EMaterialTypes::Wall,
|
||||||
EMaterialTypes::Floor, EMaterialTypes::Character);
|
EMaterialTypes::Floor, EMaterialTypes::Character);
|
||||||
for (const CCollisionInfo& info : list) {
|
for (const CCollisionInfo& info : list) {
|
||||||
if (info.GetMaterialLeft().Intersection(testList)) {
|
if (info.GetMaterialLeft().Intersection(testList)) {
|
||||||
if (!info.GetMaterialLeft().HasMaterial(EMaterialTypes::Floor)) {
|
if (!info.GetMaterialLeft().HasMaterial(EMaterialTypes::Floor)) {
|
||||||
|
|
Loading…
Reference in New Issue