From 445ccb23cc2cd4eecadfcfbcac79de083abeacae Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 26 May 2020 16:37:26 +0200 Subject: [PATCH] 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. --- src/generic/gridsel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generic/gridsel.cpp b/src/generic/gridsel.cpp index 836ac1c7aa..eb5b9b3139 100644 --- a/src/generic/gridsel.cpp +++ b/src/generic/gridsel.cpp @@ -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 ) {