From: Frederic Bouvier Date: Sun, 30 Jan 2011 12:25:39 +0000 (+0100) Subject: Reported by cppcheck: fix an incorrect usage of iterators X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a853af5b0ecf072a45ae34ff5e66388df9db6458;p=flightgear.git Reported by cppcheck: fix an incorrect usage of iterators --- diff --git a/src/Instrumentation/wxradar.cxx b/src/Instrumentation/wxradar.cxx index 739be4b95..c3b37d2cd 100644 --- a/src/Instrumentation/wxradar.cxx +++ b/src/Instrumentation/wxradar.cxx @@ -610,7 +610,7 @@ wxRadarBg::update_aircraft() diff = _elapsed_time - (*ground_echoes_iterator)->elapsed_time; if( diff > _persistance) { - ground_echoes.erase(ground_echoes_iterator); + ground_echoes.erase(ground_echoes_iterator++); } else { // double test_brg = (*ground_echoes_iterator)->bearing; // double bearing = test_brg * SG_DEGREES_TO_RADIANS;