From 934fc27d43fb6dc849a258c6ad0eb2ef44112c87 Mon Sep 17 00:00:00 2001 From: Jerry Belich Date: Wed, 9 Sep 2026 23:02:16 -0700 Subject: [PATCH 1/2] list ops: convert to int32_t explicitly for LIST_VALUE value::set is specialized on int32_t, and int32_t is not int on every target: on Xtensa it is long. So set(0) and set(get_flag_value(...)), which returns int, select the primary template on those platforms rather than the specialization, and the build stops on static assertion failed: No setter for this type defined! It compiles on x86-64 and arm64 Linux/macOS, where int32_t is int, so the four call sites added with LIST_VALUE went unnoticed. Every other set call site in the tree already casts explicitly - numeric_operations.h, container_operations.cpp, runner_impl.cpp - so this just follows the existing convention. Found building for ESP32-S3. Co-Authored-By: Claude Opus 5 --- inkcpp/list_operations.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inkcpp/list_operations.h b/inkcpp/list_operations.h index 33fa9f51..eb8200a4 100644 --- a/inkcpp/list_operations.h +++ b/inkcpp/list_operations.h @@ -334,9 +334,9 @@ class operation inkAssert(vals[0].type() == value_type::list_flag, "LIST_VALUE only works on list_flag values"); list_flag flag = vals[0].get(); if (flag.list_id < 0 || flag.flag < 0) { - stack.push(value{}.set(0)); + stack.push(value{}.set(int32_t{0})); } else { - stack.push(value{}.set(_list_table.get_flag_value(flag))); + stack.push(value{}.set(static_cast(_list_table.get_flag_value(flag)))); } } }; @@ -352,9 +352,9 @@ class operation : public operation_ list_table::list l = vals[0].get(); list_flag max_flag = _list_table.max(l); if (max_flag.list_id < 0 || max_flag.flag < 0) { - stack.push(value{}.set(0)); + stack.push(value{}.set(int32_t{0})); } else { - stack.push(value{}.set(_list_table.get_flag_value(max_flag))); + stack.push(value{}.set(static_cast(_list_table.get_flag_value(max_flag)))); } } }; From d2e84d62ac442b8c568e0fe0e913ace326bcbeb2 Mon Sep 17 00:00:00 2001 From: Jerry Belich Date: Thu, 10 Sep 2026 09:41:37 -0700 Subject: [PATCH 2/2] style: wrap the LIST_VALUE pushes to the 100 column limit Applying the maintainer's patch from PR #165 so the format job passes. Produced with clang-format against the project's own .clang-format rather than by hand, and byte-identical to the patch as posted. No behaviour change - only the two lines the previous commit made too long. Co-Authored-By: Claude Opus 5 --- inkcpp/list_operations.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/inkcpp/list_operations.h b/inkcpp/list_operations.h index eb8200a4..fa27c3ce 100644 --- a/inkcpp/list_operations.h +++ b/inkcpp/list_operations.h @@ -336,7 +336,9 @@ class operation if (flag.list_id < 0 || flag.flag < 0) { stack.push(value{}.set(int32_t{0})); } else { - stack.push(value{}.set(static_cast(_list_table.get_flag_value(flag)))); + stack.push( + value{}.set(static_cast(_list_table.get_flag_value(flag))) + ); } } }; @@ -354,7 +356,9 @@ class operation : public operation_ if (max_flag.list_id < 0 || max_flag.flag < 0) { stack.push(value{}.set(int32_t{0})); } else { - stack.push(value{}.set(static_cast(_list_table.get_flag_value(max_flag)))); + stack.push( + value{}.set(static_cast(_list_table.get_flag_value(max_flag))) + ); } } };