diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-16 13:03:53 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-16 13:11:36 +0000 |
commit | bf96ec5d8af6fe806ee634e556f7a9a105894f0f (patch) | |
tree | 71e6ad177bc6b93b549790fe2d884760a768ac7d /include/comphelper | |
parent | 6b45e4fa5381d119ff0759825454a7154e1363b7 (diff) |
boost->std
Change-Id: I44b208a2c5c5bf73ac025462c9f7bd499ed0a49b
Diffstat (limited to 'include/comphelper')
-rw-r--r-- | include/comphelper/scopeguard.hxx | 9 | ||||
-rw-r--r-- | include/comphelper/solarmutex.hxx | 6 | ||||
-rw-r--r-- | include/comphelper/syntaxhighlight.hxx | 5 | ||||
-rw-r--r-- | include/comphelper/threadpool.hxx | 6 |
4 files changed, 16 insertions, 10 deletions
diff --git a/include/comphelper/scopeguard.hxx b/include/comphelper/scopeguard.hxx index 7e7d0e3e8300..4f64d5bf08b6 100644 --- a/include/comphelper/scopeguard.hxx +++ b/include/comphelper/scopeguard.hxx @@ -22,16 +22,13 @@ #include <comphelper/comphelperdllapi.h> #include <boost/function.hpp> -#include <boost/noncopyable.hpp> #include <boost/bind.hpp> namespace comphelper { /** ScopeGuard to ease writing exception-safe code. */ -class COMPHELPER_DLLPUBLIC ScopeGuard : private ::boost::noncopyable - // noncopyable until we have - // good reasons... +class COMPHELPER_DLLPUBLIC ScopeGuard { public: enum exc_handling { IGNORE_EXCEPTIONS, ALLOW_EXCEPTIONS }; @@ -53,6 +50,10 @@ public: void dismiss(); private: + // noncopyable until we have good reasons... + ScopeGuard(const ScopeGuard&) SAL_DELETED_FUNCTION; + ScopeGuard& operator=(const ScopeGuard&) SAL_DELETED_FUNCTION; + ::boost::function0<void> m_func; // preferring portable syntax exc_handling const m_excHandling; }; diff --git a/include/comphelper/solarmutex.hxx b/include/comphelper/solarmutex.hxx index 6bb93f17aa27..3b66a005370c 100644 --- a/include/comphelper/solarmutex.hxx +++ b/include/comphelper/solarmutex.hxx @@ -22,14 +22,13 @@ #include <sal/config.h> -#include <boost/noncopyable.hpp> #include <comphelper/comphelperdllapi.h> namespace comphelper { /** SolarMutex interface, needed for Application::GetSolarMutex(). */ -class COMPHELPER_DLLPUBLIC SolarMutex: private boost::noncopyable { +class COMPHELPER_DLLPUBLIC SolarMutex { public: virtual void acquire() = 0; @@ -41,6 +40,9 @@ protected: SolarMutex(); virtual ~SolarMutex(); +private: + SolarMutex(const SolarMutex&) SAL_DELETED_FUNCTION; + SolarMutex& operator=(const SolarMutex&) SAL_DELETED_FUNCTION; }; } diff --git a/include/comphelper/syntaxhighlight.hxx b/include/comphelper/syntaxhighlight.hxx index 16d3c12e046d..c2487499c375 100644 --- a/include/comphelper/syntaxhighlight.hxx +++ b/include/comphelper/syntaxhighlight.hxx @@ -19,7 +19,6 @@ #ifndef INCLUDED_COMPHELPER_SYNTAXHIGHLIGHT_HXX #define INCLUDED_COMPHELPER_SYNTAXHIGHLIGHT_HXX -#include <boost/noncopyable.hpp> #include <rtl/ustring.hxx> #include <comphelper/comphelperdllapi.h> @@ -66,13 +65,15 @@ enum HighlighterLanguage HIGHLIGHT_SQL }; -class COMPHELPER_DLLPUBLIC SyntaxHighlighter: private boost::noncopyable +class COMPHELPER_DLLPUBLIC SyntaxHighlighter { class Tokenizer; HighlighterLanguage eLanguage; std::unique_ptr<Tokenizer> m_tokenizer; + SyntaxHighlighter(const SyntaxHighlighter&) SAL_DELETED_FUNCTION; + SyntaxHighlighter& operator=(const SyntaxHighlighter&) SAL_DELETED_FUNCTION; public: SyntaxHighlighter(HighlighterLanguage language); ~SyntaxHighlighter(); diff --git a/include/comphelper/threadpool.hxx b/include/comphelper/threadpool.hxx index b5606e027f05..1aa4733e6012 100644 --- a/include/comphelper/threadpool.hxx +++ b/include/comphelper/threadpool.hxx @@ -15,7 +15,6 @@ #include <osl/mutex.hxx> #include <osl/conditn.hxx> #include <rtl/ref.hxx> -#include <boost/noncopyable.hpp> #include <vector> #include <comphelper/comphelperdllapi.h> @@ -30,7 +29,7 @@ public: }; /// A very basic thread pool implementation -class COMPHELPER_DLLPUBLIC ThreadPool: private boost::noncopyable +class COMPHELPER_DLLPUBLIC ThreadPool { public: /// returns a pointer to a shared pool with optimal thread @@ -47,6 +46,9 @@ public: void waitUntilEmpty(); private: + ThreadPool(const ThreadPool&) SAL_DELETED_FUNCTION; + ThreadPool& operator=(const ThreadPool&) SAL_DELETED_FUNCTION; + class ThreadWorker; friend class ThreadWorker; |