From cf440e5bb57dca6c25fe7255102dd070c31b96b0 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 17 Dec 2024 18:47:08 +0000 Subject: [PATCH] Apparently MSVC doesn't like shorts for vectorized loops --- lib/PalettedBlockArray.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PalettedBlockArray.h b/lib/PalettedBlockArray.h index 12287e3..d24326a 100644 --- a/lib/PalettedBlockArray.h +++ b/lib/PalettedBlockArray.h @@ -273,9 +273,9 @@ class PalettedBlockArray final : public IPalettedBlockArray { private: const size_t VECTORIZED_LOOKUP_CHUNK_SIZE = 32; - bool _vectorizedLookupOffset(Block val, short offset) const { + bool _vectorizedLookupOffset(Block val, int offset) const { int result = 0; - for (auto i = 0; i < VECTORIZED_LOOKUP_CHUNK_SIZE; i++) { + for (int i = 0; i < VECTORIZED_LOOKUP_CHUNK_SIZE; i++) { result |= palette[i + offset] == val; } return result != 0;