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/wpushbutton.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/widget/wpushbutton.h') diff --git a/src/widget/wpushbutton.h b/src/widget/wpushbutton.h index ac5f6ef525..6393ea5710 100644 --- a/src/widget/wpushbutton.h +++ b/src/widget/wpushbutton.h @@ -95,13 +95,16 @@ class WPushButton : public WWidget { virtual void restyleAndRepaint(); // Associates a pixmap of a given state of the button with the widget - void setPixmap(int iState, bool bPressed, PixmapSource source, - Paintable::DrawMode mode, double scaleFactor); + void setPixmap(int iState, + bool bPressed, + const PixmapSource& source, + Paintable::DrawMode mode, + double scaleFactor); // Associates a background pixmap with the widget. This is only needed if // the button pixmaps contains alpha channel values. void setPixmapBackground( - PixmapSource source, + const PixmapSource& source, Paintable::DrawMode mode, double scaleFactor); -- cgit v1.2.3