From fc80bd1b7c1362b4b7a88710513a635d1dd1da1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 9 Jan 2018 23:19:24 +0100 Subject: [PATCH] Code cleanup --- src/map/mapfile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/map/mapfile.cpp b/src/map/mapfile.cpp index 082c8572..283057a1 100644 --- a/src/map/mapfile.cpp +++ b/src/map/mapfile.cpp @@ -176,16 +176,16 @@ bool MapFile::createProjection(const QString &name, else if (name == "(A)Lambert Azimuthual Equal Area") _projection = Projection::projection(_datum, 9820, setup); else if (name == "(UTM) Universal Transverse Mercator") { - Projection::Setup s; + int zone; if (points.first().zone) - s = UTM::setup(points.first().zone); + zone = points.first().zone; else if (!points.first().ll.isNull()) - s = UTM::setup(UTM::zone(points.first().ll)); + zone = UTM::zone(points.first().ll); else { _errorString = "Can not determine UTM zone"; return 0; } - _projection = Projection::projection(_datum, 9807, s); + _projection = Projection::projection(_datum, 9807, UTM::setup(zone)); } else if (name == "(NZTM2) New Zealand TM 2000") _projection = Projection::projection(_datum, 9807, Projection::Setup( 0, 173.0, 0.9996, 1600000, 10000000, NAN, NAN));