iterator post increment fail fix

This commit is contained in:
David St-Onge 2018-07-30 00:24:24 -04:00
parent 00fdc56642
commit 5195fbf329

View File

@ -1476,7 +1476,7 @@ void roscontroller::time_sync_step()
avgOffset = avgOffset + offset; avgOffset = avgOffset + offset;
offsetCount++; offsetCount++;
if((it->second).age > BUZZRATE){ if((it->second).age > BUZZRATE){
neighbours_time_map.erase(it); neighbours_time_map.erase(it++);
} }
else{ else{
(it->second).age++; (it->second).age++;