mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-03 09:29:50 +00:00
b70f24a581
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
15 lines
317 B
C++
15 lines
317 B
C++
#include "stdafx.h"
|
|
#include "ram_t.h"
|
|
|
|
void ram_t::add(byte_t byte) {
|
|
assert(m_bytes.capacity() >= (m_bytes.size() + 1));
|
|
m_bytes.push_back(byte);
|
|
}
|
|
|
|
ram_t::ram_t(simdjson::dom::array input) {
|
|
assert(m_bytes.empty());
|
|
m_bytes.reserve(input.size());
|
|
for (auto entry : input)
|
|
add(entry);
|
|
}
|