for (row_type r = 0; r < numrows; ++r) {
for (col_type c = 0; c < numcols; ++c) {
idx_type i = index(r + startrow, c + startcol);
- pos_type ipos = cur.pos() > pos_type(cell(i).size())
- ? pos_type(cell(i).size())
- : cur.pos();
+ pos_type const ipos = min(cur.pos(), pos_type(cell(i).size()));
cell(i).insert(ipos, grid.cell(grid.index(r, c)));
}
if (hline_enabled)