From 62432133e03c3b27f0b4872f20614567fdbb012a Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 9 Apr 2021 09:21:59 +0300 Subject: [PATCH] const'ify Platform::findOutput() --- src/platform.cpp | 4 ++-- src/platform.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/platform.cpp b/src/platform.cpp index 70f208c83c..7e2509da23 100644 --- a/src/platform.cpp +++ b/src/platform.cpp @@ -164,12 +164,12 @@ void Platform::requestOutputsChange(KWaylandServer::OutputConfigurationInterface config->setApplied(); } -AbstractOutput *Platform::findOutput(int screenId) +AbstractOutput *Platform::findOutput(int screenId) const { return enabledOutputs().value(screenId); } -AbstractOutput *Platform::findOutput(const QUuid &uuid) +AbstractOutput *Platform::findOutput(const QUuid &uuid) const { const auto outs = outputs(); auto it = std::find_if(outs.constBegin(), outs.constEnd(), diff --git a/src/platform.h b/src/platform.h index 1d78556476..569148b0f6 100644 --- a/src/platform.h +++ b/src/platform.h @@ -428,8 +428,8 @@ public: virtual Outputs enabledOutputs() const { return Outputs(); } - AbstractOutput *findOutput(int screenId); - AbstractOutput *findOutput(const QUuid &uuid); + AbstractOutput *findOutput(int screenId) const; + AbstractOutput *findOutput(const QUuid &uuid) const; /** * A string of information to include in kwin debug output