diff options
author | Claudius Holeksa <mail@keldu.de> | 2023-06-07 20:40:33 +0200 |
---|---|---|
committer | Claudius Holeksa <mail@keldu.de> | 2023-06-07 20:40:33 +0200 |
commit | b670001ca80dbc0e1a51b4a08776eb41dabc2a9e (patch) | |
tree | 7d71dcfbc6eabc51ce551b71191a80727e58e2b2 /src/codec-json/json.h | |
parent | 07fd10c0584c7f0827dfd3ff8319e4cb174e5973 (diff) |
codec-json,c++: Progress on design issues
Diffstat (limited to 'src/codec-json/json.h')
-rw-r--r-- | src/codec-json/json.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/codec-json/json.h b/src/codec-json/json.h index 0ba7a2d..2a0bea9 100644 --- a/src/codec-json/json.h +++ b/src/codec-json/json.h @@ -4,6 +4,8 @@ #include <forstio/core/common.h> #include <forstio/codec/data.h> +#include "json.tmpl.h" + #include <algorithm> namespace saw { @@ -18,23 +20,15 @@ private: public: data() = default; - void reserve(std::size_t i){ - buffer_.reserve(i); - } - - void concat(int8_t c){ - buffer_.emplace_back(c); - } - std::size_t get_size() const { return buffer_.size(); } - int8_t& at(std::size_t i){ + uint8_t& at(std::size_t i){ return buffer_.at(i); } - const int8_t& at(std::size_t i) const { + const uint8_t& at(std::size_t i) const { return buffer_.at(i); } }; |