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 @@
namespace rtl
{
/** Interface for a 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 reference class for reference type.
*/
template <class reference_type>
class Reference
......
......@@ -31,7 +31,7 @@ namespace salhelper
class ReferenceObject : public rtl::IReference
class ReferenceObject
{
/** Representation.
*/
......@@ -63,27 +63,22 @@ public:
public:
/** Construction.
*/
inline ReferenceObject() : m_nReferenceCount (0)
inline ReferenceObject() : m_nReferenceCount(0)
{}
/** IReference.
*/
virtual oslInterlockedCount SAL_CALL acquire() SAL_OVERRIDE
void SAL_CALL acquire()
{
return osl_atomic_increment (&m_nReferenceCount);
osl_atomic_increment(&m_nReferenceCount);
}
virtual oslInterlockedCount SAL_CALL release() SAL_OVERRIDE
void SAL_CALL release()
{
oslInterlockedCount result;
result = ::osl_atomic_decrement (&m_nReferenceCount);
if (result == 0)
if (osl_atomic_decrement(&m_nReferenceCount) == 0)
{
// Last reference released.
delete this;
}
return (result);
}
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