diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-02-08 16:05:44 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-02-08 20:22:25 +0000 |
commit | 3ff5f198da705493bf1a31cd02e63667c66d6ec7 (patch) | |
tree | f64d503a37367b0fc2d7d200cb32615448dcab2d | |
parent | 35f736423f11f1713c62ffb6f84d029636ba4553 (diff) |
Remove duplicated constant
It causes clashes in CMake Unity (Jumbo) builds.
Task-number: QTBUG-109394
Change-Id: If92cb5db7eb0e7ffe39b644f1907266ba44a6d3c
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 89485a4ecaa92a74722d6d4ae25b40510624017c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/positioning/qgeopath.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/positioning/qgeopath.cpp b/src/positioning/qgeopath.cpp index d6dc7ef9..795f6f9b 100644 --- a/src/positioning/qgeopath.cpp +++ b/src/positioning/qgeopath.cpp @@ -16,7 +16,6 @@ QT_BEGIN_NAMESPACE QT_IMPL_METATYPE_EXTERN(QGeoPath) -constexpr int kMaxInt = std::numeric_limits<int>::max(); constexpr auto kWarningString = u"The path has more elements than fit into an int. " "This can cause errors while querying elements from QML"; @@ -249,7 +248,7 @@ qsizetype QGeoPath::size() const { Q_D(const QGeoPath); const qsizetype result = d->size(); - if (result > kMaxInt) + if (result > std::numeric_limits<int>::max()) qWarning() << kWarningString; return result; } @@ -261,7 +260,7 @@ void QGeoPath::addCoordinate(const QGeoCoordinate &coordinate) { Q_D(QGeoPath); d->addCoordinate(coordinate); - if (d->size() > kMaxInt) + if (d->size() > std::numeric_limits<int>::max()) qWarning() << kWarningString; } |