From d14a86d65041f73241fe5268f93ce73387813768 Mon Sep 17 00:00:00 2001 From: Narr the Reg <5944268+german77@users.noreply.github.com> Date: Thu, 29 Jan 2026 11:41:36 -0600 Subject: [PATCH] container: add result to PtrArray::pushBack --- include/container/seadPtrArray.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/container/seadPtrArray.h b/include/container/seadPtrArray.h index b79294a8..73f3216a 100644 --- a/include/container/seadPtrArray.h +++ b/include/container/seadPtrArray.h @@ -72,16 +72,17 @@ class PtrArrayImpl void* front() const { return mPtrs[0]; } void* back() const { return mPtrs[mPtrNum - 1]; } - void pushBack(void* ptr) + bool pushBack(void* ptr) { if (isFull()) { SEAD_ASSERT_MSG(false, "list is full."); - return; + return false; } // Simplest insert case, so this is implemented directly without using insert(). mPtrs[mPtrNum] = ptr; ++mPtrNum; + return true; } void pushFront(void* ptr) { insert(0, ptr); } @@ -235,7 +236,7 @@ class PtrArray : public PtrArrayImpl T* front() const { return at(0); } T* back() const { return at(mPtrNum - 1); } - void pushBack(T* ptr) { PtrArrayImpl::pushBack(constCast(ptr)); } + bool pushBack(T* ptr) { return PtrArrayImpl::pushBack(constCast(ptr)); } void pushFront(T* ptr) { PtrArrayImpl::pushFront(constCast(ptr)); } T* popBack() { return static_cast(PtrArrayImpl::popBack()); }