From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Sun, 20 Nov 2022 07:33:12 +0000 (-0700) Subject: use structured binding instead of std::tie. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~1^2~162^2~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0c57dd653c2877d65c17f38884d3bf3d5c8d082c;p=gpsbabel.git use structured binding instead of std::tie. --- diff --git a/kml.cc b/kml.cc index 43a230068..0dd315c3f 100644 --- a/kml.cc +++ b/kml.cc @@ -26,7 +26,7 @@ #include // for strtod #include // for strcmp #include // for optional -#include // for tuple, make_tuple, tie +#include // for tuple, make_tuple #include // for QByteArray #include // for QChar @@ -280,9 +280,7 @@ void KmlFormat::gx_trk_e(xg_string /*args*/, const QXmlStreamAttributes* /*attrs while (!gx_trk_times->isEmpty()) { auto* trkpt = new Waypoint; trkpt->SetCreationTime(gx_trk_times->takeFirst()); - double lat, lon, alt; - int n; - std::tie(n, lat, lon, alt) = gx_trk_coords->takeFirst(); + auto [n, lat, lon, alt] = gx_trk_coords->takeFirst(); // An empty kml:coord element is permitted to indicate missing position data; // the estimated position may be determined using some interpolation method. // However if we get one we will throw away the time as we don't have a location.