summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2011-11-29 10:22:13 +0100
committerMichael Stahl <mstahl@redhat.com>2011-11-29 10:39:49 +0100
commitd89133d191a468fdc7c2f3662fb6619eb281bbd7 (patch)
tree85d59a487fae2d6cffb6768ca49bddcf3189aa8c /sw
parent337eda19a516646752f195d7c2a35cc1af2e9410 (diff)
SwPosition: comparing pointers is silly
This does not need to be a total ordering.
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/pam.cxx12
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;