]> git.lyx.org Git - lyx.git/blobdiff - src/cursor_slice.C
hopefully fix tex2lyx linking.
[lyx.git] / src / cursor_slice.C
index 145dcace3b703120c65b514bafe63888b112d622..02e7b4ab6270d82dbd3b3b8976c68a2ac8668b29 100644 (file)
@@ -23,6 +23,9 @@
 
 #include <boost/assert.hpp>
 
+
+namespace lyx {
+
 using std::endl;
 
 
@@ -56,7 +59,7 @@ Paragraph const & CursorSlice::paragraph() const
 }
 
 
-CursorSlice::pos_type CursorSlice::lastpos() const
+pos_type CursorSlice::lastpos() const
 {
        BOOST_ASSERT(inset_);
        return inset_->asInsetMath() ? cell().size() : paragraph().size();
@@ -79,7 +82,7 @@ CursorSlice::col_type CursorSlice::col() const
 
 bool operator==(CursorSlice const & p, CursorSlice const & q)
 {
-       return &p.inset() == &q.inset()
+       return p.inset_ == q.inset_
               && p.idx() == q.idx()
               && p.pit() == q.pit()
               && p.pos() == q.pos();
@@ -88,7 +91,7 @@ bool operator==(CursorSlice const & p, CursorSlice const & q)
 
 bool operator!=(CursorSlice const & p, CursorSlice const & q)
 {
-       return &p.inset() != &q.inset()
+       return p.inset_ != q.inset_
               || p.idx() != q.idx()
               || p.pit() != q.pit()
               || p.pos() != q.pos();
@@ -134,3 +137,6 @@ std::ostream & operator<<(std::ostream & os, CursorSlice const & item)
 //        << " y: " << item.inset().y()
 ;
 }
+
+
+} // namespace lyx