From 0014ca7eee593b05959b99a0d9afb263f61ecf01 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 11 Feb 2008 12:26:06 +0000 Subject: [PATCH] Fix bug introduced in rev 22934. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22941 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/CursorSlice.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CursorSlice.cpp b/src/CursorSlice.cpp index 3eb45e567f..09cf624134 100644 --- a/src/CursorSlice.cpp +++ b/src/CursorSlice.cpp @@ -164,7 +164,7 @@ bool CursorSlice::at_begin() 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_; @@ -173,7 +173,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_; @@ -182,7 +182,7 @@ bool operator!=(CursorSlice const & p, CursorSlice const & q) bool operator<(CursorSlice const & p, CursorSlice const & q) { - if (&p.inset_ != &q.inset_) { + if (p.inset_ != q.inset_) { LYXERR0("can't compare cursor and anchor in different insets\n" << "p: " << p << '\n' << "q: " << q); BOOST_ASSERT(false); @@ -210,13 +210,13 @@ bool operator<=(CursorSlice const & p, CursorSlice const & q) ostream & operator<<(ostream & os, CursorSlice const & item) { return os - << "inset: " << (void *)&item.inset_ + << "inset: " << (void *)item.inset_ // << " text: " << item.text() << " idx: " << item.idx_ << " par: " << item.pit_ << " pos: " << item.pos_ -// << " x: " << item.inset_.x() -// << " y: " << item.inset_.y() +// << " x: " << item.inset_->x() +// << " y: " << item.inset_->y() ; }