diff options
author | Mario Emmenlauer <memmenlauer@biodataanalysis.de> | 2020-11-19 09:43:34 +0100 |
---|---|---|
committer | Mario Emmenlauer <memmenlauer@biodataanalysis.de> | 2021-02-12 15:35:11 +0100 |
commit | d270b35e58e018478dda996efc5d2f4d315811ec (patch) | |
tree | b6efa92aeab7d35cf0f479399d8e33976cc52426 /lib/cpp/src/thrift/windows | |
parent | 1d905de6442be17bb70ce7f306b6abc4b46dfc83 (diff) | |
download | thrift-d270b35e58e018478dda996efc5d2f4d315811ec.tar.gz |
Added TNonCopyable.h in favor of boost dependency
Diffstat (limited to 'lib/cpp/src/thrift/windows')
-rw-r--r-- | lib/cpp/src/thrift/windows/OverlappedSubmissionThread.cpp | 2 | ||||
-rw-r--r-- | lib/cpp/src/thrift/windows/OverlappedSubmissionThread.h | 6 | ||||
-rw-r--r-- | lib/cpp/src/thrift/windows/Sync.h | 13 | ||||
-rw-r--r-- | lib/cpp/src/thrift/windows/TWinsockSingleton.h | 4 |
4 files changed, 13 insertions, 12 deletions
diff --git a/lib/cpp/src/thrift/windows/OverlappedSubmissionThread.cpp b/lib/cpp/src/thrift/windows/OverlappedSubmissionThread.cpp index 5ac6fe00b..02beec7ee 100644 --- a/lib/cpp/src/thrift/windows/OverlappedSubmissionThread.cpp +++ b/lib/cpp/src/thrift/windows/OverlappedSubmissionThread.cpp @@ -19,7 +19,7 @@ #include <thrift/windows/OverlappedSubmissionThread.h> #include <thrift/transport/TTransportException.h> -#include <boost/noncopyable.hpp> +#include <thrift/TNonCopyable.h> #include <boost/scope_exit.hpp> #include <process.h> diff --git a/lib/cpp/src/thrift/windows/OverlappedSubmissionThread.h b/lib/cpp/src/thrift/windows/OverlappedSubmissionThread.h index dd0c5c957..6cecfc357 100644 --- a/lib/cpp/src/thrift/windows/OverlappedSubmissionThread.h +++ b/lib/cpp/src/thrift/windows/OverlappedSubmissionThread.h @@ -25,7 +25,7 @@ #endif #include <thrift/windows/Sync.h> -#include <boost/noncopyable.hpp> +#include <thrift/TNonCopyable.h> #include <Windows.h> /* @@ -89,7 +89,7 @@ struct DECLSPEC_ALIGN(MEMORY_ALLOCATION_ALIGNMENT) TOverlappedWorkItem : public bool process(); }; -class TOverlappedSubmissionThread : boost::noncopyable { +class TOverlappedSubmissionThread : apache::thrift::TNonCopyable { public: void addWorkItem(TOverlappedWorkItem* item); @@ -117,7 +117,7 @@ private: HANDLE thread_; }; -class TAutoOverlapThread : boost::noncopyable { +class TAutoOverlapThread : apache::thrift::TNonCopyable { private: TOverlappedSubmissionThread* p; diff --git a/lib/cpp/src/thrift/windows/Sync.h b/lib/cpp/src/thrift/windows/Sync.h index a296d7ec4..b1c83ee45 100644 --- a/lib/cpp/src/thrift/windows/Sync.h +++ b/lib/cpp/src/thrift/windows/Sync.h @@ -25,7 +25,8 @@ #endif #include <thrift/concurrency/Exception.h> -#include <boost/noncopyable.hpp> +#include <thrift/TNonCopyable.h> + #include <Windows.h> /* @@ -36,13 +37,13 @@ namespace apache { namespace thrift { -struct TCriticalSection : boost::noncopyable { +struct TCriticalSection : apache::thrift::TNonCopyable { CRITICAL_SECTION cs; TCriticalSection() { InitializeCriticalSection(&cs); } ~TCriticalSection() { DeleteCriticalSection(&cs); } }; -class TAutoCrit : boost::noncopyable { +class TAutoCrit : apache::thrift::TNonCopyable { private: CRITICAL_SECTION* cs_; @@ -51,7 +52,7 @@ public: ~TAutoCrit() { LeaveCriticalSection(cs_); } }; -struct TAutoResetEvent : boost::noncopyable { +struct TAutoResetEvent : apache::thrift::TNonCopyable { HANDLE h; TAutoResetEvent() { @@ -64,7 +65,7 @@ struct TAutoResetEvent : boost::noncopyable { ~TAutoResetEvent() { CloseHandle(h); } }; -struct TManualResetEvent : boost::noncopyable { +struct TManualResetEvent : apache::thrift::TNonCopyable { HANDLE h; TManualResetEvent() { @@ -77,7 +78,7 @@ struct TManualResetEvent : boost::noncopyable { ~TManualResetEvent() { CloseHandle(h); } }; -struct TAutoHandle : boost::noncopyable { +struct TAutoHandle : apache::thrift::TNonCopyable { HANDLE h; explicit TAutoHandle(HANDLE h_ = INVALID_HANDLE_VALUE) : h(h_) {} ~TAutoHandle() { diff --git a/lib/cpp/src/thrift/windows/TWinsockSingleton.h b/lib/cpp/src/thrift/windows/TWinsockSingleton.h index a30806b98..a098d2c71 100644 --- a/lib/cpp/src/thrift/windows/TWinsockSingleton.h +++ b/lib/cpp/src/thrift/windows/TWinsockSingleton.h @@ -31,7 +31,7 @@ #include <thrift/thrift-config.h> // boost -#include <boost/noncopyable.hpp> +#include <thrift/TNonCopyable.h> #include <memory> #include <mutex> @@ -45,7 +45,7 @@ namespace transport { * Winsock2 must be intialised once only in order to create sockets. This class * performs a one time initialisation when create is called. */ -class TWinsockSingleton : private boost::noncopyable { +class TWinsockSingleton : private apache::thrift::TNonCopyable { public: typedef std::shared_ptr<TWinsockSingleton> instance_ptr; |