summaryrefslogtreecommitdiff
path: root/src/egg/core/eggHeap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/egg/core/eggHeap.cpp')
-rw-r--r--src/egg/core/eggHeap.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/egg/core/eggHeap.cpp b/src/egg/core/eggHeap.cpp
index a7a0dc7a..49234e0d 100644
--- a/src/egg/core/eggHeap.cpp
+++ b/src/egg/core/eggHeap.cpp
@@ -38,13 +38,16 @@ namespace EGG {
OSUnlockMutex(&sRootMutex);
}
-/* 80495560 */ void *Heap::alloc(size_t size, s32 align, Heap *heap) {
+/* 80495560 */ void *Heap::alloc(size_t size, int align, Heap *heap) {
Heap *currentHeap = sCurrentHeap;
Thread *thread = Thread::findThread(OSGetCurrentThread());
Heap *threadHeap = nullptr;
- if (thread != nullptr && (threadHeap = thread->mAllocatableHeap, threadHeap != nullptr)) {
- heap = threadHeap;
+ if (thread != nullptr) {
+ threadHeap = thread->mAllocatableHeap;
+ if (threadHeap != nullptr) {
+ heap = threadHeap;
+ }
}
if (sAllocatableHeap != nullptr) {
if (heap == nullptr) {