Simplify using wxIntSortedArray in wxGridSelection code

There is no need to specify the comparison function when defining the
variables of this type when we can just specify it once when defining
the array type itself.

No real changes.
This commit is contained in:
Vadim Zeitlin 2020-05-26 16:37:26 +02:00
parent 340a86b3de
commit 445ccb23cc

View File

@ -40,7 +40,7 @@ int CompareInts(int n1, int n2)
}
WX_DEFINE_SORTED_ARRAY_INT(int, wxIntSortedArray);
WX_DEFINE_SORTED_ARRAY_CMP_INT(int, CompareInts, wxIntSortedArray);
wxGridSelection::wxGridSelection( wxGrid * grid,
@ -739,7 +739,7 @@ wxArrayInt wxGridSelection::GetRowSelection() const
if ( m_selectionMode == wxGrid::wxGridSelectColumns )
return wxArrayInt();
wxIntSortedArray uniqueRows(&CompareInts);
wxIntSortedArray uniqueRows;
const size_t count = m_selection.size();
for ( size_t n = 0; n < count; ++n )
{
@ -770,7 +770,7 @@ wxArrayInt wxGridSelection::GetColSelection() const
if ( m_selectionMode == wxGrid::wxGridSelectRows )
return wxArrayInt();
wxIntSortedArray uniqueCols(&CompareInts);
wxIntSortedArray uniqueCols;
const size_t count = m_selection.size();
for ( size_t n = 0; n < count; ++n )
{