Skip to content

Commit

Permalink
Adopt to changes in reflect-cpp library
Browse files Browse the repository at this point in the history
  • Loading branch information
Kicer86 committed Aug 26, 2024
1 parent 65081b1 commit 793ec61
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/json_serializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ namespace JSon

const auto objView = rfl::to_view(obj);

const auto process = [&jsonObj]<class... F>(F... _field) {
const auto process = [&jsonObj]<typename... F>(F... _field) {
(( jsonObj[QString::fromStdString(typename F::Name().str())] = getSerialized(*_field.value()) ), ...);
};

std::apply(process, objView.fields());
rfl::apply(process, objView.fields());

return jsonObj;
}
Expand Down Expand Up @@ -143,11 +143,11 @@ namespace JSon
const QJsonObject jsonObj = convertTo<QJsonObject>(json);
auto objView = rfl::to_view(r);

const auto process = [&jsonObj]<class... F>(F... _field) {
const auto process = [&jsonObj]<typename... F>(F... _field) {
(( *_field.value() = getDeserialized<std::remove_pointer_t<typename F::Type>>(jsonObj[QString::fromStdString(typename F::Name().str())]) ), ...);
};

std::apply(process, objView.fields());
rfl::apply(process, objView.fields());
}

return r;
Expand Down

0 comments on commit 793ec61

Please sign in to comment.