adress cppcheck complaint
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
#include <JsonSettingsIO.h>
|
#include <JsonSettingsIO.h>
|
||||||
#include <Logging.h>
|
#include <Logging.h>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
@@ -16,12 +17,7 @@ namespace {
|
|||||||
constexpr char OPDS_FILE_JSON[] = "/.crosspoint/opds.json";
|
constexpr char OPDS_FILE_JSON[] = "/.crosspoint/opds.json";
|
||||||
|
|
||||||
bool containsWhitespace(const std::string& value) {
|
bool containsWhitespace(const std::string& value) {
|
||||||
for (const unsigned char ch : value) {
|
return std::any_of(value.begin(), value.end(), [](unsigned char ch) { return std::isspace(ch); });
|
||||||
if (std::isspace(ch)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user