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
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)