From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Sat, 4 May 2024 17:53:36 +0000 (-0600) Subject: clang-tidy modernize-loop-convert (#1275) X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2^2~102 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=55e449417497a841cb4a31690bbe58c4cb3c3cf3;p=gpsbabel.git clang-tidy modernize-loop-convert (#1275) --- diff --git a/duplicate.cc b/duplicate.cc index 552b23faf..32378b319 100644 --- a/duplicate.cc +++ b/duplicate.cc @@ -73,8 +73,7 @@ void DuplicateFilter::process() wptfirst->latitude = wptlast->latitude; wptfirst->longitude = wptlast->longitude; } - for (auto it = values.cbegin(); it != values.cend(); ++it) { - Waypoint* wpt = *it; + for (Waypoint* wpt : values) { if (purge_duplicates || (wpt != wptfirst)) { wpt->wpt_flags.marked_for_deletion = 1; } diff --git a/shape.cc b/shape.cc index 42cbe1e57..19af063af 100644 --- a/shape.cc +++ b/shape.cc @@ -220,15 +220,15 @@ ShapeFormat::read() nameidx = -2; const QStringList opt_name_fields = qopt_name.split('+', Qt::SkipEmptyParts); nameindices.reserve(opt_name_fields.size()); - for (int oidx=0; oidx