Cleaning up

This commit is contained in:
Zoe Roux
2021-07-04 02:56:44 +02:00
57 changed files with 5597 additions and 5173 deletions

View File

@@ -4,48 +4,46 @@
#include "MemoryShadow.hpp"
#include <utility>
namespace ComSquare::Memory
{
MemoryShadow::MemoryShadow(std::shared_ptr<IMemory> initial, uint24_t start, uint24_t end)
: _initial(std::move(initial))
MemoryShadow::MemoryShadow(IMemory &initial, uint24_t start, uint24_t end)
: _initial(initial)
{
this->setMemoryRegion(start, end);
}
uint8_t MemoryShadow::read(uint24_t addr)
{
return this->_initial->read(addr);
return this->_initial.read(addr);
}
void MemoryShadow::write(uint24_t addr, uint8_t data)
{
return this->_initial->write(addr, data);
return this->_initial.write(addr, data);
}
uint24_t MemoryShadow::getSize() const
{
return this->_initial->getSize();
return this->_initial.getSize();
}
bool MemoryShadow::isMirror() const
{
return true;
}
std::shared_ptr<IMemory> MemoryShadow::getMirrored() const
IMemory &MemoryShadow::getMirrored() const
{
return this->_initial;
}
std::string MemoryShadow::getName() const
{
return this->_initial->getName();
return this->_initial.getName();
}
Component MemoryShadow::getComponent() const
{
return this->_initial->getComponent();
return this->_initial.getComponent();
}
std::string MemoryShadow::getValueName(uint24_t addr) const
{
return this->_initial.getValueName(addr);
}
}