mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
avoid comparing the addresses of dereferenced 0 pointers
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15172 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2e9ab2c009
commit
864515f3a3
@ -79,7 +79,7 @@ CursorSlice::col_type CursorSlice::col() 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();
|
||||||
@ -88,7 +88,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();
|
||||||
|
Loading…
Reference in New Issue
Block a user