From 25f27026f0892714f5b1d4c6a8dca5b9bcf7a6fa Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Wed, 17 Jun 2026 00:05:52 +0200 Subject: [PATCH] newcelltypes: twines --- kernel/newcelltypes.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/newcelltypes.h b/kernel/newcelltypes.h index be528d32c..58a685386 100644 --- a/kernel/newcelltypes.h +++ b/kernel/newcelltypes.h @@ -455,8 +455,10 @@ struct Categories { constexpr bool operator[](size_t idx) { return data[idx]; } - constexpr void set_id(IdString type, bool val = true) { - size_t idx = type.index_; + // Indexed by TwineRef value, matching operator() and the Categories + // constructor. + constexpr void set_id(TwineRef type, bool val = true) { + size_t idx = type; if (idx >= MAX_CELLS) return; // TODO should be an assert but then it's not constexpr data[idx] = val;