|
@@ -57,7 +57,7 @@ bool KindConfig::hasKey(std::string key) const
|
|
|
auto it = settings.find(key);
|
|
|
bool found = it != settings.end();
|
|
|
if (found)
|
|
|
- used[key]=true;
|
|
|
+ used[key] = true;
|
|
|
return found;
|
|
|
}
|
|
|
|
|
@@ -67,7 +67,7 @@ std::string KindConfig::getString(std::string key) const
|
|
|
auto it = settings.find(key);
|
|
|
if (it == settings.end())
|
|
|
throw Exception("get config key", std::string("No key \"") + key + "\"");
|
|
|
- used[key]=true;
|
|
|
+ used[key] = true;
|
|
|
if (it->second.size() != 1)
|
|
|
throw Exception("get config key", std::string("Key \"") + key + "\" is no single value");
|
|
|
return it->second[0];
|
|
@@ -79,7 +79,7 @@ Strings KindConfig::getStrings(std::string key) const
|
|
|
auto it = settings.find(key);
|
|
|
if (it == settings.end())
|
|
|
throw Exception("get config key", std::string("No key \"") + key + "\"");
|
|
|
- used[key]=true;
|
|
|
+ used[key] = true;
|
|
|
return it->second;
|
|
|
}
|
|
|
|
|
@@ -89,7 +89,7 @@ bool KindConfig::getBool(std::string key) const
|
|
|
auto it = settings.find(key);
|
|
|
if (it == settings.end())
|
|
|
return false;
|
|
|
- used[key]=true;
|
|
|
+ used[key] = true;
|
|
|
if (it->second.size() != 1)
|
|
|
throw Exception("get config key", std::string("Key \"") + key + "\" is no single value");
|
|
|
std::string val = it->second[0];
|
|
@@ -119,7 +119,7 @@ void KindConfig::warnUnused(const string& prefix) const
|
|
|
for (auto it = settings.begin(); it != settings.end(); ++it)
|
|
|
{
|
|
|
if (used.count(it->first) == 0 || ! used[it->first])
|
|
|
- cout << "Warning: setting " << it->first << " unused" << endl;
|
|
|
+ cout << "Warning: setting " << it->first << " unused" << endl;
|
|
|
}
|
|
|
}
|
|
|
|