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);