summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-04-03 17:41:38 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-04-03 17:41:56 +0200
commit8f5df0dbbeca681907e0abbc5efee23ab0cddbc3 (patch)
tree2725dc83685d5ddc50f8127e32be6c5177b543ed
parentea3277265af9aab9a297151d5e1f3adfb1c823ef (diff)
Remove unused copy ctor (and use boost::noncopyable)
Change-Id: Ib797c84e64a114df0e80067a97b714d4f97ff20a
-rw-r--r--cppuhelper/source/weak.cxx31
1 files changed, 5 insertions, 26 deletions
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index 52c920fbe63b..d75e16c2147e 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <boost/noncopyable.hpp>
#include <osl/mutex.hxx>
#include <cppuhelper/weakagg.hxx>
#include <cppuhelper/interfacecontainer.hxx>
@@ -41,7 +44,7 @@ inline static Mutex & getWeakMutex() SAL_THROW(())
//-- OWeakConnectionPoint ----------------------------------------------------
-class OWeakConnectionPoint : public XAdapter
+class OWeakConnectionPoint: public XAdapter, private boost::noncopyable
{
public:
/**
@@ -67,9 +70,6 @@ public:
void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
private:
- OWeakConnectionPoint(OWeakConnectionPoint &); // not defined
- void operator =(OWeakConnectionPoint &); // not defined
-
virtual ~OWeakConnectionPoint() {}
/// The reference counter.
@@ -316,10 +316,9 @@ namespace uno
//-- OWeakRefListener -----------------------------------------------------
-class OWeakRefListener : public XReference
+class OWeakRefListener: public XReference, private boost::noncopyable
{
public:
- OWeakRefListener(const OWeakRefListener& rRef) SAL_THROW(());
OWeakRefListener(const Reference< XInterface >& xInt) SAL_THROW(());
virtual ~OWeakRefListener() SAL_THROW(());
@@ -335,28 +334,8 @@ public:
oslInterlockedCount m_aRefCount;
/// The connection point of the weak object
Reference< XAdapter > m_XWeakConnectionPoint;
-
-private:
- OWeakRefListener& SAL_CALL operator=(const OWeakRefListener& rRef) SAL_THROW(());
};
-OWeakRefListener::OWeakRefListener(const OWeakRefListener& rRef) SAL_THROW(())
- : com::sun::star::uno::XReference()
- , m_aRefCount( 1 )
-{
- try
- {
- m_XWeakConnectionPoint = rRef.m_XWeakConnectionPoint;
-
- if (m_XWeakConnectionPoint.is())
- {
- m_XWeakConnectionPoint->addReference((XReference*)this);
- }
- }
- catch (RuntimeException &) { OSL_ASSERT( false ); } // assert here, but no unexpected()
- osl_atomic_decrement( &m_aRefCount );
-}
-
OWeakRefListener::OWeakRefListener(const Reference< XInterface >& xInt) SAL_THROW(())
: m_aRefCount( 1 )
{