- int & rowOrCol = m_rowSelection[n];
- if ( (size_t)rowOrCol >= pos )
- {
- if ( numRows > 0 )
- {
- // If rows inserted, include row counter where necessary
- rowOrCol += numRows;
- }
- else if ( numRows < 0)
- {
- // If rows deleted, either decrement row counter (if row still exists)
- if ((size_t)rowOrCol >= pos - numRows)
- rowOrCol += numRows;
- else
- {
- m_rowSelection.RemoveAt(n);
- n--; count--;
- }
- }
- }
+ int rowOrCol_ = m_rowSelection [ n ];
+
+ if ( ( size_t ) rowOrCol_ >= pos )
+ {
+ if ( numRows > 0 )
+ {
+ m_rowSelection [ n ] += numRows;
+ }
+ else if ( numRows < 0 )
+ {
+ if ( ( size_t ) rowOrCol_ >= ( pos - numRows ) )
+ m_rowSelection [ n ] += numRows;
+ else
+ {
+ m_rowSelection.RemoveAt ( n );
+ n--;
+ count--;
+ }
+ }
+ }