Fixed searching the elements in wxArrayPGProperty.

Use dedicated Index() function to search elements in wxArray instead of calling custom function.
This commit is contained in:
Artur Wieczorek
2015-07-20 21:50:30 +02:00
parent fb61cbd411
commit e0f5b49a07
4 changed files with 17 additions and 18 deletions

View File

@@ -321,19 +321,6 @@ WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(wxObject*, wxArrayPGObject,
wxBaseArrayPtrVoid,
class WXDLLIMPEXP_PROPGRID);
// Utility to find if specific item is in a vector. Returns index to
// the item, or wxNOT_FOUND if not present.
template<typename CONTAINER, typename T>
int wxPGFindInVector( CONTAINER vector, const T& item )
{
for ( unsigned int i=0; i<vector.size(); i++ )
{
if ( vector[i] == item )
return (int) i;
}
return wxNOT_FOUND;
}
// -----------------------------------------------------------------------
enum wxPG_GETPROPERTYVALUES_FLAGS