summaryrefslogtreecommitdiff
path: root/src/codec-json/json.h
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2023-06-20 09:05:08 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2023-06-20 09:05:08 +0200
commitf5629bf0da55ebaaddc5cf551c36ed7362dc54b5 (patch)
tree4a318cc4e4ee2ff4046958ca13d6798856f71aa2 /src/codec-json/json.h
parent777b7490470c9f1328abe8d0f83bedda8f02593d (diff)
c++: Adding tests and working around some constness problems
Diffstat (limited to 'src/codec-json/json.h')
-rw-r--r--src/codec-json/json.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/codec-json/json.h b/src/codec-json/json.h
index f547e54..58b64aa 100644
--- a/src/codec-json/json.h
+++ b/src/codec-json/json.h
@@ -24,6 +24,10 @@ public:
return buffer_;
}
+ const buffer& get_buffer() const {
+ return buffer_;
+ }
+
error push(uint8_t val){
return buffer_.push(val);
}
@@ -86,7 +90,9 @@ public:
}
template <typename ToEncoding>
- error_or<void> decode(const data<Schema, encode::Json>& from_decode, data<Schema, ToEncoding>& to_decode){
+ error_or<void> decode(data<Schema, encode::Json>& from_decode, data<Schema, ToEncoding>& to_decode){
+ buffer_view buff_v{from_decode.get_buffer()};
+
return void_t {};
}
};