summaryrefslogtreecommitdiff
path: root/include/o3tl
diff options
context:
space:
mode:
authorDaniel Robertson <danlrobertson89@gmail.com>2015-08-29 00:15:59 -0400
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-08-29 22:51:36 +0000
commit6900bf41e2b7d7840e11ee1847efd671cf9b0921 (patch)
treef3e0b62bc7e1c2e5c56eb1e671c4ba882b03c56b /include/o3tl
parent311e77440f11dbe8e49d75b09a4ae0f850ce00c5 (diff)
o3tl/cow_wrapper: remove boost dependency
Remove boost dependencies from ::o3tl::cow_wrapper, and add the necessary includes to files including checked_delete and noncopyable that do not already include the necessary files. Change-Id: Iedae4232002792724226829a5d5cf9d16ffd0686 Reviewed-on: https://gerrit.libreoffice.org/18125 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'include/o3tl')
-rw-r--r--include/o3tl/cow_wrapper.hxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/o3tl/cow_wrapper.hxx b/include/o3tl/cow_wrapper.hxx
index da822b2c88b8..a5edebf46cd0 100644
--- a/include/o3tl/cow_wrapper.hxx
+++ b/include/o3tl/cow_wrapper.hxx
@@ -24,9 +24,6 @@
#include <algorithm>
-#include <boost/noncopyable.hpp>
-#include <boost/checked_delete.hpp>
-
namespace o3tl
{
/** Thread-unsafe refcounting
@@ -178,8 +175,11 @@ int cow_wrapper_client::queryUnmodified() const
/** shared value object - gets cloned before cow_wrapper hands
out a non-const reference to it
*/
- struct impl_t : private boost::noncopyable
+ struct impl_t
{
+ impl_t(const impl_t&) = delete;
+ impl_t& operator=(const impl_t&) = delete;
+
impl_t() :
m_value(),
m_ref_count(1)
@@ -199,7 +199,10 @@ int cow_wrapper_client::queryUnmodified() const
void release()
{
if( m_pimpl && !MTPolicy::decrementCount(m_pimpl->m_ref_count) )
- boost::checked_delete(m_pimpl), m_pimpl = nullptr;
+ {
+ delete m_pimpl;
+ m_pimpl = nullptr;
+ }
}
public: