move the shared TOML helpers into the utility namespace to avoid name collisions

This commit is contained in:
2026-08-04 18:05:52 +02:00
parent c8ff7da345
commit 61634f6fd2
10 changed files with 155 additions and 141 deletions

View File

@@ -13,6 +13,13 @@
// Shared TOML-parsing helpers used by two or more ConfigLoader per-domain
// loaders. Helpers used by exactly one domain stay local to that domain's
// .cpp file instead.
//
// Namespaced because the names are generic: VisualsLoader.cpp and
// BalancingConfig.cpp each have their own same-named helpers in anonymous
// namespaces, and unqualified globals here would form an overload set with
// them the moment either file includes this header.
namespace utility
{
// --- Error helpers ----------------------------------------------------------
@@ -59,3 +66,5 @@ std::vector<RecipeIngredient> parseIngredients(const toml::array& arr,
const std::string& path);
toml::table parseFile(const std::string& path, const std::string& file);
} // namespace utility