ksys/util: bind tryCreateDualHeap to the function body

The 8-byte function only masks the bool argument and branches to the
body right after it, so the body is tryCreateDualHeap and the wrapper is
createDualHeap (name from the IDB). GameData calls the wrapper, so it
now calls createDualHeap.

(AI assisted using Claude Opus 5.5)
This commit is contained in:
Léo Lam
2026-10-15 22:56:22 +01:00
parent 0e2f35c161
commit dff75e03e8
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -622,8 +622,8 @@ FlagHandle Manager::getRevivalFlagHandle(const sead::SafeString& object_name,
void Manager::allocParam1() {
auto* parent_heap = OverlayArenaSystem::instance()->getGameDataWorkHeap();
auto* heap = util::tryCreateDualHeap(0, "param1", parent_heap, nullptr,
sead::Heap::cHeapDirection_Forward, false);
auto* heap = util::createDualHeap(0, "param1", parent_heap, nullptr,
sead::Heap::cHeapDirection_Forward, false);
mFlagBuffer1 = new (heap) TriggerParam;
mFlagBuffer1->copyAllFlags(*mFlagBuffer, heap, true);
heap->adjust();
@@ -649,8 +649,8 @@ void Manager::allocRetryBuffer(sead::Heap* heap) {
if (mRetryBuffer)
return;
auto* buffer_heap = util::tryCreateDualHeap(0x100000, "RetryBuffer", heap, nullptr,
sead::Heap::cHeapDirection_Reverse, false);
auto* buffer_heap = util::createDualHeap(0x100000, "RetryBuffer", heap, nullptr,
sead::Heap::cHeapDirection_Reverse, false);
mRetryBuffer = new (buffer_heap) TriggerParam;
mRetryBuffer->copyPermanentFlags(*mFlagBuffer1, buffer_heap);
buffer_heap->adjust();