diff --git a/idle_inhibition.h b/idle_inhibition.h --- a/idle_inhibition.h +++ b/idle_inhibition.h @@ -24,8 +24,6 @@ #include #include -#include - namespace KWayland { namespace Server @@ -54,7 +52,7 @@ return !m_idleInhibitors.isEmpty(); } bool isInhibited(AbstractClient *client) const { - return std::any_of(m_idleInhibitors.begin(), m_idleInhibitors.end(), [client] (auto c) { return c == client; }); + return m_idleInhibitors.contains(client); } private Q_SLOTS: diff --git a/idle_inhibition.cpp b/idle_inhibition.cpp --- a/idle_inhibition.cpp +++ b/idle_inhibition.cpp @@ -26,6 +26,7 @@ #include #include +#include #include using KWayland::Server::SurfaceInterface; @@ -82,7 +83,7 @@ void IdleInhibition::uninhibit(AbstractClient *client) { - auto it = std::find_if(m_idleInhibitors.begin(), m_idleInhibitors.end(), [client] (auto c) { return c == client; }); + auto it = std::find(m_idleInhibitors.begin(), m_idleInhibitors.end(), client); if (it == m_idleInhibitors.end()) { // not inhibited return;