summaryrefslogtreecommitdiff
path: root/include/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-12-22 09:05:32 +0200
committerNoel Grandin <noel@peralex.com>2015-12-22 09:53:27 +0200
commit144e73f50c49333f61c6f27b882be9dbc232ceb4 (patch)
treee6d9e81d3cc0c6b337daf4845917649cf32a487f /include/tools
parent98f4f2bb0f873d6cae8e9646d8eecc857c1cdd0f (diff)
fix Link::operator<
so that it is consistent with operator== Change-Id: Ie4c68a1f02d8c298fe99e42c5854f89db79bf3bc
Diffstat (limited to 'include/tools')
-rw-r--r--include/tools/link.hxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/tools/link.hxx b/include/tools/link.hxx
index cbac102810d1..584f963d938f 100644
--- a/include/tools/link.hxx
+++ b/include/tools/link.hxx
@@ -88,8 +88,14 @@ public:
bool operator !() const { return !IsSet(); }
bool operator <(Link const & other) const {
- return reinterpret_cast<sal_uIntPtr>(function_)
- < reinterpret_cast<sal_uIntPtr>(other.function_);
+ sal_uIntPtr ptr1 = reinterpret_cast<sal_uIntPtr>(function_);
+ sal_uIntPtr ptr2 = reinterpret_cast<sal_uIntPtr>(other.function_);
+ if (ptr1 < ptr2)
+ return true;
+ else if (ptr1 > ptr2)
+ return false;
+ else
+ return instance_ < other.instance_;
};
bool operator ==(Link const & other) const