From: André Pönitz Date: Mon, 4 Nov 2002 11:53:28 +0000 (+0000) Subject: size_type size -> difference_type diff in adjust() X-Git-Tag: 1.6.10~18030 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d5418105667b24b2c2b579a3a4cd99d5215bbdc7;p=features.git size_type size -> difference_type diff in adjust() git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5575 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index b38fdab121..250e296690 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -666,12 +666,12 @@ MathCursor::pos_type MathCursor::pos() const } -void MathCursor::adjust(pos_type from, size_type size) +void MathCursor::adjust(pos_type from, difference_type diff) { if (cursor().pos_ > from) - cursor().pos_ += size; + cursor().pos_ += diff; if (Anchor_.back().pos_ > from) - Anchor_.back().pos_ += size; + Anchor_.back().pos_ += diff; // just to be on the safe side // theoretically unecessary normalize(); diff --git a/src/mathed/math_cursor.h b/src/mathed/math_cursor.h index 722beac95c..99c6018729 100644 --- a/src/mathed/math_cursor.h +++ b/src/mathed/math_cursor.h @@ -46,6 +46,8 @@ class MathCursor { public: /// short of anything else reasonable typedef MathInset::size_type size_type; + /// type for column numbers + typedef MathArray::difference_type difference_type; /// type for cursor positions within a cell typedef MathInset::pos_type pos_type; /// type for cell indices @@ -114,8 +116,8 @@ public: void popToEnclosingHull(); /// go up to the hull inset void popToHere(MathInset const * p); - /// adjust position after deletion/insertion - void adjust(pos_type from, size_type size); + /// adjust anchor position after deletions/insertions + void adjust(pos_type from, difference_type diff); /// InsetFormulaBase * formula() const; /// current offset in the current cell @@ -273,7 +275,7 @@ private: /// the name of the macro we are currently inputting string macroName() const; /// where in the curent cell does the macro name start? - MathInset::difference_type macroNamePos() const; + difference_type macroNamePos() const; /// can we enter the inset? bool openable(MathAtom const &, bool selection) const; /// write access to cursor cell position