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/managers/input/Swipe.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/managers/input/Swipe.cpp')
| -rw-r--r-- | src/managers/input/Swipe.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/input/Swipe.cpp b/src/managers/input/Swipe.cpp index ebed67cd..360397eb 100644 --- a/src/managers/input/Swipe.cpp +++ b/src/managers/input/Swipe.cpp @@ -51,7 +51,7 @@ void CInputManager::onSwipeEnd(wlr_pointer_swipe_end_event* e) { static auto* const PSWIPENUMBER = &g_pConfigManager->getConfigValuePtr("gestures:workspace_swipe_numbered")->intValue; static auto* const PSWIPEUSER = &g_pConfigManager->getConfigValuePtr("gestures:workspace_swipe_use_r")->intValue; const bool VERTANIMS = m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.getConfig()->pValues->internalStyle == "slidevert" || - m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.getConfig()->pValues->internalStyle.find("slidefadevert") == 0; + m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.getConfig()->pValues->internalStyle.starts_with("slidefadevert"); // commit std::string wsname = ""; @@ -200,7 +200,7 @@ void CInputManager::onSwipeUpdate(wlr_pointer_swipe_update_event* e) { static auto* const PSWIPEUSER = &g_pConfigManager->getConfigValuePtr("gestures:workspace_swipe_use_r")->intValue; const bool VERTANIMS = m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.getConfig()->pValues->internalStyle == "slidevert" || - m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.getConfig()->pValues->internalStyle.find("slidefadevert") == 0; + m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.getConfig()->pValues->internalStyle.starts_with("slidefadevert"); m_sActiveSwipe.delta += VERTANIMS ? (*PSWIPEINVR ? -e->dy : e->dy) : (*PSWIPEINVR ? -e->dx : e->dx); |
