From f268c02c199f8979fbd195eb2ab4cf3761e02a65 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 26 May 2020 16:31:34 +0200 Subject: [PATCH] Use "uniqueCols" for an array containing column indices No real changes, just don't use misleading "Rows" in the name of a variable containing column indices. --- src/generic/gridsel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/generic/gridsel.cpp b/src/generic/gridsel.cpp index 83b39e1fb3..fb478b339d 100644 --- a/src/generic/gridsel.cpp +++ b/src/generic/gridsel.cpp @@ -769,7 +769,7 @@ wxArrayInt wxGridSelection::GetColSelection() const if ( m_selectionMode == wxGrid::wxGridSelectRows ) return wxArrayInt(); - wxIntSortedArray uniqueRows(&CompareInts); + wxIntSortedArray uniqueCols(&CompareInts); const size_t count = m_selection.size(); for ( size_t n = 0; n < count; ++n ) { @@ -779,16 +779,16 @@ wxArrayInt wxGridSelection::GetColSelection() const { for ( int c = block.GetLeftCol(); c <= block.GetRightCol(); ++c ) { - uniqueRows.Add(c); + uniqueCols.Add(c); } } } wxArrayInt result; - result.reserve(uniqueRows.size()); - for( size_t i = 0; i < uniqueRows.size(); ++i ) + result.reserve(uniqueCols.size()); + for( size_t i = 0; i < uniqueCols.size(); ++i ) { - result.push_back(uniqueRows[i]); + result.push_back(uniqueCols[i]); } return result; }