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:
parent
43b39e0bc6
commit
442209942f
14 changed files with 120 additions and 122 deletions
|
|
@ -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)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue