Fix bug introduced in rev 22934.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22941 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-11 12:26:06 +00:00
parent b546fff555
commit 0014ca7eee

View File

@ -164,7 +164,7 @@ bool CursorSlice::at_begin() const
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.idx_ == q.idx_
&& p.pit_ == q.pit_ && p.pit_ == q.pit_
&& p.pos_ == q.pos_; && p.pos_ == q.pos_;
@ -173,7 +173,7 @@ bool operator==(CursorSlice const & p, CursorSlice const & q)
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.idx_ != q.idx_
|| p.pit_ != q.pit_ || p.pit_ != q.pit_
|| p.pos_ != q.pos_; || p.pos_ != q.pos_;
@ -182,7 +182,7 @@ bool operator!=(CursorSlice const & p, CursorSlice const & q)
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" LYXERR0("can't compare cursor and anchor in different insets\n"
<< "p: " << p << '\n' << "q: " << q); << "p: " << p << '\n' << "q: " << q);
BOOST_ASSERT(false); BOOST_ASSERT(false);
@ -210,13 +210,13 @@ bool operator<=(CursorSlice const & p, CursorSlice const & q)
ostream & operator<<(ostream & os, CursorSlice const & item) ostream & operator<<(ostream & os, CursorSlice const & item)
{ {
return os return os
<< "inset: " << (void *)&item.inset_ << "inset: " << (void *)item.inset_
// << " text: " << item.text() // << " text: " << item.text()
<< " idx: " << item.idx_ << " idx: " << item.idx_
<< " par: " << item.pit_ << " par: " << item.pit_
<< " pos: " << item.pos_ << " pos: " << item.pos_
// << " x: " << item.inset_.x() // << " x: " << item.inset_->x()
// << " y: " << item.inset_.y() // << " y: " << item.inset_->y()
; ;
} }