From 23272f028f76b6e42563219221ab5ca03dec6372 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Fri, 23 Aug 2024 13:35:48 +0200 Subject: [PATCH] Update the best proto-pal relative size when a new best is found *facepalm* --- src/gfx/pal_packing.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gfx/pal_packing.cpp b/src/gfx/pal_packing.cpp index 0164684d..00d8b45d 100644 --- a/src/gfx/pal_packing.cpp +++ b/src/gfx/pal_packing.cpp @@ -393,16 +393,18 @@ std::tuple, size_t> continue; } + double relSize = assignments[i].relSizeOf(protoPal); options.verbosePrint( Options::VERB_DEBUG, "%zu/%zu: Rel size: %f (size = %zu)\n", i + 1, assignments.size(), - assignments[i].relSizeOf(protoPal), + relSize, protoPal.size() ); - if (assignments[i].relSizeOf(protoPal) < bestRelSize) { + if (relSize < bestRelSize) { bestPalIndex = i; + bestRelSize = relSize; } }