summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-07-11 16:32:28 +0200
committerNoel Grandin <noel@peralex.com>2014-07-14 11:07:47 +0200
commit0c6c66b64a9572a8e474f6dfdedcbebfe54758af (patch)
treeb50956af345b6a5c585b727b60eeafa75d56dbb7
parent96afb3cf40d913dfcfc6f51240efd33f9d0740a6 (diff)
remove IReference
now that it is unused Change-Id: I95d9f4cc50114dd9f9c9f5d095372766f44b3094
-rw-r--r--include/rtl/ref.hxx23
-rw-r--r--include/salhelper/refobj.hxx17
2 files changed, 7 insertions, 33 deletions
diff --git a/include/rtl/ref.hxx b/include/rtl/ref.hxx
index 3e90ed2b4707..77de66ab7348 100644
--- a/include/rtl/ref.hxx
+++ b/include/rtl/ref.hxx
@@ -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
diff --git a/include/salhelper/refobj.hxx b/include/salhelper/refobj.hxx
index 6278e2f0fc64..f84c31297621 100644
--- a/include/salhelper/refobj.hxx
+++ b/include/salhelper/refobj.hxx
@@ -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: