]> git.saurik.com Git - wxWidgets.git/commitdiff
wx_wcscmp is only used in unicode mode so wrap in #if wxUSE_UNICODE to avoid
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Sun, 27 Nov 2005 18:04:06 +0000 (18:04 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Sun, 27 Nov 2005 18:04:06 +0000 (18:04 +0000)
a warning about an unused function, and clean up the function at the same time.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/strings/strings.cpp

index 6abc91a11bb2a6e62e0d0763e1f1c3ce5a9bc633..090b49aaab6828322eb9b5fecba52ce5161d191d 100644 (file)
@@ -228,20 +228,19 @@ void StringTestCase::Conversion()
 #endif
 }
 
+#if !wxUSE_UNICODE
 // in case wcscmp is missing
 //
 static int wx_wcscmp(const wchar_t *s1, const wchar_t *s2)
 {
-    for (;;) {
-        if (*s1 != *s2)
-            return *s1 - *s2;
-        if (*s1 == 0)
-            break;
+    while (*s1 == *s2 && *s1 != 0)
+    {
         s1++;
         s2++;
     }
-    return 0;
+    return *s1 - *s2;
 }
+#endif
 
 void
 StringTestCase::DoTestConversion(const char *s,