]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/ifacecheck/src/xmlparser.cpp
Remove a couple duplicate feature checks, and check for defines before setting them...
[wxWidgets.git] / utils / ifacecheck / src / xmlparser.cpp
index efbb82798db2bcaef32ed825450d6a0612322d0e..7b29c794ff21643e8d27cad9d54d6499b71d8b5c 100644 (file)
@@ -484,10 +484,10 @@ typedef std::map<unsigned long, toResolveTypeItem> wxToResolveTypeHashMap;
 bool getID(unsigned long *id, const wxStringCharType* str)
 {
     wxStringCharType *end;
-#if wxUSE_UNICODE_UTF8
-    unsigned long val = strtoul(str+1, &end, GCCXML_BASE);
-#else
+#if wxUSE_UNICODE_WCHAR
     unsigned long val = wcstoul(str+1, &end, GCCXML_BASE);
+#else
+    unsigned long val = strtoul(str+1, &end, GCCXML_BASE);
 #endif
 
     // return true only if scan was stopped by the terminating NUL and
@@ -504,10 +504,10 @@ bool getID(unsigned long *id, const wxStringCharType* str)
 // in nodes like <Class> ones... i.e. numeric values separed by " _" token
 bool getMemberIDs(wxClassMemberIdHashMap* map, wxClass* p, const wxStringCharType* str)
 {
-#if wxUSE_UNICODE_UTF8
-    size_t len = strlen(str);
-#else
+#if wxUSE_UNICODE_WCHAR
     size_t len = wcslen(str);
+#else
+    size_t len = strlen(str);
 #endif
 
     if (len == 0 || str[0] != '_')
@@ -520,10 +520,10 @@ bool getMemberIDs(wxClassMemberIdHashMap* map, wxClass* p, const wxStringCharTyp
     while (curpos < end)
     {
         // curpos always points to the underscore of the next token to parse:
-#if wxUSE_UNICODE_UTF8
-        unsigned long id = strtoul(curpos+1, &nexttoken, GCCXML_BASE);
-#else
+#if wxUSE_UNICODE_WCHAR
         unsigned long id = wcstoul(curpos+1, &nexttoken, GCCXML_BASE);
+#else
+        unsigned long id = strtoul(curpos+1, &nexttoken, GCCXML_BASE);
 #endif
         if ( *nexttoken != ' ' || errno == ERANGE || errno == EINVAL )
             return false;