1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-02-16 18:30:32 +00:00

Improve const correctness.

This commit is contained in:
Thomas Harte 2022-04-19 14:35:40 -04:00
parent 5de8fb0d08
commit 7749aef6b6

View File

@ -230,13 +230,13 @@ class Preinstruction {
// be provided, and will be a source and/or destination as
// per the semantics of the operation.
template <int index> AddressingMode mode() {
template <int index> AddressingMode mode() const {
if constexpr (index > 1) {
return AddressingMode::None;
}
return AddressingMode(operands_[index] & 0x1f);
}
template <int index> int reg() {
template <int index> int reg() const {
if constexpr (index > 1) {
return 0;
}