X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7d75e6c6cfaeb7c4e6ffb66f172232708015dc32..ec7a8d025681979d9ea9e01350f689f5005a63ee:/src/generic/gridsel.cpp diff --git a/src/generic/gridsel.cpp b/src/generic/gridsel.cpp index 285247170d..f1d62b07f6 100644 --- a/src/generic/gridsel.cpp +++ b/src/generic/gridsel.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "gridsel.h" -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -91,7 +87,7 @@ bool wxGridSelection::IsInSelection ( int row, int col ) // (unless we are in column selection mode). if ( m_selectionMode != wxGrid::wxGridSelectColumns ) { - size_t count = m_rowSelection.GetCount(); + count = m_rowSelection.GetCount(); for ( size_t n = 0; n < count; n++ ) { if ( row == m_rowSelection[n] ) @@ -104,7 +100,7 @@ bool wxGridSelection::IsInSelection ( int row, int col ) // (unless we are in row selection mode). if ( m_selectionMode != wxGrid::wxGridSelectRows ) { - size_t count = m_colSelection.GetCount(); + count = m_colSelection.GetCount(); for ( size_t n = 0; n < count; n++ ) { if ( col == m_colSelection[n] ) @@ -443,14 +439,17 @@ void wxGridSelection::SelectBlock( int topRow, int leftCol, coords2.GetRow(), coords2.GetCol(), topRow, leftCol, bottomRow, rightCol ) ) { - case 1: - return; - case -1: - m_blockSelectionTopLeft.RemoveAt(n); - m_blockSelectionBottomRight.RemoveAt(n); - n--; count--; - default: - ; + case 1: + return; + + case -1: + m_blockSelectionTopLeft.RemoveAt(n); + m_blockSelectionBottomRight.RemoveAt(n); + n--; count--; + break; + + default: + break; } } @@ -465,13 +464,16 @@ void wxGridSelection::SelectBlock( int topRow, int leftCol, m_rowSelection[n], m_grid->GetNumberCols()-1, topRow, leftCol, bottomRow, rightCol ) ) { - case 1: - return; - case -1: - m_rowSelection.RemoveAt(n); - n--; count--; - default: - ; + case 1: + return; + + case -1: + m_rowSelection.RemoveAt(n); + n--; count--; + break; + + default: + break; } } } @@ -484,13 +486,16 @@ void wxGridSelection::SelectBlock( int topRow, int leftCol, m_grid->GetNumberRows()-1, m_colSelection[n], topRow, leftCol, bottomRow, rightCol ) ) { - case 1: - return; - case -1: - m_colSelection.RemoveAt(n); - n--; count--; - default: - ; + case 1: + return; + + case -1: + m_colSelection.RemoveAt(n); + n--; count--; + break; + + default: + break; } } } @@ -590,8 +595,8 @@ void wxGridSelection::ToggleCellSelection( int row, int col, count = m_cellSelection.GetCount(); for ( n = 0; n < count; n++ ) { - wxGridCellCoords& coords = m_cellSelection[n]; - if ( row == coords.GetRow() && col == coords.GetCol() ) + const wxGridCellCoords& sel = m_cellSelection[n]; + if ( row == sel.GetRow() && col == sel.GetCol() ) { wxGridCellCoords coords = m_cellSelection[n]; m_cellSelection.RemoveAt(n);