Changeset 32986 in vbox
- Timestamp:
- Oct 7, 2010 3:17:13 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r32885 r32986 358 358 /** 359 359 * 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. 363 362 * @param guid 364 363 * @param strUUID … … 367 366 const Utf8Str &strUUID) const 368 367 { 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(); 379 369 if (guid.isEmpty()) 380 370 throw ConfigFileError(this, NULL, N_("UUID \"%s\" has invalid format"), strUUID.c_str());
Note:
See TracChangeset
for help on using the changeset viewer.