General: Mark CMaterialFilter instances constexpr where applicable

Allows omission of runtime overhead.
This commit is contained in:
Lioncash 2020-05-07 14:08:29 -04:00
parent 33411ceeca
commit 579ae79291
2 changed files with 2 additions and 2 deletions

View File

@ -302,7 +302,7 @@ bool CActorLights::BuildAreaLightList(const CStateManager& mgr, const CGameArea&
x0_areaLights.clear();
/* Filter for performing final light visibility test */
CMaterialFilter filter = CMaterialFilter::MakeIncludeExclude(
constexpr auto filter = CMaterialFilter::MakeIncludeExclude(
CMaterialList(EMaterialTypes::Solid),
CMaterialList(EMaterialTypes::Projectile, EMaterialTypes::ProjectilePassthrough, EMaterialTypes::SeeThrough));
u32 mostSigLightIdx = 0;

View File

@ -206,7 +206,7 @@ void CEnvFxManager::UpdateBlockedGrids(CStateManager& mgr, EEnvFxType type, cons
if (type == EEnvFxType::UnderwaterFlake) {
grid.x14_block = std::make_pair(true, float(-FLT_MAX));
} else {
CMaterialFilter filter =
constexpr auto filter =
CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid, EMaterialTypes::Trigger},
{EMaterialTypes::ProjectilePassthrough, EMaterialTypes::SeeThrough});
zeus::CVector3f pos = xf * zeus::CVector3f((grid.x4_position + grid.xc_extent * 0).toVec2f() / 256.f) +