MapGuide Open Source:  Home |  Download |  Internals

Changeset 3283

Show
Ignore:
Timestamp:
08/21/08 15:33:56 (3 months ago)
Author:
edzimmerman
Message:

Fix #671 - MgResourceIdentifier? parse methods not portable to x64.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/MgDev/Common/PlatformBase/Services/ResourceIdentifier.cpp

    r2903 r3283  
    394394 
    395395    // Get the repository type and name. 
    396     unsigned int firstPos = (unsigned int)resource.find(L':'); 
     396    size_t firstPos = resource.find(L':'); 
    397397 
    398398    if (STRING::npos != firstPos) 
     
    400400        m_repositoryType = resource.substr(0, firstPos); 
    401401        ++firstPos; 
    402         unsigned int secondPos = (unsigned int)resource.find(L"//", firstPos); 
     402        size_t secondPos = resource.find(L"//", firstPos); 
    403403 
    404404        if (STRING::npos != secondPos) 
     
    444444 
    445445    // 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(); 
    447447 
    448448    if (len > 0) 
    449449    { 
    450450        // If last character is '/', means it is folder. 
    451         unsigned int firstPos = (unsigned int)resource.rfind(L'/'); 
     451        size_t firstPos = resource.rfind(L'/'); 
    452452 
    453453        // Get the resource path, name, and type (foldername can also be a 
    454454        // 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); 
    458458 
    459459            if (STRING::npos != secondPos) 
     
    477477 
    478478            ++firstPos; 
    479             unsigned int secondPos = (unsigned int)resource.rfind(L'.'); 
     479            size_t secondPos = resource.rfind(L'.'); 
    480480 
    481481            if (STRING::npos != secondPos)