From 4203d759adcd9bdcd726c9b5b54f9cbd520c74b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Wed, 28 Feb 2001 17:21:16 +0000 Subject: [PATCH] fix the matrix reading other small cleanup git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1642 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/ChangeLog | 32 +++++++++++++ src/mathed/array.C | 13 +++++ src/mathed/array.h | 3 ++ src/mathed/formula.C | 90 ++++++++++++++++++----------------- src/mathed/formula.h | 42 +++++++++++----- src/mathed/formulamacro.C | 3 +- src/mathed/math_cursor.C | 11 +++-- src/mathed/math_fracinset.C | 9 ++++ src/mathed/math_fracinset.h | 2 + src/mathed/math_iter.C | 3 +- src/mathed/math_macro.C | 6 +++ src/mathed/math_macro.h | 2 + src/mathed/math_matrixinset.C | 18 +++---- src/mathed/math_matrixinset.h | 4 +- src/mathed/math_parinset.C | 12 ++--- src/mathed/math_parinset.h | 4 +- src/mathed/math_parser.C | 11 +++-- src/mathed/math_root.C | 9 ++++ src/mathed/math_root.h | 2 + 19 files changed, 192 insertions(+), 84 deletions(-) diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 3d14a12094..6f56fad288 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,5 +1,37 @@ 2001-02-28 Lars Gullik Bjønnes + * formulamacro.C (Read): add comment. + + * math_parser.C (mathed_parse): fix another potential problem by + passing a freestanding mathedarray. + + * math_root.C (GetData): add const version + + * math_parinset.C (~MathParInset): delete + (GetData): add const version + + * math_matrixinset.C (MathMatrixInset): delete pointer version, + make it a proper copy constructor instead + (Clone): change acc. + (MathMatrixInset): remvoe default val for m and n + + * math_macro.C (GetData): add const version + + * math_fracinset.C (GetData): add const version + + * math_cursor.C (SelCopy): make p1 and p2 const + (SelCut): make p1 and p2 const + + * formula.h: add '_' on priv vars. Cnages in formula.C acc. to this + (LyxCode): move inline out of class + (ConvertFont): ditto + (display): ditto + + * array.[Ch] (dump): method added for debugging purposes + + * math_parser.C (mathed_parse): pass a freestanding mathedarray to + mathed_parse when reading a matrix. + * math_spaceinset.[Ch]: add pragma, make variables private add '_', change order of method definitions. diff --git a/src/mathed/array.C b/src/mathed/array.C index eba96ab495..2ef09bf7c9 100644 --- a/src/mathed/array.C +++ b/src/mathed/array.C @@ -280,3 +280,16 @@ byte & MathedArray::operator[](int i) { return bf_[i]; } + + +void MathedArray::dump(ostream & os) const +{ + buffer_type::const_iterator cit = bf_.begin(); + buffer_type::const_iterator end = bf_.end(); + for (; cit != end; ++cit) { + os << (*cit); + } + os << endl; +} + + diff --git a/src/mathed/array.h b/src/mathed/array.h index 35b205fb7d..935228f0c0 100644 --- a/src/mathed/array.h +++ b/src/mathed/array.h @@ -17,6 +17,7 @@ #define MATHEDARRAY_H #include +#include #include "mathed/support.h" @@ -110,6 +111,8 @@ public: void resize(int newsize); /// Make sure we can access at least \a needed elements void need_size(int needed); + /// + void dump(ostream &) const; private: /// Buffer buffer_type bf_; diff --git a/src/mathed/formula.C b/src/mathed/formula.C index 164efb4a30..fd595c76ea 100644 --- a/src/mathed/formula.C +++ b/src/mathed/formula.C @@ -211,9 +211,8 @@ InsetFormula::InsetFormula(bool display) { par = new MathParInset; // this leaks // mathcursor = 0; - disp_flag = display; - //label = 0; - if (disp_flag) { + disp_flag_ = display; + if (disp_flag_) { par->SetType(LM_OT_PAR); par->SetStyle(LM_ST_DISPLAY); } @@ -226,12 +225,11 @@ InsetFormula::InsetFormula(MathParInset * p) lyxerr << "InsetFormula::InsetFormula: This shouldn't happen" << endl; par = is_multiline(p->GetType()) ? - new MathMatrixInset(static_cast(p)): + new MathMatrixInset(*static_cast(p)): new MathParInset(*p); // mathcursor = 0; - disp_flag = (par->GetType()>0); - //label = 0; + disp_flag_ = (par->GetType()>0); } @@ -244,7 +242,7 @@ InsetFormula::~InsetFormula() Inset * InsetFormula::Clone(Buffer const &) const { InsetFormula * f = new InsetFormula(par); - f->label = label; + f->label_ = label_; return f; } @@ -260,7 +258,7 @@ int InsetFormula::Latex(Buffer const *, ostream & os, bool fragile, bool) const { //#warning Alejandro, the number of lines is not returned in this case // This problem will disapear at 0.13. - return mathed_write(par, os, fragile, label); + return mathed_write(par, os, fragile, label_); } @@ -308,13 +306,13 @@ void InsetFormula::Read(Buffer const *, LyXLex & lex) MathedArray ar; mathed_parse(ar, 0, &par); par->Metrics(); - disp_flag = (par->GetType() > 0); + disp_flag_ = (par->GetType() > 0); // Update line number lex.setLineNo(mathed_parser_lineno()); if (!mathed_label.empty()) { - label = mathed_label; + label_ = mathed_label; mathed_label.erase(); } @@ -335,13 +333,13 @@ void InsetFormula::Read(Buffer const *, LyXLex & lex) int InsetFormula::ascent(BufferView *, LyXFont const &) const { - return par->Ascent() + (disp_flag ? 8 : 1); + return par->Ascent() + (disp_flag_ ? 8 : 1); } int InsetFormula::descent(BufferView *, LyXFont const &) const { - return par->Descent() + (disp_flag ? 8 : 1); + return par->Descent() + (disp_flag_ ? 8 : 1); } @@ -388,18 +386,17 @@ void InsetFormula::draw(BufferView * bv, LyXFont const & f, if (is_singlely_numbered(par->GetType())) { string str; - if (!label.empty()) - str = string("(") + label + ")"; + if (!label_.empty()) + str = string("(") + label_ + ")"; else str = string("(#)"); pain.text(int(x + 20), baseline, str, wfont); } else { MathMatrixInset * mt = static_cast(par); - int y; MathedRowSt const * crow = mt->getRowSt(); while (crow) { - y = baseline + crow->getBaseline(); + int const y = baseline + crow->getBaseline(); if (crow->isNumbered()) { string str; if (!crow->getLabel().empty()) @@ -532,7 +529,7 @@ void InsetFormula::ToggleInsetSelection(BufferView * bv) void InsetFormula::display(bool dspf) { - if (dspf != disp_flag) { + if (dspf != disp_flag_) { if (dspf) { par->SetType(LM_OT_PAR); par->SetStyle(LM_ST_DISPLAY); @@ -543,11 +540,11 @@ void InsetFormula::display(bool dspf) } par->SetType(LM_OT_MIN); par->SetStyle(LM_ST_TEXT); - if (!label.empty()) { - label.erase(); + if (!label_.empty()) { + label_.erase(); } } - disp_flag = dspf; + disp_flag_ = dspf; } } @@ -567,8 +564,8 @@ vector const InsetFormula::getLabelList() const label_list.push_back(crow->getLabel()); crow = crow->getNext(); } - } else if (!label.empty()) - label_list.push_back(label); + } else if (!label_.empty()) + label_list.push_back(label_); return label_list; } @@ -604,7 +601,8 @@ void InsetFormula::InsetButtonPress(BufferView * bv, int x, int y, int /*button*/) { sel_flag = false; - sel_x = x; sel_y = y; + sel_x = x; + sel_y = y; if (mathcursor && mathcursor->Selection()) { mathcursor->SelClear(); bv->updateInset(this, false); @@ -646,7 +644,7 @@ void InsetFormula::InsetKeyPress(XKeyEvent *) // Special Mathed functions bool InsetFormula::SetNumber(bool numbf) { - if (disp_flag) { + if (disp_flag_) { short type = par->GetType(); bool const oldf = is_numbered(type); if (numbf && !oldf) @@ -742,9 +740,9 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action, bv->lockedInsetStoreUndo(Undo::INSERT); byte c = arg.empty() ? '1' : arg[0]; mathcursor->Insert(c, LM_TC_CR); - if (!label.empty()) { - mathcursor->setLabel(label); - label.erase(); + if (!label_.empty()) { + mathcursor->setLabel(label_); + label_.erase(); } par = mathcursor->GetPar(); UpdateLocal(bv); @@ -869,12 +867,12 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action, case LFUN_MATH_NUMBER: bv->lockedInsetStoreUndo(Undo::INSERT); - if (disp_flag) { + if (disp_flag_) { short type = par->GetType(); if (is_numbered(type)) { --type; - if (!label.empty()) { - label.erase(); + if (!label_.empty()) { + label_.erase(); } bv->owner()->getMiniBuffer()->Set(_("No number")); } else { @@ -911,7 +909,7 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action, case LFUN_MATH_SIZE: if (!arg.empty()) { latexkeys const * l = in_word_set(arg); - int sz = (l) ? l->id: -1; + int const sz = (l) ? l->id: -1; mathcursor->SetSize(sz); UpdateLocal(bv); break; @@ -927,11 +925,14 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action, case LFUN_INSERT_MATRIX: { bv->lockedInsetStoreUndo(Undo::INSERT); - int k, m, n; - char s[80], arg2[80]; - // This is just so that too long args won't ooze out of s. - strncpy(arg2, arg.c_str(), 80); arg2[79]= '\0'; - k = sscanf(arg2, "%d %d %s", &m, &n, s); + char s[80]; + char arg2[80]; + // This is just so that too long args won't ooze out of s. + strncpy(arg2, arg.c_str(), 80); + arg2[79]= '\0'; + int m; + int n; + int const k = sscanf(arg2, "%d %d %s", &m, &n, s); s[79] = '\0'; if (k < 1) { @@ -953,8 +954,11 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action, case LFUN_MATH_DELIM: { bv->lockedInsetStoreUndo(Undo::INSERT); - char lf[40], rg[40], arg2[40]; - int ilf = '(', irg = '.'; + char lf[40]; + char rg[40]; + char arg2[40]; + int ilf = '('; + int irg = '.'; latexkeys const * l; string vdelim("(){}[]./|"); @@ -962,7 +966,7 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action, break; ::strncpy(arg2, arg.c_str(), 40); arg2[39]= '\0'; - int n = sscanf(arg2, "%s %s", lf, rg); + int const n = sscanf(arg2, "%s %s", lf, rg); lf[39] = '\0'; rg[39] = '\0'; @@ -1012,7 +1016,7 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action, break; string old_label = is_multiline(par->GetType()) - ? mathcursor->getLabel() : label; + ? mathcursor->getLabel() : label_; #warning This is a terrible hack! We should find a better solution. // This is needed because in some positions @@ -1051,7 +1055,7 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action, // MathMatrixInset *mt = (MathMatrixInset*)par; // mt->SetLabel(new_label); } else - label = new_label; + label_ = new_label; UpdateLocal(bv); break; @@ -1059,7 +1063,7 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action, case LFUN_MATH_DISPLAY: bv->lockedInsetStoreUndo(Undo::EDIT); - display(!disp_flag); + display(!disp_flag_); UpdateLocal(bv); break; @@ -1134,7 +1138,7 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action, varcode = LM_TC_MIN; - if (greek_kb_flag<2) + if (greek_kb_flag < 2) greek_kb_flag = 0; } else if (strchr("!,:;{}", c) && (varcode == LM_TC_TEX||was_macro)) { diff --git a/src/mathed/formula.h b/src/mathed/formula.h index abc3325396..b547e421e6 100644 --- a/src/mathed/formula.h +++ b/src/mathed/formula.h @@ -66,27 +66,21 @@ public: /// Inset * Clone(Buffer const &) const; /// - Inset::Code LyxCode() const { return Inset::MATH_CODE; } + Inset::Code LyxCode() const; /// - LyXFont const ConvertFont(LyXFont const & f) const { - // We have already discussed what was here - LyXFont font(f); - font.setLatex(LyXFont::OFF); - return font; - } - + LyXFont const ConvertFont(LyXFont const & f) const; /// what appears in the minibuffer when opening string const EditMessage() const; /// void Edit(BufferView *, int x, int y, unsigned int button); /// - bool display() const { return (disp_flag) ? true: false; } + bool display() const; /// void display(bool); /// void ToggleInsetCursor(BufferView *); /// - void ShowInsetCursor(BufferView *, bool show=true); + void ShowInsetCursor(BufferView *, bool show = true); /// void HideInsetCursor(BufferView *); /// @@ -124,8 +118,32 @@ protected: private: /// - bool disp_flag; + bool disp_flag_; /// - string label; + string label_; }; + + +inline +Inset::Code InsetFormula::LyxCode() const +{ + return Inset::MATH_CODE; +} + + +inline +LyXFont const InsetFormula::ConvertFont(LyXFont const & f) const +{ + // We have already discussed what was here + LyXFont font(f); + font.setLatex(LyXFont::OFF); + return font; +} + + +inline +bool InsetFormula::display() const +{ + return (disp_flag_) ? true : false; +} #endif diff --git a/src/mathed/formulamacro.C b/src/mathed/formulamacro.C index 6b993a6936..54642dc8fb 100644 --- a/src/mathed/formulamacro.C +++ b/src/mathed/formulamacro.C @@ -105,7 +105,8 @@ void InsetFormulaMacro::Read(Buffer const *, LyXLex & lex) MathedArray ar; mathed_parse(ar, 0, reinterpret_cast(&tmacro_)); - + // since tmacro_ == 0 when mathed_parse is called we need to sett + // its contents explicitly afterwards (Lgb) tmacro_->setData(ar); // Update line number diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index 68d583db38..09c8e90823 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -899,8 +899,9 @@ void MathedCursor::MacroModeClose() void MathedCursor::SelCopy() { if (selection) { - int p1 = (cursor->getPos() < selpos) ? cursor->getPos() : selpos; - int p2 = (cursor->getPos() > selpos) ? + int const p1 = (cursor->getPos() < selpos) ? + cursor->getPos() : selpos; + int const p2 = (cursor->getPos() > selpos) ? cursor->getPos() : selpos; selarray = *(cursor->GetData()); selarray.shrink(p1, p2); @@ -916,8 +917,10 @@ void MathedCursor::SelCut() if (cursor->getPos() == selpos) return; - int p1 = (cursor->getPos() < selpos) ? cursor->getPos() : selpos; - int p2 = (cursor->getPos() > selpos) ? cursor->getPos() : selpos; + int const p1 = (cursor->getPos() < selpos) ? + cursor->getPos() : selpos; + int const p2 = (cursor->getPos() > selpos) ? + cursor->getPos() : selpos; selarray = *(cursor->GetData()); selarray.shrink(p1, p2); cursor->Clean(selpos); diff --git a/src/mathed/math_fracinset.C b/src/mathed/math_fracinset.C index 6ee7debf1f..fe26cd8fd4 100644 --- a/src/mathed/math_fracinset.C +++ b/src/mathed/math_fracinset.C @@ -87,6 +87,15 @@ MathedArray & MathFracInset::GetData() } +MathedArray const & MathFracInset::GetData() const +{ + if (idx_ == 0) + return array; + else + return den_.GetData(); +} + + bool MathFracInset::Inside(int x, int y) { int const xx = xo() - (width - w0_) / 2; diff --git a/src/mathed/math_fracinset.h b/src/mathed/math_fracinset.h index 83011783f2..d4e1af923c 100644 --- a/src/mathed/math_fracinset.h +++ b/src/mathed/math_fracinset.h @@ -39,6 +39,8 @@ public: /// MathedArray & GetData(); /// + MathedArray const & GetData() const; + /// bool setArgumentIdx(int i); // was bool Up/down(void); /// int getArgumentIdx() const; diff --git a/src/mathed/math_iter.C b/src/mathed/math_iter.C index bf8c5b8444..46da31d267 100644 --- a/src/mathed/math_iter.C +++ b/src/mathed/math_iter.C @@ -43,17 +43,18 @@ MathedIter::MathedIter() {} - MathedArray * MathedIter::GetData() const { return array; } + short MathedIter::fcode() const { return fcode_; } + void MathedIter::fcode(short c) const { fcode_ = c; diff --git a/src/mathed/math_macro.C b/src/mathed/math_macro.C index e59452baa3..8e5d2b1c0f 100644 --- a/src/mathed/math_macro.C +++ b/src/mathed/math_macro.C @@ -140,6 +140,12 @@ MathedArray & MathMacro::GetData() } +MathedArray const & MathMacro::GetData() const +{ + return args_[idx_].array; +} + + int MathMacro::GetColumns() const { return tmplate_->getMacroPar(idx_)->GetColumns(); diff --git a/src/mathed/math_macro.h b/src/mathed/math_macro.h index 63421ef3b8..964e57ba17 100644 --- a/src/mathed/math_macro.h +++ b/src/mathed/math_macro.h @@ -62,6 +62,8 @@ public: /// MathedArray & GetData(); /// + MathedArray const & GetData() const; + /// MathedRowSt * getRowSt() const; /// void setData(MathedArray const &); diff --git a/src/mathed/math_matrixinset.C b/src/mathed/math_matrixinset.C index 9d344f0d9a..8e6fbdc4b5 100644 --- a/src/mathed/math_matrixinset.C +++ b/src/mathed/math_matrixinset.C @@ -34,15 +34,15 @@ MathMatrixInset::MathMatrixInset(int m, int n, short st) } -MathMatrixInset::MathMatrixInset(MathMatrixInset * mt) - : MathParInset(mt->GetStyle(), mt->GetName(), mt->GetType()), - nc_(mt->nc_), nr_(0), ws_(mt->nc_), - v_align_(mt->v_align_), h_align_(mt->h_align_) +MathMatrixInset::MathMatrixInset(MathMatrixInset const & mt) + : MathParInset(mt.GetStyle(), mt.GetName(), mt.GetType()), + nc_(mt.nc_), nr_(0), ws_(mt.nc_), + v_align_(mt.v_align_), h_align_(mt.h_align_) { - array = mt->GetData(); - if (mt->row_ != 0) { + array = mt.GetData(); + if (mt.row_ != 0) { MathedRowSt * ro = 0; - MathedRowSt * mrow = mt->row_; + MathedRowSt * mrow = mt.row_; while (mrow) { MathedRowSt * r = new MathedRowSt(nc_ + 1); @@ -59,7 +59,7 @@ MathMatrixInset::MathMatrixInset(MathMatrixInset * mt) } } else row_ = 0; - flag = mt->flag; + flag = mt.flag; } @@ -76,7 +76,7 @@ MathMatrixInset::~MathMatrixInset() MathedInset * MathMatrixInset::Clone() { - return new MathMatrixInset(this); + return new MathMatrixInset(*this); } diff --git a/src/mathed/math_matrixinset.h b/src/mathed/math_matrixinset.h index fd9e55262a..caf23ea3c1 100644 --- a/src/mathed/math_matrixinset.h +++ b/src/mathed/math_matrixinset.h @@ -19,10 +19,10 @@ class MathMatrixInset : public MathParInset { public: /// explicit - MathMatrixInset(int m = 1, int n = 1, short st = LM_ST_TEXT); + MathMatrixInset(int m, int n, short st = LM_ST_TEXT); /// explicit - MathMatrixInset(MathMatrixInset *); + MathMatrixInset(MathMatrixInset const &); /// ~MathMatrixInset(); /// diff --git a/src/mathed/math_parinset.C b/src/mathed/math_parinset.C index 83336a8753..53d1befdf8 100644 --- a/src/mathed/math_parinset.C +++ b/src/mathed/math_parinset.C @@ -35,12 +35,6 @@ MathParInset::MathParInset(short st, string const & nm, short ot) } -// This is virtual and needed. -MathParInset::~MathParInset() -{ -} - - MathedInset * MathParInset::Clone() { return new MathParInset(*this); @@ -436,6 +430,12 @@ MathedArray & MathParInset::GetData() } +MathedArray const & MathParInset::GetData() const +{ + return array; +} + + void MathParInset::setXY(int x, int y) { xo_ = x; diff --git a/src/mathed/math_parinset.h b/src/mathed/math_parinset.h index 539f569ec6..61b8b55e27 100644 --- a/src/mathed/math_parinset.h +++ b/src/mathed/math_parinset.h @@ -19,8 +19,6 @@ public: MathParInset(short st = LM_ST_TEXT, string const & nm = string(), short ot = LM_OT_MIN); /// - virtual ~MathParInset(); - /// virtual MathedInset * Clone(); /// Draw the object on a drawable virtual void draw(Painter &, int x, int baseline); @@ -34,6 +32,8 @@ public: virtual void setData(MathedArray const &); /// virtual MathedArray & GetData(); + /// + virtual MathedArray const & GetData() const; /// Paragraph position virtual void GetXY(int &, int &) const; /// diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 6ad9268b4b..4d1bcd32f5 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -693,7 +693,7 @@ void mathed_parse(MathedArray & array, unsigned flags = 0, rt->setArgumentIdx(0); MathedArray ar; mathed_parse(ar, FLAG_BRACK_END, &rt); - rt->setData(ar); + rt->setData(ar); // I belive that line is not needed (Lgb) rt->setArgumentIdx(1); } else { yyis->putback(c); @@ -701,7 +701,7 @@ void mathed_parse(MathedArray & array, unsigned flags = 0, } MathedArray ar; mathed_parse(ar, FLAG_BRACE|FLAG_BRACE_LAST, &rt); - rt->setData(ar); + rt->setData(ar); // I belive that this line is not needed (Lgb) data.insertInset(rt, LM_TC_ACTIVE_INSET); break; } @@ -833,7 +833,8 @@ void mathed_parse(MathedArray & array, unsigned flags = 0, MathParInset * mm = new MathMatrixInset(nc, 0); mm->SetAlign(ar2[0], ar); data.insertInset(mm, LM_TC_ACTIVE_INSET); - mathed_parse(mm->GetData(), FLAG_END, &mm); + MathedArray dat; + mathed_parse(dat, FLAG_END, &mm); } else if (is_eqn_type(yylval.i)) { if (plevel!= 0) { mathPrintError("Misplaced environment"); @@ -884,7 +885,9 @@ void mathed_parse(MathedArray & array, unsigned flags = 0, if (p) { data.insertInset(p, p->getTCode()); p->setArgumentIdx(0); - mathed_parse(p->GetData(), FLAG_END, reinterpret_cast(&p)); + //mathed_parse(p->GetData(), FLAG_END, reinterpret_cast(&p)); + MathedArray dat; + mathed_parse(dat, FLAG_END, reinterpret_cast(&p)); // for (int i = 0; p->setArgumentIdx(i); ++i) // p->SetData(mathed_parse(FLAG_BRACE|FLAG_BRACE_LAST)); } else diff --git a/src/mathed/math_root.C b/src/mathed/math_root.C index 605d153788..73f93f1b68 100644 --- a/src/mathed/math_root.C +++ b/src/mathed/math_root.C @@ -75,6 +75,15 @@ MathedArray & MathRootInset::GetData() } +MathedArray const & MathRootInset::GetData() const +{ + if (idx_ == 1) + return array; + else + return uroot_.GetData(); +} + + bool MathRootInset::Inside(int x, int y) { return (uroot_.Inside(x, y) || MathSqrtInset::Inside(x, y)); diff --git a/src/mathed/math_root.h b/src/mathed/math_root.h index aeba4e5660..1ba236112a 100644 --- a/src/mathed/math_root.h +++ b/src/mathed/math_root.h @@ -50,6 +50,8 @@ public: /// MathedArray & GetData(); /// + MathedArray const & GetData() const; + /// bool setArgumentIdx(int i); /// int getArgumentIdx() const;