Allow memory peek as a const operation.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2018-08-26 13:06:05 +01:00
parent 8823bb6610
commit c03d8488b5

View File

@ -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) {