From 60836291f6949e731158c7c4695f672cb4d87f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Pereira?= Date: Tue, 2 Jun 2020 15:53:51 +0000 Subject: [PATCH] Use qAsConst It's available now and much easier to read. --- lib/Emulation.cpp | 2 +- lib/tools.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Emulation.cpp b/lib/Emulation.cpp index 10efe44..5313c42 100644 --- a/lib/Emulation.cpp +++ b/lib/Emulation.cpp @@ -133,7 +133,7 @@ void Emulation::setScreen(int n) if (_currentScreen != old) { // tell all windows onto this emulation to switch to the newly active screen - for(ScreenWindow* window : const_cast&>(_windows)) + for(ScreenWindow* window : qAsConst(_windows)) window->setScreen(_currentScreen); } } diff --git a/lib/tools.cpp b/lib/tools.cpp index 6ba2168..a24ac86 100644 --- a/lib/tools.cpp +++ b/lib/tools.cpp @@ -85,7 +85,7 @@ const QStringList get_color_schemes_dirs() rval << (QCoreApplication::applicationDirPath() + QLatin1String("/../Resources/color-schemes/")); } #endif - for (const QString& custom_dir : const_cast(custom_color_schemes_dirs)) + for (const QString& custom_dir : qAsConst(custom_color_schemes_dirs)) { d.setPath(custom_dir); if (d.exists())