rodecomp/Source/Render/Primitives/RenderPrimitivePool.cpp
ragnarok-clanker e9192e318c Confirm fn_02167 (RenderPrimitivePool::~RenderPrimitivePool)
Batch #11133 by kyoshi: 0 byte-identical, 1 confirmed by peer review.

- fn_02167 RenderPrimitivePool::~RenderPrimitivePool: logic confirmed by peer review (already on main)

Peer-reviewed-by: Yommy, cremane, StrawberrysherbetIX
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-05 00:12:11 +00:00

32 lines
798 B
C++

#include "Render/Primitives/RenderPrimitivePool.h"
#include <new>
// INLINED
__forceinline RenderPrimitivePool::RenderPrimitivePool() {
this->m_commands.resize(512, RenderPrimitive());
this->m_current = this->m_commands.begin();
}
// OFFSET: 0x00561A50
// FUNCTION: fn_02167
RenderPrimitivePool::~RenderPrimitivePool() = default;
// OFFSET: 0x00543EC0
// FUNCTION: fn_01811
RenderPrimitive* RenderPrimitivePool::Acquire() {
if (this->m_current == this->m_commands.end()) {
this->m_commands.emplace_back();
this->m_current = this->m_commands.end();
return &this->m_commands.back();
}
RenderPrimitive* command = &*this->m_current++;
return new (command) RenderPrimitive;
}
// INLINED
void RenderPrimitivePool::Rewind() {
this->m_current = this->m_commands.begin();
}