Skip to content

Commit

Permalink
fix json correction manager
Browse files Browse the repository at this point in the history
  • Loading branch information
harrypuuter committed Jun 10, 2024
1 parent b166640 commit 0b2ed17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utility/CorrectionMananger.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ CorrectionManager::loadCompoundCorrection(const std::string &filePath,
std::unordered_map<
std::string,
std::shared_ptr<const correction::CompoundCorrection>>());
n_corrections++;
filePath_it = result.first;
}

Expand Down Expand Up @@ -103,11 +104,13 @@ const nlohmann::json *CorrectionManager::loadjson(const std::string &filePath){
std::ifstream json_file(filePath);
auto result = json_map.emplace(
filePath,
std::shared_ptr<nlohmann::json>(nlohmann::json::parse(json_file)));
std::make_shared<nlohmann::json>(nlohmann::json::parse(json_file)));
n_corrections++;
json_it = result.first;
}
return json_it->second.get();
}

/**
* @brief Report the number of corrections managed by the CorrectionManager
*/
Expand Down

0 comments on commit 0b2ed17

Please sign in to comment.