From 6699c1fb38549d66fea50ab3af1ca327ff32ca06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 7 Feb 2021 15:09:13 +0100 Subject: ksys/evt: Fix matching issue in OrderParam::initialize --- src/KingSystem/Event/evtOrderParam.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/KingSystem/Event/evtOrderParam.cpp') diff --git a/src/KingSystem/Event/evtOrderParam.cpp b/src/KingSystem/Event/evtOrderParam.cpp index 5ff22d1d..5d174cb4 100644 --- a/src/KingSystem/Event/evtOrderParam.cpp +++ b/src/KingSystem/Event/evtOrderParam.cpp @@ -28,10 +28,9 @@ bool OrderParam::initialize(s32 entry_count) { if (!mEntries.tryAllocBuffer(entry_count, mHeap)) return false; - for (s32 i = 0; i < entry_count; i++) { - clearEntry(&mEntries[i]); // no matter what I do, the compiler unrolls the first 2 - // iterations out of the loop - } + for (u32 i = 0; i < u32(entry_count); i++) + clearEntry(&mEntries[i]); + mEntryCount = 0; mInitialized = true; return true; -- cgit v1.2.3