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

@@ -14,7 +14,7 @@ namespace ComSquare::Memory
this->setMemoryRegion(start, end);
}
uint8_t MemoryShadow::read(uint24_t addr)
uint8_t MemoryShadow::read(uint24_t addr) const
{
return this->_initial->read(addr);
}
@@ -24,22 +24,27 @@ namespace ComSquare::Memory
return this->_initial->write(addr, data);
}
bool MemoryShadow::isMirror()
uint24_t MemoryShadow::getSize() const
{
return this->_initial->getSize();
}
bool MemoryShadow::isMirror() const
{
return true;
}
std::shared_ptr<IMemory> MemoryShadow::getMirrored()
std::shared_ptr<IMemory> MemoryShadow::getMirrored() const
{
return this->_initial;
}
std::string MemoryShadow::getName()
std::string MemoryShadow::getName() const
{
return this->_initial->getName();
}
Component MemoryShadow::getComponent()
Component MemoryShadow::getComponent() const
{
return this->_initial->getComponent();
}