mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-12 21:45:19 -04:00
Isolate JKRHeap operator overloads
Fixes #25 This isolates the JKRHeap operator new/delete overloads. Every single new/delete site in the code has been replaced with a macro. Sadly for new[] and delete[] we have to keep global operators. The global new[] just allocates into malloc() however, and delete[] goes into free() if it's not in a JKRHeap. So that's fine.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "JSystem/J3DGraphBase/J3DFifo.h"
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include "JSystem/J3DGraphBase/J3DVertex.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
|
||||
void J3DGDSetVtxAttrFmtv(_GXVtxFmt, GXVtxAttrFmtList const*, bool);
|
||||
void J3DFifoLoadPosMtxImm(Mtx, u32);
|
||||
@@ -85,7 +86,7 @@ void J3DShape::addTexMtxIndexInVcd(GXAttr attr) {
|
||||
if (attrIdx == -1)
|
||||
return;
|
||||
|
||||
GXVtxDescList* newVtxDesc = new GXVtxDescList[attrCount + 2];
|
||||
GXVtxDescList* newVtxDesc = JKR_NEW GXVtxDescList[attrCount + 2];
|
||||
bool inserted = false;
|
||||
|
||||
vtxDesc = getVtxDesc();
|
||||
|
||||
Reference in New Issue
Block a user