summaryrefslogtreecommitdiff
path: root/include/vcl/threadex.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-31 11:28:46 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-01 06:48:50 +0000
commitc150ac07873e2861d0b4531fe88648801c9995be (patch)
tree9f09f6095644feb0b9eacf3af68bd02f046b7917 /include/vcl/threadex.hxx
parent3aaa90c36c2910847576bd9362276b0e9b5acca4 (diff)
loplugin:unusedmethods
Change-Id: Ia7981447e96d9ac87526ad1276585ab3077d7f08 Reviewed-on: https://gerrit.libreoffice.org/25707 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/vcl/threadex.hxx')
-rw-r--r--include/vcl/threadex.hxx29
1 files changed, 0 insertions, 29 deletions
diff --git a/include/vcl/threadex.hxx b/include/vcl/threadex.hxx
index 891d022660a6..2f27657aafea 100644
--- a/include/vcl/threadex.hxx
+++ b/include/vcl/threadex.hxx
@@ -120,35 +120,6 @@ private:
FuncT const m_func;
};
-template <typename T>
-class copy_back_wrapper
-{
-public:
- operator T *() const { return &m_holder->m_value; }
- operator T &() const { return m_holder->m_value; }
-
- explicit copy_back_wrapper( T * p ) : m_holder( new data_holder(p) ) {}
-
- // no thread-safe counting needed here, because calling thread blocks
- // until solar thread has executed the functor.
- copy_back_wrapper( copy_back_wrapper<T> const& r )
- : m_holder(r.m_holder) { ++m_holder->m_refCount; }
- ~copy_back_wrapper() {
- --m_holder->m_refCount;
- if (m_holder->m_refCount == 0) {
- delete m_holder;
- }
- }
-private:
- struct data_holder {
- T m_value;
- T * const m_ptr;
- data_holder( T * p ) : m_value(*p), m_ptr(p) {}
- ~data_holder() { *m_ptr = m_value; }
- };
- data_holder * const m_holder;
-};
-
} // namespace detail