summaryrefslogtreecommitdiff
path: root/o3tl
diff options
context:
space:
mode:
authorThorsten Behrens <thb@openoffice.org>2006-05-11 10:18:21 +0000
committerThorsten Behrens <thb@openoffice.org>2006-05-11 10:18:21 +0000
commit33d315c62447089ff3f63a799f55f2785c3f206b (patch)
tree5ca532aa70cec0ec3dbca4bf602c9936da92f4b9 /o3tl
parentc2a3bf6701bbec18dde57509b34cc5b18973df5b (diff)
#i63310# Optimization: for operator==/!=, first checking for same object (via cheap pointer comparison)
Diffstat (limited to 'o3tl')
-rw-r--r--o3tl/inc/o3tl/cow_wrapper.hxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/o3tl/inc/o3tl/cow_wrapper.hxx b/o3tl/inc/o3tl/cow_wrapper.hxx
index ac2b88765549..2912ae942e3a 100644
--- a/o3tl/inc/o3tl/cow_wrapper.hxx
+++ b/o3tl/inc/o3tl/cow_wrapper.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: cow_wrapper.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: thb $ $Date: 2006-03-28 23:22:28 $
+ * last change: $Author: thb $ $Date: 2006-05-11 11:18:21 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -300,16 +300,16 @@ void cow_wrapper_client::queryUnmodified() const
};
- template<class A, class B, class P> inline bool operator==( const cow_wrapper<A,P>& a,
- const cow_wrapper<B,P>& b )
+ template<class T, class P> inline bool operator==( const cow_wrapper<T,P>& a,
+ const cow_wrapper<T,P>& b )
{
- return *a == *b;
+ return a.same_object(b) ? true : *a == *b;
}
- template<class A, class B, class P> inline bool operator!=( const cow_wrapper<A,P>& a,
- const cow_wrapper<B,P>& b )
+ template<class T, class P> inline bool operator!=( const cow_wrapper<T,P>& a,
+ const cow_wrapper<T,P>& b )
{
- return *a != *b;
+ return a.same_object(b) ? false : *a != *b;
}
template<class A, class B, class P> inline bool operator<( const cow_wrapper<A,P>& a,