From 4c985fba0eca504d12d38782feba7d42673dc0e3 Mon Sep 17 00:00:00 2001 From: molaupi Date: Thu, 11 Sep 2025 09:53:36 +0200 Subject: [PATCH] Fixed construction of LatLng objects in DimacsImporter. --- DataStructures/Graph/Import/DimacsImporter.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DataStructures/Graph/Import/DimacsImporter.h b/DataStructures/Graph/Import/DimacsImporter.h index d094b91..7eb106a 100644 --- a/DataStructures/Graph/Import/DimacsImporter.h +++ b/DataStructures/Graph/Import/DimacsImporter.h @@ -112,7 +112,9 @@ class DimacsImporter { assert(currentVertex.id > 0); assert(currentVertex.id <= vertexCount); } const auto conversionFactor = static_cast(LatLng::PRECISION) / coordinatePrecision; - currentVertex.latLng = {conversionFactor * lat, conversionFactor * lng}; + lat = static_cast(conversionFactor * lat); + lng = static_cast(conversionFactor * lng); + currentVertex.latLng = {lat, lng}; return !coFile.eof(); } else { return ++currentVertex.id <= vertexCount;