From 19c0b93262079c5fba36043d7b3c5bff061f9952 Mon Sep 17 00:00:00 2001 From: "Adrian.Conlon" Date: Thu, 24 Aug 2017 11:06:23 +0100 Subject: [PATCH] Changes to the "const"ness of peek necessitate some changes. Signed-off-by: Adrian.Conlon --- Intel8080/inc/Disassembler.h | 2 +- Intel8080/src/Disassembler.cpp | 4 ++-- Z80/inc/Disassembler.h | 8 ++++---- Z80/src/Disassembler.cpp | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Intel8080/inc/Disassembler.h b/Intel8080/inc/Disassembler.h index 11d9cdc..b6dee36 100644 --- a/Intel8080/inc/Disassembler.h +++ b/Intel8080/inc/Disassembler.h @@ -25,7 +25,7 @@ namespace EightBit { private: mutable boost::format m_formatter; - void disassemble(std::ostringstream& output, const Intel8080& cpu, uint16_t pc); + void disassemble(std::ostringstream& output, Intel8080& cpu, uint16_t pc); void disassemble( std::ostringstream& output, diff --git a/Intel8080/src/Disassembler.cpp b/Intel8080/src/Disassembler.cpp index 87d421e..a804600 100644 --- a/Intel8080/src/Disassembler.cpp +++ b/Intel8080/src/Disassembler.cpp @@ -166,9 +166,9 @@ std::string EightBit::Disassembler::disassemble(Intel8080& cpu) { return output.str(); } -void EightBit::Disassembler::disassemble(std::ostringstream& output, const Intel8080& cpu, uint16_t pc) { +void EightBit::Disassembler::disassemble(std::ostringstream& output, Intel8080& cpu, uint16_t pc) { - const auto& memory = cpu.getMemory(); + auto& memory = cpu.getMemory(); auto opcode = memory.peek(pc); output << hex(opcode); diff --git a/Z80/inc/Disassembler.h b/Z80/inc/Disassembler.h index d136375..92539b0 100644 --- a/Z80/inc/Disassembler.h +++ b/Z80/inc/Disassembler.h @@ -30,11 +30,11 @@ namespace EightBit { bool m_prefixED; bool m_prefixFD; - void disassemble(std::ostringstream& output, const Z80& cpu, uint16_t pc); + void disassemble(std::ostringstream& output, Z80& cpu, uint16_t pc); void disassembleCB( std::ostringstream& output, - const Z80& cpu, + Z80& cpu, uint16_t pc, std::string& specification, int& dumpCount, @@ -43,7 +43,7 @@ namespace EightBit { void disassembleED( std::ostringstream& output, - const Z80& cpu, + Z80& cpu, uint16_t pc, std::string& specification, int& dumpCount, @@ -52,7 +52,7 @@ namespace EightBit { void disassembleOther( std::ostringstream& output, - const Z80& cpu, + Z80& cpu, uint16_t pc, std::string& specification, int& dumpCount, diff --git a/Z80/src/Disassembler.cpp b/Z80/src/Disassembler.cpp index ae57228..a1a10ce 100644 --- a/Z80/src/Disassembler.cpp +++ b/Z80/src/Disassembler.cpp @@ -176,9 +176,9 @@ std::string EightBit::Disassembler::disassemble(Z80& cpu) { return output.str(); } -void EightBit::Disassembler::disassemble(std::ostringstream& output, const Z80& cpu, uint16_t pc) { +void EightBit::Disassembler::disassemble(std::ostringstream& output, Z80& cpu, uint16_t pc) { - const auto& memory = cpu.getMemory(); + auto& memory = cpu.getMemory(); auto opcode = memory.peek(pc); const auto& decoded = cpu.getDecodedOpcode(opcode); @@ -237,7 +237,7 @@ void EightBit::Disassembler::disassemble(std::ostringstream& output, const Z80& void EightBit::Disassembler::disassembleCB( std::ostringstream& output, - const Z80& cpu, + Z80& cpu, uint16_t pc, std::string& specification, int& dumpCount, @@ -287,7 +287,7 @@ void EightBit::Disassembler::disassembleCB( void EightBit::Disassembler::disassembleED( std::ostringstream& output, - const Z80& cpu, + Z80& cpu, uint16_t pc, std::string& specification, int& dumpCount, @@ -421,7 +421,7 @@ void EightBit::Disassembler::disassembleED( void EightBit::Disassembler::disassembleOther( std::ostringstream& output, - const Z80& cpu, + Z80& cpu, uint16_t pc, std::string& specification, int& dumpCount,