Adding const qualifiers to the IMemory and adding error messages in the memory viewer

This commit is contained in:
Zoe Roux
2021-02-04 10:22:30 +01:00
parent 2e4e39a696
commit c9eed50289
30 changed files with 208 additions and 123 deletions

View File

@@ -6,7 +6,7 @@
namespace ComSquare::Memory
{
uint24_t AMemory::getRelativeAddress(uint24_t addr)
uint24_t AMemory::getRelativeAddress(uint24_t addr) const
{
return addr - this->_start;
}
@@ -17,22 +17,22 @@ namespace ComSquare::Memory
this->_end = end;
}
bool AMemory::hasMemoryAt(uint24_t addr)
bool AMemory::hasMemoryAt(uint24_t addr) const
{
return this->_start <= addr && addr <= this->_end;
}
bool AMemory::isMirror()
bool AMemory::isMirror() const
{
return false;
}
std::shared_ptr<IMemory> AMemory::getMirrored()
std::shared_ptr<IMemory> AMemory::getMirrored() const
{
return nullptr;
}
std::string AMemory::getValueName(uint24_t)
std::string AMemory::getValueName(uint24_t) const
{
return "???";
}