[LyX/master] Simplification
Juergen Spitzmueller
spitz at lyx.org
Mon Aug 17 11:04:36 UTC 2020
commit 55f7b337cceadba5ec6a89706ecb5c65774730f3
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Mon Aug 17 13:29:55 2020 +0200
Simplification
---
src/mathed/InsetMathGrid.cpp | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp
index ef6b265..3de72ab 100644
--- a/src/mathed/InsetMathGrid.cpp
+++ b/src/mathed/InsetMathGrid.cpp
@@ -1634,9 +1634,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
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)
More information about the lyx-cvs
mailing list