mirror of https://github.com/AxioDL/metaforce.git
CRainSplashGenerator: Dehardcode line vector size in constructor
We can query the capacity instead.
This commit is contained in:
parent
254a96313a
commit
da75543c76
|
@ -75,9 +75,10 @@ CRainSplashGenerator::SSplashLine::SSplashLine(boo::IGraphicsDataFactory::Contex
|
||||||
: m_renderer(ctx, CLineRenderer::EPrimitiveMode::LineStrip, 3, nullptr, false) {}
|
: m_renderer(ctx, CLineRenderer::EPrimitiveMode::LineStrip, 3, nullptr, false) {}
|
||||||
|
|
||||||
CRainSplashGenerator::SRainSplash::SRainSplash(boo::IGraphicsDataFactory::Context& ctx) {
|
CRainSplashGenerator::SRainSplash::SRainSplash(boo::IGraphicsDataFactory::Context& ctx) {
|
||||||
for (int i = 0; i < 4; ++i)
|
for (size_t i = 0; i < x0_lines.capacity(); ++i) {
|
||||||
x0_lines.emplace_back(ctx);
|
x0_lines.emplace_back(ctx);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CRainSplashGenerator::SSplashLine::Update(float dt, CStateManager& mgr) {
|
void CRainSplashGenerator::SSplashLine::Update(float dt, CStateManager& mgr) {
|
||||||
if (!x16_active)
|
if (!x16_active)
|
||||||
|
|
Loading…
Reference in New Issue