Alternate form of condition readable for Borland compiler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba 2004-07-22 11:49:28 +00:00
parent a56938e475
commit e11d2abe46

View 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();
}