mirror of https://github.com/zeldaret/botw.git
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:
parent
9749f30484
commit
3b36b3af2b
|
|
@ -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{};
|
||||
|
|
|
|||
Loading…
Reference in New Issue