Changeset 72904 in vbox for trunk/include/VBox
- Timestamp:
- Jul 4, 2018 9:52:10 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/Guid.h
r72894 r72904 81 81 Guid(const RTUUID &that) 82 82 { 83 mGuidState = GUID_NORMAL;84 83 mUuid = that; 85 if (isZero()) 86 mGuidState = GUID_ZERO; 84 updateState(); 87 85 dbg_refresh(); 88 86 } … … 92 90 AssertCompileSize(GUID, sizeof(RTUUID)); 93 91 ::memcpy(&mUuid, &that, sizeof(GUID)); 94 mGuidState = GUID_NORMAL; 95 if (isZero()) 96 mGuidState = GUID_ZERO; 92 updateState(); 97 93 dbg_refresh(); 98 94 } … … 176 172 { 177 173 mUuid = guid; 178 mGuidState = GUID_NORMAL; 179 if (isZero()) 180 mGuidState = GUID_ZERO; 174 updateState(); 181 175 dbg_refresh(); 182 176 return *this; … … 187 181 AssertCompileSize(GUID, sizeof(RTUUID)); 188 182 ::memcpy(&mUuid, &guid, sizeof(GUID)); 189 mGuidState = GUID_NORMAL; 190 if (isZero()) 191 mGuidState = GUID_ZERO; 183 updateState(); 192 184 dbg_refresh(); 193 185 return *this; … … 409 401 410 402 private: 403 void updateState() 404 { 405 if (::RTUuidIsNull(&mUuid)) 406 mGuidState = GUID_ZERO; 407 else 408 mGuidState = GUID_NORMAL; 409 } 410 411 411 void initString(const char *that) 412 412 { … … 418 418 else 419 419 { 420 mGuidState = GUID_NORMAL;421 420 int rc = ::RTUuidFromStr(&mUuid, that); 422 421 if (RT_FAILURE(rc)) … … 425 424 mGuidState = GUID_INVALID; 426 425 } 427 else if (isZero())428 mGuidState = GUID_ZERO;426 else 427 updateState(); 429 428 } 430 429 dbg_refresh(); … … 440 439 else 441 440 { 442 mGuidState = GUID_NORMAL;443 441 int rc = ::RTUuidFromUtf16(&mUuid, that); 444 442 if (RT_FAILURE(rc)) … … 447 445 mGuidState = GUID_INVALID; 448 446 } 449 else if (isZero())450 mGuidState = GUID_ZERO;447 else 448 updateState(); 451 449 } 452 450 dbg_refresh();
Note:
See TracChangeset
for help on using the changeset viewer.