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