From 52196c4b75f84444bca3b9c19302146235bf8f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Fri, 23 Apr 2021 12:49:51 +0200 Subject: [PATCH] ksys/res: Fix EntryFactory using value initialisation when new'ing This causes an extra memset to be issued in some cases. --- src/KingSystem/Resource/resEntryFactory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KingSystem/Resource/resEntryFactory.h b/src/KingSystem/Resource/resEntryFactory.h index 611a2122..1ac243f2 100644 --- a/src/KingSystem/Resource/resEntryFactory.h +++ b/src/KingSystem/Resource/resEntryFactory.h @@ -40,7 +40,7 @@ public: 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{}; + return new (heap, alignment, std::nothrow_t{}) T; } protected: