Change the global config variable to a globalConfig() function.

This commit is contained in:
dg
2023-05-10 22:07:17 +00:00
parent 24ff51274b
commit 9ba3f90f1e
43 changed files with 297 additions and 240 deletions

View File

@@ -19,8 +19,9 @@ static std::string cleanup(const std::string& s)
static void load_config(const std::string s)
{
config.Clear();
if (!google::protobuf::TextFormat::MergeFromString(cleanup(s), &config))
globalConfig().Clear();
if (!google::protobuf::TextFormat::MergeFromString(
cleanup(s), &globalConfig()))
error("couldn't load test config");
}