From 850b09916d691f0f30b99d80389a12a7cc9f5011 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 14 Nov 2023 19:58:46 -0800 Subject: [PATCH] fixup the KeyAddrBitfield.h constexpr fix - the previous fix results in code that gets MatrixAddr super confused. So just un-constxpr it --- src/kaleidoscope/KeyAddrBitfield.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/kaleidoscope/KeyAddrBitfield.h b/src/kaleidoscope/KeyAddrBitfield.h index d5c3b38858..edf197ee15 100644 --- a/src/kaleidoscope/KeyAddrBitfield.h +++ b/src/kaleidoscope/KeyAddrBitfield.h @@ -50,8 +50,9 @@ class KeyAddrBitfield { static constexpr uint8_t bitIndex(KeyAddr k) { return k.toInt() % block_size; } - static constexpr KeyAddr index(uint8_t block_index, uint8_t bit_index) { - return KeyAddr( (block_index * block_size) + bit_index); + static KeyAddr index(uint8_t block_index, uint8_t bit_index) { + uint8_t offset = (block_index * block_size) + bit_index; + return KeyAddr(offset); } bool read(KeyAddr k) const { // assert(k.toInt() < size);