Elevated Commands Redesign (#1123)

This commit is contained in:
Chase Payne
2023-04-29 00:22:01 -05:00
committed by GitHub
parent 18ab7dcf6c
commit 430a439698
17 changed files with 568 additions and 425 deletions

View File

@@ -816,12 +816,14 @@ namespace config {
boost::property_tree::read_json(jsonStream, jsonTree);
for (auto &[_, prep_cmd] : jsonTree.get_child("prep_cmd"s)) {
auto do_cmd = prep_cmd.get<std::string>("do"s);
auto undo_cmd = prep_cmd.get<std::string>("undo"s);
auto do_cmd = prep_cmd.get_optional<std::string>("do"s);
auto undo_cmd = prep_cmd.get_optional<std::string>("undo"s);
auto elevated = prep_cmd.get_optional<bool>("elevated"s);
input.emplace_back(
std::move(do_cmd),
std::move(undo_cmd));
std::move(do_cmd.value_or("")),
std::move(undo_cmd.value_or("")),
std::move(elevated.value_or(false)));
}
}