diff options
author | Michael Stahl <mstahl@redhat.com> | 2011-11-29 10:22:13 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2011-11-29 10:39:49 +0100 |
commit | d89133d191a468fdc7c2f3662fb6619eb281bbd7 (patch) | |
tree | 85d59a487fae2d6cffb6768ca49bddcf3189aa8c | |
parent | 337eda19a516646752f195d7c2a35cc1af2e9410 (diff) |
SwPosition: comparing pointers is silly
This does not need to be a total ordering.
-rw-r--r-- | sw/source/core/crsr/pam.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 8e59406a3156..4ef51b4161d4 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; |