]> git.saurik.com Git - wxWidgets.git/commitdiff
Alternate form of condition readable for Borland compiler.
authorWłodzimierz Skiba <abx@abx.art.pl>
Thu, 22 Jul 2004 11:49:28 +0000 (11:49 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Thu, 22 Jul 2004 11:49:28 +0000 (11:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dynarray.cpp

index 676bd6ba251b2382487c150b2d905c38ed7f8802..f55c594a3b61517820462b7f56e887485d341c50 100644 (file)
@@ -493,8 +493,20 @@ int wxSortedArrayString::Index(const wxChar* sz, bool bCase, bool WXUNUSED(bFrom
         it = std::lower_bound(begin(), end(), sz,
                               wxStringCompareLess(wxStricmpCppWrapper));
 
-    if (it == end() || (bCase ? wxStrcmp : wxStricmp)(it->c_str(), sz) != 0)
+    if (it == end())
         return wxNOT_FOUND;
+
+    if (bCase)
+    {
+        if (wxStrcmp(it->c_str(), sz) != 0)
+            return wxNOT_FOUND;
+    }
+    else
+    {
+        if (wxStricmp(it->c_str(), sz) != 0)
+            return wxNOT_FOUND;
+    }
+
     return it - begin();
 }