From d270b35e58e018478dda996efc5d2f4d315811ec Mon Sep 17 00:00:00 2001 From: Mario Emmenlauer Date: Thu, 19 Nov 2020 09:43:34 +0100 Subject: Added TNonCopyable.h in favor of boost dependency --- lib/cpp/src/thrift/windows/OverlappedSubmissionThread.cpp | 2 +- lib/cpp/src/thrift/windows/OverlappedSubmissionThread.h | 6 +++--- lib/cpp/src/thrift/windows/Sync.h | 13 +++++++------ lib/cpp/src/thrift/windows/TWinsockSingleton.h | 4 ++-- 4 files changed, 13 insertions(+), 12 deletions(-) (limited to 'lib/cpp/src/thrift/windows') 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 #include -#include +#include #include #include 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 -#include +#include #include /* @@ -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 -#include +#include + #include /* @@ -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 // boost -#include +#include #include #include @@ -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 instance_ptr; -- cgit v1.2.1