fix: tidy statics, instance, stretch43, fill/find_if ranges, NOLINT externs

This commit is contained in:
2026-05-16 15:17:38 +02:00
parent ae359f4a1e
commit b984e6041e
15 changed files with 77 additions and 74 deletions
+2 -2
View File
@@ -112,7 +112,7 @@ auto Jf::getConfigValue(const char* key) -> const char* {
if (config.empty()) {
loadConfigValues();
}
const auto IT = std::find_if(config.begin(), config.end(), [key](const Keyvalue& pair) { return pair.key == key; });
const auto IT = std::ranges::find_if(config, [key](const Keyvalue& pair) { return pair.key == key; });
if (IT != config.end()) {
thread_local std::string value_cache_;
value_cache_ = IT->value;
@@ -125,7 +125,7 @@ void Jf::setConfigValue(const char* key, const char* value) {
if (config.empty()) {
loadConfigValues();
}
const auto IT = std::find_if(config.begin(), config.end(), [key](const Keyvalue& pair) { return pair.key == key; });
const auto IT = std::ranges::find_if(config, [key](const Keyvalue& pair) { return pair.key == key; });
if (IT != config.end()) {
IT->value = value;
saveConfigValues();