Changeset 56223

Show
Ignore:
Timestamp:
10/10/08 14:20:46 (6 weeks ago)
Author:
VZ
Message:

STL build compilation fix

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • wxWidgets/trunk/utils/ifacecheck/src/xmlparser.cpp

    r56080 r56223  
    660660// this function is equivalent to wxString(str).Mid(1).ToULong(&id, GCCXML_BASE) 
    661661// but is a little bit faster 
    662 bool getID(unsigned long *id, const wxStringCharType* str) 
    663 { 
     662bool getID(unsigned long *id, const wxString& str) 
     663{ 
     664    const wxStringCharType * const start = str.wx_str(); 
    664665    wxStringCharType *end; 
    665666#if wxUSE_UNICODE_WCHAR 
    666     unsigned long val = wcstoul(str+1, &end, GCCXML_BASE); 
     667    unsigned long val = wcstoul(start, &end, GCCXML_BASE); 
    667668#else 
    668     unsigned long val = strtoul(str+1, &end, GCCXML_BASE); 
     669    unsigned long val = strtoul(start, &end, GCCXML_BASE); 
    669670#endif 
    670671 
     
    672673    // if the string was not empty to start with and no under/overflow 
    673674    // occurred: 
    674     if ( *end != '\0' || end == str+1 || errno == ERANGE || errno == EINVAL ) 
     675    if ( *end != '\0' || end == start || errno == ERANGE || errno == EINVAL ) 
    675676        return false; 
    676677 
     
    681682// utility specialized to parse efficiently the gccXML list of IDs which occur 
    682683// in nodes like <Class> ones... i.e. numeric values separed by " _" token 
    683 bool getMemberIDs(wxClassMemberIdHashMap* map, wxClass* p, const wxStringCharType* str) 
    684 { 
     684bool getMemberIDs(wxClassMemberIdHashMap* map, wxClass* p, const wxString& str) 
     685{ 
     686    const wxStringCharType * const start = str.wx_str(); 
    685687#if wxUSE_UNICODE_WCHAR 
    686     size_t len = wcslen(str); 
     688    size_t len = wcslen(start); 
    687689#else 
    688     size_t len = strlen(str); 
     690    size_t len = strlen(start); 
    689691#endif 
    690692 
    691     if (len == 0 || str[0] != '_') 
    692         return false; 
    693  
    694     const wxStringCharType *curpos = str, 
    695                            *end = str + len; 
     693    if (len == 0 || start[0] != '_') 
     694        return false; 
     695 
     696    const wxStringCharType *curpos = start, 
     697                           *end = start + len; 
    696698    wxStringCharType *nexttoken; 
    697699