VirtualBox

Changeset 25032 in vbox


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

GuestProperties/service.cpp: Don't increment an iterator that has been passed to .erase(), it's invalid according to Visual C++. (Don't be afraid of using 'break'.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/GuestProperties/service.cpp

    r24703 r25032  
    477477        ++itEnd;
    478478        for (unsigned i = 0; ppNames[i] != NULL; ++i)
    479         {
    480             bool found = false;
    481             for (PropertyList::iterator it = mProperties.begin();
    482                 !found && it != itEnd; ++it)
     479            for (PropertyList::iterator it = mProperties.begin(); it != itEnd; ++it)
    483480                if (it->mName.compare(ppNames[i]) == 0)
    484481                {
    485                     found = true;
    486482                    mProperties.erase(it);
     483                    break;
    487484                }
    488         }
    489485    }
    490486
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