CCompoundTargetReticle: Make eliminate hardcoded size

We can just query the capacity to dehardcode it.
This commit is contained in:
Lioncash 2020-04-13 16:51:59 -04:00
parent e26afe887f
commit 1767338aba
1 changed files with 2 additions and 1 deletions

View File

@ -64,8 +64,9 @@ CCompoundTargetReticle::CCompoundTargetReticle(const CStateManager& mgr)
, x100_laggingTargetPos(CalculateOrbitZoneReticlePosition(mgr, true))
, x208_lockonTimer(g_tweakTargeting->GetLockonDuration()) {
xe0_outerBeamIconSquares.reserve(9);
for (u32 i = 0; i < 9; ++i)
for (size_t i = 0; i < xe0_outerBeamIconSquares.capacity(); ++i) {
xe0_outerBeamIconSquares.emplace_back(fmt::format(FMT_STRING("{}{}"), skOuterBeamIconSquareNameBase, i));
}
x34_crosshairs.Lock();
}