summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps/qdeclarativepolylinemapitem_p_p.h
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-27 23:24:20 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-28 16:53:24 +0200
commit46c9adfd30636a4b13f5b66bbe019e51033a5f0b (patch)
treee53a9cd098f3561c7fb6b0d5007e0df999a3fec7 /src/location/declarativemaps/qdeclarativepolylinemapitem_p_p.h
parentfc78a32507ccaa6c101dca2cc7a4d4061acea94f (diff)
downloadqtlocation-46c9adfd30636a4b13f5b66bbe019e51033a5f0b.tar.gz
Use 'const' correctly
Don't return or pass const copies, use either plain copies or const references. Make getters const, make variables const, and use qAsConst in ranged for loops to avoid detaches. Pick-to: 6.2 Change-Id: If1463cf7f0077c08dedb15388d912b652c2b037c Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qdeclarativepolylinemapitem_p_p.h')
-rw-r--r--src/location/declarativemaps/qdeclarativepolylinemapitem_p_p.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/location/declarativemaps/qdeclarativepolylinemapitem_p_p.h b/src/location/declarativemaps/qdeclarativepolylinemapitem_p_p.h
index 0ec2f4a5..0cad6682 100644
--- a/src/location/declarativemaps/qdeclarativepolylinemapitem_p_p.h
+++ b/src/location/declarativemaps/qdeclarativepolylinemapitem_p_p.h
@@ -178,7 +178,7 @@ public:
m_wrapOffset = wrapOffset;
}
- void setLineWidth(const float lw)
+ void setLineWidth(float lw)
{
m_lineWidth = lw;
}
@@ -415,7 +415,7 @@ public:
}
QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode) const override;
- void setMiter(const int m)
+ void setMiter(int m)
{
m_miter = m;
}
@@ -462,10 +462,10 @@ public:
~MapPolylineNodeOpenGLExtruded() override;
void update(const QColor &fillColor,
- const float lineWidth,
+ float lineWidth,
const QGeoMapPolylineGeometryOpenGL *shape,
- const QMatrix4x4 geoProjection,
- const QDoubleVector3D center,
+ const QMatrix4x4 &geoProjection,
+ const QDoubleVector3D &center,
const Qt::PenCapStyle capStyle = Qt::FlatCap,
bool closed = false,
unsigned int zoom = 30);