summaryrefslogtreecommitdiff
path: root/src/positioning
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-06-24 11:57:21 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-06-25 10:11:24 +0200
commitffee803f1099f85082a152791a7a3b261947a751 (patch)
tree307766f137312bad751a9c35bd3281d1772568ac /src/positioning
parent3794e0c252a8e7a0288d3fb74dde6f5fdc09950d (diff)
downloadqtlocation-ffee803f1099f85082a152791a7a3b261947a751.tar.gz
Use QList instead of QVector
Task-number: QTBUG-84469 Change-Id: Iefd2fb627602ef4744d80858eee72a089ef5f4ec Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/positioning')
-rw-r--r--src/positioning/qgeopath.cpp4
-rw-r--r--src/positioning/qgeopath_p.h24
-rw-r--r--src/positioning/qgeopolygon.cpp2
-rw-r--r--src/positioning/qgeopolygon_p.h2
4 files changed, 12 insertions, 20 deletions
diff --git a/src/positioning/qgeopath.cpp b/src/positioning/qgeopath.cpp
index b6513bc7..01e41ab2 100644
--- a/src/positioning/qgeopath.cpp
+++ b/src/positioning/qgeopath.cpp
@@ -587,7 +587,7 @@ bool QGeoPathPrivate::containsCoordinate(const QGeoCoordinate &coordinate) const
void QGeoPathPrivate::translate(double degreesLatitude, double degreesLongitude)
{
// Need min/maxLati, so update bbox
- QVector<double> m_deltaXs;
+ QList<double> m_deltaXs;
double m_minX, m_maxX, m_minLati, m_maxLati;
m_bboxDirty = false;
computeBBox(m_path, m_deltaXs, m_minX, m_maxX, m_minLati, m_maxLati, m_bbox);
@@ -671,7 +671,7 @@ void QGeoPathPrivate::markDirty()
void QGeoPathPrivate::computeBoundingBox()
{
- QVector<double> m_deltaXs;
+ QList<double> m_deltaXs;
double m_minX, m_maxX, m_minLati, m_maxLati;
m_bboxDirty = false;
computeBBox(m_path, m_deltaXs, m_minX, m_maxX, m_minLati, m_maxLati, m_bbox);
diff --git a/src/positioning/qgeopath_p.h b/src/positioning/qgeopath_p.h
index 6dd17b09..152b8e40 100644
--- a/src/positioning/qgeopath_p.h
+++ b/src/positioning/qgeopath_p.h
@@ -56,17 +56,13 @@
#include "qgeocoordinate.h"
#include "qlocationutils_p.h"
#include <QtPositioning/qgeopath.h>
-#include <QtCore/QVector>
+#include <QtCore/QList>
QT_BEGIN_NAMESPACE
-inline static void computeBBox( const QList<QGeoCoordinate> &m_path,
- QVector<double> &m_deltaXs,
- double &m_minX,
- double &m_maxX,
- double &m_minLati,
- double &m_maxLati,
- QGeoRectangle &m_bbox)
+inline static void computeBBox(const QList<QGeoCoordinate> &m_path, QList<double> &m_deltaXs,
+ double &m_minX, double &m_maxX, double &m_minLati, double &m_maxLati,
+ QGeoRectangle &m_bbox)
{
if (m_path.isEmpty()) {
m_deltaXs.clear();
@@ -116,13 +112,9 @@ inline static void computeBBox( const QList<QGeoCoordinate> &m_path,
QGeoCoordinate(m_minLati, m_path.at(maxId).longitude()));
}
-inline static void updateBBox( const QList<QGeoCoordinate> &m_path,
- QVector<double> &m_deltaXs,
- double &m_minX,
- double &m_maxX,
- double &m_minLati,
- double &m_maxLati,
- QGeoRectangle &m_bbox)
+inline static void updateBBox(const QList<QGeoCoordinate> &m_path, QList<double> &m_deltaXs,
+ double &m_minX, double &m_maxX, double &m_minLati, double &m_maxLati,
+ QGeoRectangle &m_bbox)
{
if (m_path.isEmpty()) {
m_deltaXs.clear();
@@ -244,7 +236,7 @@ public:
void updateBoundingBox();
// data members
- QVector<double> m_deltaXs; // longitude deltas from m_path[0]
+ QList<double> m_deltaXs; // longitude deltas from m_path[0]
double m_minX = 0; // minimum value inside deltaXs
double m_maxX = 0; // maximum value inside deltaXs
double m_minLati = 0; // minimum latitude. paths do not wrap around through the poles
diff --git a/src/positioning/qgeopolygon.cpp b/src/positioning/qgeopolygon.cpp
index 7d8a0ce0..e44c1f9e 100644
--- a/src/positioning/qgeopolygon.cpp
+++ b/src/positioning/qgeopolygon.cpp
@@ -553,7 +553,7 @@ inline static void translatePoly( QList<QGeoCoordinate> &m_path,
void QGeoPolygonPrivate::translate(double degreesLatitude, double degreesLongitude)
{
// Need min/maxLati, so update bbox
- QVector<double> m_deltaXs;
+ QList<double> m_deltaXs;
double m_minX, m_maxX, m_minLati, m_maxLati;
m_bboxDirty = false; // Updated in translatePoly
computeBBox(m_path, m_deltaXs, m_minX, m_maxX, m_minLati, m_maxLati, m_bbox);
diff --git a/src/positioning/qgeopolygon_p.h b/src/positioning/qgeopolygon_p.h
index 880a2784..7b633496 100644
--- a/src/positioning/qgeopolygon_p.h
+++ b/src/positioning/qgeopolygon_p.h
@@ -111,7 +111,7 @@ public:
void updateBoundingBox();
// data members
- QVector<double> m_deltaXs; // longitude deltas from m_path[0]
+ QList<double> m_deltaXs; // longitude deltas from m_path[0]
double m_minX = 0; // minimum value inside deltaXs
double m_maxX = 0; // maximum value inside deltaXs
double m_minLati = 0; // minimum latitude. paths do not wrap around through the poles