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/opengl | |
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/opengl')
-rw-r--r-- | src/gui/opengl/qopenglgradientcache_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/opengl/qopenglgradientcache_p.h b/src/gui/opengl/qopenglgradientcache_p.h index 61949d5b7c..f2cc082250 100644 --- a/src/gui/opengl/qopenglgradientcache_p.h +++ b/src/gui/opengl/qopenglgradientcache_p.h @@ -59,7 +59,7 @@ class QOpenGL2GradientCache : public QOpenGLSharedResource struct CacheInfo { inline CacheInfo(QGradientStops s, qreal op, QGradient::InterpolationMode mode) : - stops(s), opacity(op), interpolationMode(mode) {} + stops(qMove(s)), opacity(op), interpolationMode(mode) {} GLuint texId; QGradientStops stops; |