From: Jean-Marc Lasgouttes Date: Tue, 30 Aug 2016 15:20:21 +0000 (+0200) Subject: Remove unused 'glue' parameter X-Git-Tag: 2.3.0alpha1~1086 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=da30e3840033dd6c5885de63ac08eeb0d7edb40c;p=lyx.git Remove unused 'glue' parameter It was probably useful at some time, but not now. --- diff --git a/src/mathed/MathData.cpp b/src/mathed/MathData.cpp index 8ac4ac1273..bd4d53ead2 100644 --- a/src/mathed/MathData.cpp +++ b/src/mathed/MathData.cpp @@ -846,20 +846,12 @@ void MathData::collectParameters(Cursor * cur, int MathData::pos2x(BufferView const * bv, size_type pos) const -{ - return pos2x(bv, pos, 0); -} - - -int MathData::pos2x(BufferView const * bv, size_type pos, int glue) const { int x = 0; size_type target = min(pos, size()); CoordCache::Insets const & coords = bv->coordCache().getInsets(); for (size_type i = 0; i < target; ++i) { const_iterator it = begin() + i; - if ((*it)->getChar() == ' ') - x += glue; //lyxerr << "char: " << (*it)->getChar() // << "width: " << (*it)->width() << endl; x += coords.dim((*it).nucleus()).wid; @@ -869,12 +861,6 @@ int MathData::pos2x(BufferView const * bv, size_type pos, int glue) const MathData::size_type MathData::x2pos(BufferView const * bv, int targetx) const -{ - return x2pos(bv, targetx, 0); -} - - -MathData::size_type MathData::x2pos(BufferView const * bv, int targetx, int glue) const { const_iterator it = begin(); int lastx = 0; @@ -883,8 +869,6 @@ MathData::size_type MathData::x2pos(BufferView const * bv, int targetx, int glue // find first position after targetx for (; currx < targetx && it != end(); ++it) { lastx = currx; - if ((*it)->getChar() == ' ') - currx += glue; currx += coords.dim((*it).nucleus()).wid; } diff --git a/src/mathed/MathData.h b/src/mathed/MathData.h index 0419b59181..4b79f805fe 100644 --- a/src/mathed/MathData.h +++ b/src/mathed/MathData.h @@ -144,11 +144,7 @@ public: /// returns x coordinate of given position in the array int pos2x(BufferView const * bv, size_type pos) const; /// returns position of given x coordinate - int pos2x(BufferView const * bv, size_type pos, int glue) const; - /// returns position of given x coordinate size_type x2pos(BufferView const * bv, int targetx) const; - /// returns position of given x coordinate starting from a certain pos - size_type x2pos(BufferView const * bv, int targetx, int glue) const; /// returns distance of this cell to the point given by x and y // assumes valid position and size cache int dist(BufferView const & bv, int x, int y) const;