From 313e2b81ff9bd98c50c674903b8d2c25aaf37e68 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Sun, 19 Mar 2023 13:27:55 -0500 Subject: [PATCH] chore(gx): pool discard uses pool invalidate --- src/gx/buffer/CGxPool.cpp | 11 +++++++---- src/gx/buffer/CGxPool.hpp | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/gx/buffer/CGxPool.cpp b/src/gx/buffer/CGxPool.cpp index 838a5d4..53f850a 100644 --- a/src/gx/buffer/CGxPool.cpp +++ b/src/gx/buffer/CGxPool.cpp @@ -1,9 +1,12 @@ #include "gx/buffer/CGxPool.hpp" void CGxPool::Discard() { - for (auto buf = this->m_bufList.Head(); buf; buf = this->m_bufList.Link(buf)->Next()) { - buf->unk1C = 0; - } - + this->Invalidate(); this->unk1C = 0; } + +void CGxPool::Invalidate() { + for (auto buf = this->m_bufList.Head(); buf; buf = this->m_bufList.Next(buf)) { + buf->unk1C = 0; + } +} diff --git a/src/gx/buffer/CGxPool.hpp b/src/gx/buffer/CGxPool.hpp index 6271435..500a6c5 100644 --- a/src/gx/buffer/CGxPool.hpp +++ b/src/gx/buffer/CGxPool.hpp @@ -30,7 +30,8 @@ class CGxPool : public TSLinkedNode { , m_hint(hint) , m_name(name) {}; - void Discard(void); + void Discard(); + void Invalidate(); }; #endif