One more int[] replaced by std::vector<int> Andre' -- André Pönitz ........................................ [EMAIL PROTECTED]
Index: ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v retrieving revision 1.13 diff -u -p -u -r1.13 ChangeLog --- ChangeLog 2001/02/12 11:25:44 1.13 +++ ChangeLog 2001/02/12 14:19:33 @@ -1,7 +1,7 @@ 2001-02-12 André Pönitz <[EMAIL PROTECTED]> - * array.[hC]: replace private variable maxsize_ with call - to bf_.size() + * array.[hC]: replace private variable maxsize_ with call to bf_.size() + * math_defs.h: replace int[] by std::vector<int> for MathedRowSt::widths 2001-02-09 Lars Gullik Bjønnes <[EMAIL PROTECTED]> Index: math_defs.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_defs.h,v retrieving revision 1.38 diff -u -p -u -r1.38 math_defs.h --- math_defs.h 2001/02/12 08:55:14 1.38 +++ math_defs.h 2001/02/12 14:19:33 @@ -407,21 +407,17 @@ class MathParInset: public MathedInset It allows to manage the extra info independently of the paragraph data. Only used for multiline paragraphs. */ -struct MathedRowSt { +struct MathedRowSt +{ /// explicit - MathedRowSt(int n) { - w = new int[n + 1]; // this leaks + MathedRowSt(int n) + : widths_(n + 1, 0) + { asc = desc = y = 0; - for (int i = 0 ; i < n + 1 ; ++i) - w[i] = 0; next = 0; numbered = true; } - /// - ~MathedRowSt() { - delete[] w; - } /// Should be const but... MathedRowSt * getNext() const { return next; } /// ...we couldn't use this. @@ -443,19 +439,19 @@ struct MathedRowSt { /// void descent(int d) { desc = d; } /// - int getTab(int i) const { return w[i]; } + int getTab(int i) const { return widths_[i]; } /// void setLabel(string const & l) { label = l; } /// void setNumbered(bool nf) { numbered = nf; } /// - void setTab(int i, int t) { w[i] = t; } + void setTab(int i, int t) { widths_[i] = t; } private: /// Vericals int asc, desc, y; /// widths - int * w; + std::vector<int> widths_; /// string label; ///