adress cppcheck complaint

This commit is contained in:
jpirnay
2026-04-23 19:45:38 +02:00
parent 6053ef4756
commit a2f31f06e7
+2 -6
View File
@@ -4,6 +4,7 @@
#include <JsonSettingsIO.h>
#include <Logging.h>
#include <algorithm>
#include <cctype>
#include <cstring>
@@ -16,12 +17,7 @@ namespace {
constexpr char OPDS_FILE_JSON[] = "/.crosspoint/opds.json";
bool containsWhitespace(const std::string& value) {
for (const unsigned char ch : value) {
if (std::isspace(ch)) {
return true;
}
}
return false;
return std::any_of(value.begin(), value.end(), [](unsigned char ch) { return std::isspace(ch); });
}
} // namespace