Fix wrong return value from wxWebViewIE::Find() in 64 bit build.

Using wxNOT_FOUND and an unsigned size() return value in the same operator ?:
resulted in wxNOT_FOUND being converted to an unsigned size_t type and while
converting it back to (signed) long worked in 32 bit builds where long and
size_t have the same size, it was broken in 64 bit builds where their sizes
are different.

Thanks g++ for catching this one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2013-07-12 14:12:38 +00:00
parent 9fe7a9ad57
commit 1b48beaaf0

View File

@ -670,9 +670,13 @@ long wxWebViewIE::Find(const wxString& text, int flags)
ClearSelection();
m_findText = text;
m_findFlags = flags;
//find the text and return count.
//find the text and return wxNOT_FOUND if there are no matches.
FindInternal(text, flags, wxWEBVIEW_FIND_ADD_POINTERS);
return m_findPointers.empty() ? wxNOT_FOUND : m_findPointers.size();
if(m_findPointers.empty())
return wxNOT_FOUND;
// Or their number if there are.
return m_findPointers.size();
}
void wxWebViewIE::SetEditable(bool enable)