diff options
| author | Philip Damianik <39028343+pdamianik@users.noreply.github.com> | 2023-10-15 20:07:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-15 19:07:23 +0100 |
| commit | 442209942fdedbdded6362cafed736c327da0e1c (patch) | |
| tree | 8e8b257bc9656f5364be9f56509b8bbdd88b1cdd /src/helpers/Workspace.cpp | |
| parent | 43b39e0bc6a83ce190ff09054beb713e0431f19b (diff) | |
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()
Diffstat (limited to 'src/helpers/Workspace.cpp')
| -rw-r--r-- | src/helpers/Workspace.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers/Workspace.cpp b/src/helpers/Workspace.cpp index 51d29e5e..3264b27f 100644 --- a/src/helpers/Workspace.cpp +++ b/src/helpers/Workspace.cpp @@ -40,7 +40,7 @@ CWorkspace::~CWorkspace() { void CWorkspace::startAnim(bool in, bool left, bool instant) { const auto ANIMSTYLE = m_fAlpha.m_pConfig->pValues->internalStyle; - if (ANIMSTYLE.find("slidefade") == 0) { + if (ANIMSTYLE.starts_with("slidefade")) { const auto PMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID); float movePerc = 100.f; @@ -54,7 +54,7 @@ void CWorkspace::startAnim(bool in, bool left, bool instant) { m_fAlpha.setValueAndWarp(1.f); m_vRenderOffset.setValueAndWarp(Vector2D(0, 0)); - if (ANIMSTYLE.find("slidefadevert") == 0) { + if (ANIMSTYLE.starts_with("slidefadevert")) { if (in) { m_fAlpha.setValueAndWarp(0.f); m_vRenderOffset.setValueAndWarp(Vector2D(0, (left ? PMONITOR->vecSize.y : -PMONITOR->vecSize.y) * (movePerc / 100.f))); |
