diff options
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); } }; |