EightBit/M6502/HarteTest_6502/cycles_t.cpp
Adrian Conlon e9df345577 More simplifications and faster yet!
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-22 10:51:36 +01:00

19 lines
417 B
C++

#include "stdafx.h"
#include "cycles_t.h"
cycles_t::cycles_t(size_t reserved) {
m_cycles.reserve(reserved);
}
void cycles_t::add(const cycle_t& cycle) {
assert(m_cycles.capacity() >= (m_cycles.size() + 1));
m_cycles.push_back(cycle);
}
cycles_t::cycles_t(simdjson::dom::array input) {
assert(m_cycles.empty());
m_cycles.reserve(input.size());
for (auto entry : input)
add(entry);
}