VirtualBox

Changeset 32986 in vbox


Ignore:
Timestamp:
Oct 7, 2010 3:17:13 PM (14 years ago)
Author:
vboxsync
Message:

Main: now that IPRT can read {UUID} we don't need to worry

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/xml/Settings.cpp

    r32885 r32986  
    358358/**
    359359 * Helper function that parses a UUID in string form into
    360  * a com::Guid item. Since that uses an IPRT function which
    361  * does not accept "{}" characters around the UUID string,
    362  * we handle that here. Throws on errors.
     360 * a com::Guid item. Accepts UUIDs both with and without
     361 * "{}" brackets. Throws on errors.
    363362 * @param guid
    364363 * @param strUUID
     
    367366                               const Utf8Str &strUUID) const
    368367{
    369     // {5f102a55-a51b-48e3-b45a-b28d33469488}
    370     // 01234567890123456789012345678901234567
    371     //           1         2         3
    372     if (    (strUUID[0] == '{')
    373          && (strUUID[37] == '}')
    374        )
    375         guid = strUUID.substr(1, 36).c_str();
    376     else
    377         guid = strUUID.c_str();
    378 
     368    guid = strUUID.c_str();
    379369    if (guid.isEmpty())
    380370        throw ConfigFileError(this, NULL, N_("UUID \"%s\" has invalid format"), strUUID.c_str());
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