[Libreoffice-commits] .: sw/source
Michael Stahl
mst at kemper.freedesktop.org
Tue Nov 29 01:40:58 PST 2011
sw/source/core/crsr/pam.cxx | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
New commits:
commit d89133d191a468fdc7c2f3662fb6619eb281bbd7
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Nov 29 10:22:13 2011 +0100
SwPosition: comparing pointers is silly
This does not need to be a total ordering.
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 8e59406..4ef51b4 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -119,8 +119,7 @@ sal_Bool SwPosition::operator<(const SwPosition &rPos) const
}
else // by convention position with no index is smaller
{
- return (pThisReg) ? sal_False :
- ((pOtherReg) ? sal_True : (this < &rPos));
+ return (pOtherReg) ? sal_True : sal_False;
}
}
return sal_False;
@@ -143,8 +142,7 @@ sal_Bool SwPosition::operator>(const SwPosition &rPos) const
}
else // by convention position with no index is smaller
{
- return (pThisReg) ? sal_True:
- ((pOtherReg) ? sal_False: (this > &rPos));
+ return (pThisReg) ? sal_True : sal_False;
}
}
return sal_False;
@@ -167,8 +165,7 @@ sal_Bool SwPosition::operator<=(const SwPosition &rPos) const
}
else // by convention position with no index is smaller
{
- return (pThisReg) ? sal_False :
- ((pOtherReg) ? sal_True : (this <= &rPos));
+ return (pThisReg) ? sal_False : sal_True;
}
}
return sal_False;
@@ -191,8 +188,7 @@ sal_Bool SwPosition::operator>=(const SwPosition &rPos) const
}
else // by convention position with no index is smaller
{
- return (pThisReg) ? sal_True:
- ((pOtherReg) ? sal_False: (this >= &rPos));
+ return (pOtherReg) ? sal_False : sal_True;
}
}
return sal_False;
More information about the Libreoffice-commits
mailing list