mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-11-20 08:32:00 +00:00
e9df345577
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
19 lines
417 B
C++
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);
|
|
}
|