Kaydet (Commit) 0c6c66b6 authored tarafından Noel Grandin's avatar Noel Grandin

remove IReference

now that it is unused

Change-Id: I95d9f4cc50114dd9f9c9f5d095372766f44b3094
üst 96afb3cf
...@@ -30,28 +30,7 @@ ...@@ -30,28 +30,7 @@
namespace rtl namespace rtl
{ {
/** Interface for a reference type. /** Template reference class for reference type.
*/
class IReference
{
public:
/** @see osl_incrementInterlockedCount.
*/
virtual oslInterlockedCount SAL_CALL acquire() = 0;
/** @see osl_decrementInterlockedCount.
*/
virtual oslInterlockedCount SAL_CALL release() = 0;
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
#endif
~IReference() {}
// avoid warnings about virtual members and non-virtual dtor
};
/** Template reference class for reference type derived from IReference.
*/ */
template <class reference_type> template <class reference_type>
class Reference class Reference
......
...@@ -31,7 +31,7 @@ namespace salhelper ...@@ -31,7 +31,7 @@ namespace salhelper
class ReferenceObject : public rtl::IReference class ReferenceObject
{ {
/** Representation. /** Representation.
*/ */
...@@ -63,27 +63,22 @@ public: ...@@ -63,27 +63,22 @@ public:
public: public:
/** Construction. /** Construction.
*/ */
inline ReferenceObject() : m_nReferenceCount (0) inline ReferenceObject() : m_nReferenceCount(0)
{} {}
/** IReference. void SAL_CALL acquire()
*/
virtual oslInterlockedCount SAL_CALL acquire() SAL_OVERRIDE
{ {
return osl_atomic_increment (&m_nReferenceCount); osl_atomic_increment(&m_nReferenceCount);
} }
virtual oslInterlockedCount SAL_CALL release() SAL_OVERRIDE void SAL_CALL release()
{ {
oslInterlockedCount result; if (osl_atomic_decrement(&m_nReferenceCount) == 0)
result = ::osl_atomic_decrement (&m_nReferenceCount);
if (result == 0)
{ {
// Last reference released. // Last reference released.
delete this; delete this;
} }
return (result);
} }
protected: protected:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment