]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_pos.C
remove unneeded member
[lyx.git] / src / mathed / math_pos.C
index 889f13782a73ce563b4b94cc9b1430f0f88fe2f4..b4d53521dbc943bb5bff9f84f5e1db93fd5107ec 100644 (file)
@@ -8,48 +8,46 @@
 #include "support/LAssert.h"
 
 
+using std::ostream;
+
 MathCursorPos::MathCursorPos()
        : par_(0), idx_(0), pos_(0)
 {}
 
 
-MathCursorPos::MathCursorPos(MathAtom & t)
-       : par_(&t), idx_(0), pos_(0)
+MathCursorPos::MathCursorPos(MathInset * p)
+       : par_(p), idx_(0), pos_(0)
 {
        lyx::Assert(par_);
-       lyx::Assert(par_->nucleus());
 }
 
 
+
 MathArray & MathCursorPos::cell(MathArray::idx_type idx) const
 {
        lyx::Assert(par_);
-       lyx::Assert(par_->nucleus());
-       return par_->nucleus()->cell(idx);
+       return par_->cell(idx);
 }
 
 
 MathArray & MathCursorPos::cell() const
 {
        lyx::Assert(par_);
-       lyx::Assert(par_->nucleus());
-       return par_->nucleus()->cell(idx_);
+       return par_->cell(idx_);
 }
 
 
 MathXArray & MathCursorPos::xcell(MathArray::idx_type idx) const
 {
        lyx::Assert(par_);
-       lyx::Assert(par_->nucleus());
-       return par_->nucleus()->xcell(idx);
+       return par_->xcell(idx);
 }
 
 
 MathXArray & MathCursorPos::xcell() const
 {
        lyx::Assert(par_);
-       lyx::Assert(par_->nucleus());
-       return par_->nucleus()->xcell(idx_);
+       return par_->xcell(idx_);
 }
 
 
@@ -65,7 +63,7 @@ int MathCursorPos::ypos() const
 }
 
 
-std::ostream & operator<<(std::ostream & os, MathCursorPos const & p)
+ostream & operator<<(ostream & os, MathCursorPos const & p)
 {
        os << "(par: " << p.par_ << " idx: " << p.idx_ << " pos: " << p.pos_ << ")";
        return os;
@@ -94,5 +92,3 @@ bool operator<(MathCursorPos const & p, MathCursorPos const & q)
                return p.idx_ < q.idx_;
        return p.pos_ < q.pos_;
 }
-
-