Changeset 3283
- Timestamp:
- 08/21/08 15:33:56 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/MgDev/Common/PlatformBase/Services/ResourceIdentifier.cpp
r2903 r3283 394 394 395 395 // Get the repository type and name. 396 unsigned int firstPos = (unsigned int)resource.find(L':');396 size_t firstPos = resource.find(L':'); 397 397 398 398 if (STRING::npos != firstPos) … … 400 400 m_repositoryType = resource.substr(0, firstPos); 401 401 ++firstPos; 402 unsigned int secondPos = (unsigned int)resource.find(L"//", firstPos);402 size_t secondPos = resource.find(L"//", firstPos); 403 403 404 404 if (STRING::npos != secondPos) … … 444 444 445 445 // If length is zero, then the resource is of folder type. 446 unsigned int len = (unsigned int)resource.length();446 size_t len = resource.length(); 447 447 448 448 if (len > 0) 449 449 { 450 450 // If last character is '/', means it is folder. 451 unsigned int firstPos = (unsigned int)resource.rfind(L'/');451 size_t firstPos = resource.rfind(L'/'); 452 452 453 453 // Get the resource path, name, and type (foldername can also be a 454 454 // resource name). 455 if ( (len - 1) == firstPos)456 { 457 unsigned int secondPos = (unsigned int)resource.rfind(L'/', firstPos - 1);455 if (STRING::npos != firstPos && (len - 1) == firstPos) 456 { 457 size_t secondPos = resource.rfind(L'/', firstPos - 1); 458 458 459 459 if (STRING::npos != secondPos) … … 477 477 478 478 ++firstPos; 479 unsigned int secondPos = (unsigned int)resource.rfind(L'.');479 size_t secondPos = resource.rfind(L'.'); 480 480 481 481 if (STRING::npos != secondPos)
