VirtualBox

Changeset 25035 in vbox


Ignore:
Timestamp:
Nov 27, 2009 1:51:42 AM (15 years ago)
Author:
vboxsync
Message:

Turns out the code workes fine because of the post increment in the erase(it++) invocation. Changed it to use the returned iterator like the rest of main does, just to be on the safe side.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/PerformanceImpl.cpp

    r25033 r25035  
    494494        if ((*it)->associatedWith(aObject))
    495495        {
    496             /** @todo r=bird: This looks dodgy and needs to be tested with a VBOX_WITH_DEBUG_VCC_CRT. How to reproduce? */
    497496            delete *it;
    498             m.baseMetrics.erase(it++);
     497            it = m.baseMetrics.erase(it);
    499498        }
    500499        else
     
    516515        if ((*it)->associatedWith(aObject))
    517516        {
    518             /** @todo r=bird: This looks dodgy and needs to be tested with a VBOX_WITH_DEBUG_VCC_CRT. How to reproduce? */
    519517            delete *it;
    520             m.metrics.erase(it++);
     518            it = m.metrics.erase(it);
    521519        }
    522520        else
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette