mirror of
https://github.com/zeldaret/botw
synced 2026-05-29 08:42:54 -04:00
ksys/res: Fix EntryFactory<T>::newResource_ return type
Having a covariant return type that isn't sead::DirectResource* will cause an extra nullptr check to be emitted
This commit is contained in:
@@ -37,7 +37,7 @@ public:
|
||||
u32 getResourceSize() const override { return sizeof(T); }
|
||||
u32 getLoadDataAlignment() const override { return T::cLoadDataAlignment; }
|
||||
|
||||
T* newResource_(sead::Heap* heap_, s32 alignment) override {
|
||||
sead::DirectResource* newResource_(sead::Heap* heap_, s32 alignment) override {
|
||||
sead::Heap* heap = util::getHeapOrCurrentHeap(heap_);
|
||||
sead::ScopedCurrentHeapSetter setter{heap};
|
||||
return new (heap, alignment, std::nothrow_t{}) T{};
|
||||
|
||||
Reference in New Issue
Block a user