mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-19 23:29:05 +00:00
Improve const correctness.
This commit is contained in:
parent
5de8fb0d08
commit
7749aef6b6
@ -230,13 +230,13 @@ class Preinstruction {
|
|||||||
// be provided, and will be a source and/or destination as
|
// be provided, and will be a source and/or destination as
|
||||||
// per the semantics of the operation.
|
// per the semantics of the operation.
|
||||||
|
|
||||||
template <int index> AddressingMode mode() {
|
template <int index> AddressingMode mode() const {
|
||||||
if constexpr (index > 1) {
|
if constexpr (index > 1) {
|
||||||
return AddressingMode::None;
|
return AddressingMode::None;
|
||||||
}
|
}
|
||||||
return AddressingMode(operands_[index] & 0x1f);
|
return AddressingMode(operands_[index] & 0x1f);
|
||||||
}
|
}
|
||||||
template <int index> int reg() {
|
template <int index> int reg() const {
|
||||||
if constexpr (index > 1) {
|
if constexpr (index > 1) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user