From 9adea01c409ad805eff74ead88876599c2994633 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 14 Jan 2022 07:15:02 +0100 Subject: constructRoute: remove segmentPathLengthCount It was causing a (fatal) warning: error: variable 'segmentPathLengthCount' set but not used [-Werror,-Wunused-but-set-variable] Change-Id: Ia6ce5861539f878c307630182eb671c442d14a62 Reviewed-by: Lauri Laanmets Reviewed-by: Volker Hilsheimer (cherry picked from commit 776a0cbbab7c4980bd50ec8dcb5c489857b08758) Reviewed-by: Qt Cherry-pick Bot --- src/location/maps/qgeorouteparserosrmv4.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/location/maps/qgeorouteparserosrmv4.cpp b/src/location/maps/qgeorouteparserosrmv4.cpp index 2d82806a..35dda62b 100644 --- a/src/location/maps/qgeorouteparserosrmv4.cpp +++ b/src/location/maps/qgeorouteparserosrmv4.cpp @@ -258,8 +258,6 @@ static QGeoRoute constructRoute(const QByteArray &geometry, const QJsonArray &in QGeoRouteSegment firstSegment; int firstPosition = -1; - int segmentPathLengthCount = 0; - for (int i = instructions.count() - 1; i >= 0; --i) { QJsonArray instruction = instructions.at(i).toArray(); @@ -294,8 +292,6 @@ static QGeoRoute constructRoute(const QByteArray &geometry, const QJsonArray &in else segment.setPath(path.mid(position, firstPosition - position)); - segmentPathLengthCount += segment.path().length(); - segment.setTravelTime(time); segment.setNextRouteSegment(firstSegment); -- cgit v1.2.1