diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-07-16 22:17:47 +0100 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2015-07-19 10:46:53 +0000 |
commit | 1236b1827c2d292c665ee7ef121dccae70f0429b (patch) | |
tree | 08799da31893f5480fb383ba9599fdcd1e6e8130 /src/gui/painting | |
parent | aa2efdfa97dd6f67d2a8b28debd7000097f10a73 (diff) |
QtGui: Pass types with copy-ctor or dtor by const-ref
... except if the function is a ctor, callers pass rvalues,
and the type has a fast move ctor. In that case, keep passing
by-value and qMove() into place.
Change-Id: I2c0be7d4436327834ddee0531c51c5af352ac74c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index f55dddfb6a..28a6276746 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -4132,7 +4132,7 @@ class QGradientCache struct CacheInfo { inline CacheInfo(QGradientStops s, int op, QGradient::InterpolationMode mode) : - stops(s), opacity(op), interpolationMode(mode) {} + stops(qMove(s)), opacity(op), interpolationMode(mode) {} QRgba64 buffer[GRADIENT_STOPTABLE_SIZE]; QGradientStops stops; int opacity; |