fix: tidy statics, instance, stretch43, fill/find_if ranges, NOLINT externs
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user