Skip to content

Commit

Permalink
Delete copy constructor of core_configuration::details::delete
Browse files Browse the repository at this point in the history
  • Loading branch information
tekezo committed Jun 11, 2024
1 parent 0dc5af9 commit 22f05ff
Show file tree
Hide file tree
Showing 7 changed files with 256 additions and 248 deletions.
12 changes: 10 additions & 2 deletions src/share/core_configuration/configuration_json_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,17 @@ class array_t final : public base_t {
}

void update_value(const nlohmann::json& json) override {
if (auto v = pqrs::json::find_array(json, key_)) {
for (const auto& j : v->value()) {
if (!json.contains(key_)) {
return;
}

pqrs::json::requires_array(json[key_], "`" + key_ + "`");

for (const auto& j : json[key_]) {
try {
value_.push_back(std::make_unique<T>(j));
} catch (const pqrs::json::unmarshal_error& e) {
throw pqrs::json::unmarshal_error(fmt::format("`{0}` entry error: {1}", key_, e.what()));
}
}
}
Expand Down
Loading

0 comments on commit 22f05ff

Please sign in to comment.