mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-11 19:03:59 +00:00
Runtime: Collapse emplace_back() calls where applicable
Same behavior, but with less code.
This commit is contained in:
@@ -266,8 +266,7 @@ bool CActorLights::BuildAreaLightList(const CStateManager& mgr, const CGameArea&
|
||||
zeus::CSphere sphere(light.GetPosition(), light.GetRadius() * 2.f);
|
||||
if (aabb.intersects(sphere)) {
|
||||
/* Light passes as candidate */
|
||||
valList.emplace_back();
|
||||
SLightValue& value = valList.back();
|
||||
SLightValue& value = valList.emplace_back();
|
||||
value.x0_areaLightIdx = lightIdx;
|
||||
value.x4_color = light.GetNormalIndependentLightingAtPoint(vec);
|
||||
value.x4_color.a() = 0.f;
|
||||
|
||||
Reference in New Issue
Block a user