summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-06 16:50:11 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-06 16:50:11 +0200
commitf9756d10d4d1c5ea7737cf3a237b1f966d6b7a01 (patch)
treec88df1366e9af3097edd2025494564ea92e0cb2a /src/config/ConfigManager.cpp
parent0d7a8cca790e8fa71a83e4dce09fbe5a0af38cbc (diff)
changed C++ std to C++23, use std::string::contains
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index ee8ab95e..ded23733 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -356,7 +356,7 @@ void CConfigManager::handleMonitor(const std::string& command, const std::string
newrule.resolution.x = stoi(curitem.substr(0, curitem.find_first_of('x')));
newrule.resolution.y = stoi(curitem.substr(curitem.find_first_of('x') + 1, curitem.find_first_of('@')));
- if (curitem.find_first_of('@') != std::string::npos)
+ if (curitem.contains("@"))
newrule.refreshRate = stof(curitem.substr(curitem.find_first_of('@') + 1));
nextItem();
@@ -722,7 +722,7 @@ void CConfigManager::parseLine(std::string& line) {
line = line.substr(1);
}
- if (line.find(" {") != std::string::npos) {
+ if (line.contains(" {")) {
auto cat = line.substr(0, line.find(" {"));
transform(cat.begin(), cat.end(), cat.begin(), ::tolower);
if (currentCategory.length() != 0) {
@@ -736,7 +736,7 @@ void CConfigManager::parseLine(std::string& line) {
return;
}
- if (line.find("}") != std::string::npos && currentCategory != "") {
+ if (line.contains("}") && currentCategory != "") {
currentCategory = "";
return;
}