mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-07-17 19:24:13 +00:00
Allow memory peek as a const operation.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
@@ -34,11 +34,12 @@ namespace EightBit {
|
|||||||
return limit;
|
return limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t peek(const uint16_t address) {
|
uint8_t peek(const uint16_t address) const {
|
||||||
return BYTES()[address];
|
return BYTES()[address];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
const std::vector<uint8_t>& BYTES() const { return m_bytes; }
|
||||||
std::vector<uint8_t>& BYTES() { return m_bytes; }
|
std::vector<uint8_t>& BYTES() { return m_bytes; }
|
||||||
|
|
||||||
void poke(const uint16_t address, const uint8_t value) {
|
void poke(const uint16_t address, const uint8_t value) {
|
||||||
|
Reference in New Issue
Block a user