Skip to content
Snippets Groups Projects
Commit 00f4f55c authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Try again with restore strip bug

parent e3e408d7
No related branches found
No related tags found
1 merge request!316Resolves #343 GUI and Frame Refactor
Pipeline #28344 passed
......@@ -657,19 +657,16 @@ Configurable *ftl::config::configure(ftl::config::json_t &cfg) {
// Remove all $ keys from json
static void stripJSON(nlohmann::json &j) {
auto items = j.items();
for(auto i=items.begin(); i != items.end(); ) {
auto &el = *i;
if (el.key()[0] == '$') {
++i;
j.erase(el.key());
for (auto i=j.begin(); i != j.end(); ) {
if (i.key()[0] == '$') {
i = j.erase(i);
continue;
}
if (el.value().is_structured()) {
stripJSON(el.value());
if ((*i).is_structured()) {
stripJSON(*i);
}
++i;
}
}
}
static std::atomic_bool doing_cleanup = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment