From 4e1bebf0f5e06ecdd99c41771e7b4ee19c0cdcf3 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Tue, 17 Nov 2020 20:02:14 +0100 Subject: Pass non-trivial/large function args by reference Fixes a bunch of `-Wclazy-function-args-by-ref` warnings. See https://github.com/KDE/clazy/blob/master/docs/checks/README-function-args-by-ref.md for details. Most of these changes are automated, using the clazy fixit by setting the `CLAZY_EXPORT_FIXES` before compilation and then running: $ mkdir /tmp/patch $ find ../src -iname "*.yaml" -exec mv {} /tmp/patch \; $ clang-apply-replacements /tmp/patch --- src/widget/wdisplay.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/widget/wdisplay.cpp') diff --git a/src/widget/wdisplay.cpp b/src/widget/wdisplay.cpp index 70d072709c..f2110bfcdd 100644 --- a/src/widget/wdisplay.cpp +++ b/src/widget/wdisplay.cpp @@ -98,9 +98,9 @@ void WDisplay::resetPositions() { m_disabledPixmaps.resize(0); } -void WDisplay::setPixmapBackground(PixmapSource source, - Paintable::DrawMode mode, - double scaleFactor) { +void WDisplay::setPixmapBackground(const PixmapSource& source, + Paintable::DrawMode mode, + double scaleFactor) { m_pPixmapBack = WPixmapStore::getPaintable(source, mode, scaleFactor); if (m_pPixmapBack.isNull() || m_pPixmapBack->isNull()) { qDebug() << metaObject()->className() -- cgit v1.2.3