From 9f16881d64a20cff39f3cfadad04a3688b18bb7d Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Wed, 10 Sep 2025 21:18:33 -0400 Subject: [PATCH] Use for-each loop --- src/asm/fstack.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/asm/fstack.cpp b/src/asm/fstack.cpp index f5bb92f4..735cbf42 100644 --- a/src/asm/fstack.cpp +++ b/src/asm/fstack.cpp @@ -390,8 +390,8 @@ static char const *suggestDef(std::shared_ptr const macroArgs) { char const *str = arg->c_str(); static char const *types[] = {"EQUS", "EQU", "RB", "RW", "RL", "="}; - for (size_t i = 0; i < std::size(types); ++i) { - if (char const *type = types[i]; strncasecmp(str, type, strlen(type)) == 0) { + for (char const *type : types) { + if (strncasecmp(str, type, strlen(type)) == 0) { return type; } }