wxListBox::FindString(): it's not an error if the string is not found, so

don't give assert failures in this case.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1998-09-22 14:40:18 +00:00
parent ecadfc3f5a
commit dcf40a56e7
2 changed files with 120 additions and 112 deletions

View File

@ -212,7 +212,11 @@ int wxListBox::FindString( const wxString &item ) const
count++;
child = child->next;
}
wxFAIL_MSG("wrong listbox index");
// it's not an error if the string is not found - this function may be used to
// test for existence of the string in the listbox, so don't give any
// errors/assert failures.
return -1;
}

View File

@ -212,7 +212,11 @@ int wxListBox::FindString( const wxString &item ) const
count++;
child = child->next;
}
wxFAIL_MSG("wrong listbox index");
// it's not an error if the string is not found - this function may be used to
// test for existence of the string in the listbox, so don't give any
// errors/assert failures.
return -1;
}