From 63024e3fce9909d4db063026d5435a3bf28ef05e Mon Sep 17 00:00:00 2001 From: Fuzzy2319 Date: Sun, 2 Jun 2024 14:42:29 +0200 Subject: [PATCH 1/2] add:needed changes for SMO HeapUtil functions --- include/heap/seadHeapMgr.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/heap/seadHeapMgr.h b/include/heap/seadHeapMgr.h index 1bc4c5d4..37f566c5 100644 --- a/include/heap/seadHeapMgr.h +++ b/include/heap/seadHeapMgr.h @@ -15,18 +15,19 @@ namespace sead { class HeapMgr : hostio::Node { - struct AllocFailedCallbackArg; struct AllocCallbackArg; struct CreateCallbackArg; struct DestroyCallbackArg; struct FreeCallbackArg; - using IAllocFailedCallback = IDelegate1; using IAllocCallback = IDelegate1; using ICreateCallback = IDelegate1; using IDestroyCallback = IDelegate1; using IFreeCallback = IDelegate1; public: + struct AllocFailedCallbackArg; + using IAllocFailedCallback = IDelegate1; + HeapMgr(); virtual ~HeapMgr() {} @@ -46,6 +47,7 @@ class HeapMgr : hostio::Node Heap* findHeapByName(const SafeString& name, int index) const; static Heap* findHeapByName_(Heap*, const SafeString&, int* index); Heap* getCurrentHeap() const; + Heap* setCurrentHeap(Heap* heap) { return setCurrentHeap_(heap); } static void removeRootHeap(Heap*); @@ -69,7 +71,7 @@ class HeapMgr : hostio::Node friend class ScopedCurrentHeapSetter; /// Set the current heap to the specified heap and returns the previous "current heap". - sead::Heap* setCurrentHeap_(sead::Heap* heap); + Heap* setCurrentHeap_(Heap* heap); static Arena sDefaultArena; static RootHeaps sRootHeaps; From cbfbcf2268b967521657faa0b051d99e6e56f6ac Mon Sep 17 00:00:00 2001 From: Fuzzy2319 Date: Sun, 2 Jun 2024 15:15:00 +0200 Subject: [PATCH 2/2] remove:setCurrentHeap function --- include/heap/seadHeapMgr.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/heap/seadHeapMgr.h b/include/heap/seadHeapMgr.h index 37f566c5..fc49fa5f 100644 --- a/include/heap/seadHeapMgr.h +++ b/include/heap/seadHeapMgr.h @@ -47,7 +47,6 @@ class HeapMgr : hostio::Node Heap* findHeapByName(const SafeString& name, int index) const; static Heap* findHeapByName_(Heap*, const SafeString&, int* index); Heap* getCurrentHeap() const; - Heap* setCurrentHeap(Heap* heap) { return setCurrentHeap_(heap); } static void removeRootHeap(Heap*);