mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-07 20:31:16 +00:00
0deb37ab19
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
18 lines
411 B
C++
18 lines
411 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
#include "simdjson/simdjson.h"
|
|
|
|
class byte_t final {
|
|
private:
|
|
const simdjson::dom::array m_raw;
|
|
|
|
public:
|
|
byte_t(simdjson::dom::element input) noexcept;
|
|
byte_t(simdjson::dom::array input) noexcept;
|
|
|
|
[[nodiscard]] auto address() const noexcept { return (uint16_t)(int64_t)m_raw.at(0); }
|
|
[[nodiscard]] auto value() const noexcept { return (uint8_t)(int64_t)m_raw.at(1); }
|
|
};
|