mirror of
https://github.com/cmosher01/v6502cpp.git
synced 2026-01-23 05:16:05 +00:00
refactor: add Cpu6502Helper; extract Common
This commit is contained in:
@@ -6,10 +6,15 @@
|
||||
*/
|
||||
|
||||
#include "SegmentCache.h"
|
||||
#include "Common.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
SegmentCache::~SegmentCache() {
|
||||
delete this->c;
|
||||
}
|
||||
|
||||
Segment* SegmentCache::getOrAdd(const std::string& id) {
|
||||
if (this->cache.find(id) == this->cache.end()) {
|
||||
this->cache[id] = std::make_shared<Segment>(id);
|
||||
@@ -95,7 +100,7 @@ void SegmentCache::setDataSegs(const unsigned char data) {
|
||||
this->c->DB7->set(x & 1);
|
||||
}
|
||||
|
||||
void SegmentCache::addDataToRecalc(setpSeg& s) {
|
||||
void SegmentCache::addDataToRecalc(setpSeg& s) const {
|
||||
s.insert(this->c->DB0);
|
||||
s.insert(this->c->DB1);
|
||||
s.insert(this->c->DB2);
|
||||
|
||||
Reference in New Issue
Block a user