diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-12 15:29:18 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-09 22:21:04 +0100 |
commit | 125895c355ebc9f60e792cdfffdf790c10c950cc (patch) | |
tree | 5a8882d7a10b512b6c6d6c7e3752b24426aefdf1 /include/vcl/vclptr.hxx | |
parent | f7811b53c95410b8f1aa65b93b65701fd427a64f (diff) |
vcl:fixes towards unit test happiness
Change-Id: Ic0a3075c7616f604b93228dff149931cf25a5ed8
Diffstat (limited to 'include/vcl/vclptr.hxx')
-rw-r--r-- | include/vcl/vclptr.hxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx index c32dbcc6691d..37da714166dc 100644 --- a/include/vcl/vclptr.hxx +++ b/include/vcl/vclptr.hxx @@ -136,6 +136,12 @@ public: m_rInnerRef.set(pBody); } + inline VclPtr<reference_type>& SAL_CALL operator= (reference_type * pBody) + { + m_rInnerRef.set(pBody); + return *this; + } + inline SAL_CALL operator reference_type * () const { return m_rInnerRef.get(); @@ -151,8 +157,9 @@ public: // hold it alive for the lifetime of this method ::rtl::Reference<reference_type> aTmp(m_rInnerRef); m_rInnerRef.clear(); // we should use some 'swap' method ideally ;-) - if (aTmp.get()) + if (aTmp.get()) { aTmp->dispose(); + } } }; // class VclPtr |