cleanup: Replace find() with C++20 starts_with(), ends_with() and contains() (#3572)

* Replace find() with C++20 starts_with() and ends_with()

* Replace find() with C++20 contains()
This commit is contained in:
Philip Damianik 2023-10-15 20:07:23 +02:00 committed by GitHub
parent 43b39e0bc6
commit 442209942f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 120 additions and 122 deletions

View file

@ -153,7 +153,7 @@ APICALL bool HyprlandAPI::addConfigValue(HANDLE handle, const std::string& name,
if (!PLUGIN)
return false;
if (name.find("plugin:") != 0)
if (!name.starts_with("plugin:"))
return false;
g_pConfigManager->addPluginConfigVar(handle, name, value);