VirtualBox

Changeset 15888 in vbox


Ignore:
Timestamp:
Jan 11, 2009 3:39:39 PM (16 years ago)
Author:
vboxsync
Message:

Main: Improved r41336.

File:
1 edited

Legend:

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

    r15766 r15888  
    30853085        property.mFlags = NILFLAG;
    30863086        if (fFlags & TRANSIENT)
    3087             rc = setError (VBOX_E_INVALID_OBJECT_STATE, tr ("Cannot set a transient property when the machine is not running"));
     3087            rc = setError (VBOX_E_INVALID_OBJECT_STATE,
     3088                tr ("Cannot set a transient property when the "
     3089                    "machine is not running"));
    30883090        if (SUCCEEDED (rc))
    30893091        {
    3090             for (HWData::GuestPropertyList::iterator it = mHWData->mGuestProperties.begin();
    3091                 (it != mHWData->mGuestProperties.end()) && !found; ++it)
     3092            for (HWData::GuestPropertyList::iterator it =
     3093                    mHWData->mGuestProperties.begin();
     3094                 it != mHWData->mGuestProperties.end(); ++ it)
    30923095                if (it->mName == aName)
    30933096                {
    30943097                    property = *it;
    30953098                    if (it->mFlags & (RDONLYHOST))
    3096                         rc = setError (E_ACCESSDENIED, tr ("The property '%ls' cannot be changed by the host"), aName);
     3099                        rc = setError (E_ACCESSDENIED,
     3100                            tr ("The property '%ls' cannot be changed by the host"),
     3101                            aName);
    30973102                    else
    30983103                    {
    30993104                        mHWData.backup();
    3100                         /* The backup() operation invalidates our iterator, so get a
    3101                         * new one. */
     3105                        /* The backup() operation invalidates our iterator, so
     3106                         * get a new one. */
    31023107                        for (it = mHWData->mGuestProperties.begin();
    3103                             it->mName != aName; ++it)
     3108                            it->mName != aName; ++ it)
    31043109                            ;
    31053110                        mHWData->mGuestProperties.erase (it);
    31063111                    }
    31073112                    found = true;
    3108                     break; /* don't do ++it before we leave the loop */
     3113                    break;
    31093114                }
    31103115        }
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