From f9756d10d4d1c5ea7737cf3a237b1f966d6b7a01 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 6 Jul 2022 16:50:11 +0200 Subject: changed C++ std to C++23, use std::string::contains --- src/config/ConfigManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/config/ConfigManager.cpp') 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; } -- cgit v1.2.3