summaryrefslogtreecommitdiff
path: root/modules/codec-json/c++
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2024-04-17 15:03:09 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2024-04-17 15:03:09 +0200
commitc1572ff1c275145208333e3e69c29c569689e51b (patch)
tree8c063016008ceac98a926bda5487794f710e3eeb /modules/codec-json/c++
parent1a2299a70280867b93fde4050833d4bd2b419884 (diff)
Moved to platform description in structs
Diffstat (limited to 'modules/codec-json/c++')
-rw-r--r--modules/codec-json/c++/json.tmpl.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/codec-json/c++/json.tmpl.hpp b/modules/codec-json/c++/json.tmpl.hpp
index e8226f9..0a9f53d 100644
--- a/modules/codec-json/c++/json.tmpl.hpp
+++ b/modules/codec-json/c++/json.tmpl.hpp
@@ -773,7 +773,7 @@ struct json_decode<schema::Array<T,D>, ToDecode> {
using Schema = schema::Array<T,D>;
template<size_t Level>
- static error_or<void> decode_flat_level(buffer_view& buff, std::vector<data<T, encode::Native>>& to, std::array<std::size_t, D>& index, std::array<std::size_t, D>& dims, bool log_dim){
+ static error_or<void> decode_flat_level(buffer_view& buff, std::vector<data<T, encode::Native<rmt::Host>>>& to, std::array<std::size_t, D>& index, std::array<std::size_t, D>& dims, bool log_dim){
if constexpr (Level == D) {
json_helper::skip_whitespace(buff);
try {
@@ -830,7 +830,7 @@ struct json_decode<schema::Array<T,D>, ToDecode> {
}
template<std::size_t Level>
- static error_or<void> decode_unflat_level(std::vector<data<T,encode::Native>>& flat, data<schema::Array<T,D>, ToDecode>& to, std::array<std::size_t, D>& index, std::size_t& flat_index) {
+ static error_or<void> decode_unflat_level(std::vector<data<T,encode::Native<rmt::Host>>>& flat, data<schema::Array<T,D>, ToDecode>& to, std::array<std::size_t, D>& index, std::size_t& flat_index) {
if constexpr ( Level == D ){
auto& flat_data = flat.at(flat_index);
to.at(index) = std::move(flat_data);
@@ -852,7 +852,7 @@ struct json_decode<schema::Array<T,D>, ToDecode> {
std::array<std::size_t, D> index;
std::array<std::size_t, D> dims;
std::fill(dims.begin(), dims.end(), 0);
- std::vector<data<T,encode::Native>> flat_array;
+ std::vector<data<T,encode::Native<rmt::Host>>> flat_array;
auto eov = decode_flat_level<0>(buff, flat_array, index, dims, true);
if(eov.is_error()){
return eov;