OSDN Git Service

Remove incorrect iterator increment
authorMathieu Chartier <mathieuc@google.com>
Wed, 18 Nov 2015 18:24:43 +0000 (10:24 -0800)
committerMathieu Chartier <mathieuc@google.com>
Wed, 18 Nov 2015 18:24:43 +0000 (10:24 -0800)
Erase already goes to the next element.

Bug: 25738102
Change-Id: Iea31a7fb27ce9f810acf019a7b59dda7704b8f26

runtime/lambda/box_table.cc

index 8eef10b..9918bb7 100644 (file)
@@ -62,7 +62,7 @@ BoxTable::BoxTable()
 
 BoxTable::~BoxTable() {
   // Free all the copies of our closures.
-  for (auto map_iterator = map_.begin(); map_iterator != map_.end(); ++map_iterator) {
+  for (auto map_iterator = map_.begin(); map_iterator != map_.end(); ) {
     std::pair<UnorderedMapKeyType, ValueType>& key_value_pair = *map_iterator;
 
     Closure* closure = key_value_pair.first;