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

@@ -3,17 +3,16 @@
//
#include "RectangleShadow.hpp"
#include <utility>
#include <iostream>
namespace ComSquare::Memory
{
RectangleShadow::RectangleShadow(std::shared_ptr<IMemory> initial,
RectangleShadow::RectangleShadow(IMemory &initial,
uint8_t startBank,
uint8_t endBank,
uint16_t startPage,
uint16_t endPage)
: _initial(std::move(initial))
: _initial(initial)
{
this->setMemoryRegion(startBank, endBank, startPage, endPage);
}
@@ -26,42 +25,36 @@ namespace ComSquare::Memory
uint8_t RectangleShadow::read(uint24_t addr)
{
return this->_initial->read(addr);
return this->_initial.read(addr);
}
void RectangleShadow::write(uint24_t addr, uint8_t data)
{
return this->_initial->write(addr, data);
return this->_initial.write(addr, data);
}
RectangleShadow *RectangleShadow::setBankOffset(int bankOffset)
void RectangleShadow::setBankOffset(int bankOffset)
{
this->_bankOffset = bankOffset;
return this;
}
uint24_t RectangleShadow::getSize() const
{
return this->_initial->getSize();
return this->_initial.getSize();
}
bool RectangleShadow::isMirror() const
{
return true;
}
std::shared_ptr<IMemory> RectangleShadow::getMirrored() const
IMemory &RectangleShadow::getMirrored() const
{
return this->_initial;
}
std::string RectangleShadow::getName() const
{
return this->_initial->getName();
return this->_initial.getName();
}
Component RectangleShadow::getComponent() const
{
return this->_initial->getComponent();
return this->_initial.getComponent();
}
}