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:
Léo Lam 2020-11-08 22:54:39 +01:00
parent 9749f30484
commit 3b36b3af2b
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
1 changed files with 1 additions and 1 deletions

View File

@ -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{};