2
0
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:
Lioncash
2020-03-13 16:32:24 -04:00
parent df4487bae8
commit 097d4a4422
18 changed files with 103 additions and 123 deletions

View File

@@ -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;