Skip to content

Commit

Permalink
Apply rename
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNormalnij committed Feb 9, 2025
1 parent 75e3a11 commit 400d78d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Client/game_sa/CBuildingSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

extern CGameSA* pGame;

static CDynamicPool<CMatrixLinkSAInterface, PoolGrowAddStrategy<0, 500>> EXCLUSIVE_MATRIX_POOL{};
static CDynamicPool<CMatrixLinkSAInterface, PoolGrowAddStrategy<0, 500>> g_matrixPool{};

CBuildingSA::CBuildingSA(CBuildingSAInterface* pInterface)
{
Expand Down Expand Up @@ -72,7 +72,7 @@ void CBuildingSA::SetLod(CBuilding* pLod)

void CBuildingSA::AllocateMatrix()
{
auto* newMatrix = EXCLUSIVE_MATRIX_POOL.AllocateItem();
auto* newMatrix = g_matrixPool.AllocateItem();
std::memset(newMatrix, 0, sizeof(CMatrixLinkSAInterface));
newMatrix->SetTranslateOnly(m_pInterface->Placeable.m_transform.m_translate);

Expand All @@ -84,7 +84,7 @@ void CBuildingSA::ReallocateMatrix()
if (!m_pInterface->HasMatrix())
return;

auto* newMatrix = EXCLUSIVE_MATRIX_POOL.AllocateItem();
auto* newMatrix = g_matrixPool.AllocateItem();
std::memcpy(newMatrix, m_pInterface->Placeable.matrix, sizeof(CMatrixLinkSAInterface));
newMatrix->m_pOwner = nullptr;
newMatrix->m_pPrev = nullptr;
Expand All @@ -104,7 +104,7 @@ void CBuildingSA::RemoveAllocatedMatrix()
if (pMatrix->m_pOwner || (pMatrix->m_pNext && pMatrix->m_pPrev))
return;

EXCLUSIVE_MATRIX_POOL.RemoveItem(reinterpret_cast<CMatrixLinkSAInterface*>(m_pInterface->Placeable.matrix));
EXCLUSIVE_MATRIX_POOL.SetCapacity(0);
g_matrixPool.RemoveItem(reinterpret_cast<CMatrixLinkSAInterface*>(m_pInterface->Placeable.matrix));
g_matrixPool.SetCapacity(0);
m_pInterface->Placeable.matrix = nullptr;
}

0 comments on commit 400d78d

Please sign in to comment.