This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git
commit 77d26e2e5c2f9624f6d4b5f20819448164a7ae1b Author: cyy <cyye...@outlook.com> AuthorDate: Sun Jan 6 10:17:35 2019 +0800 replace boost unique_ptr with std::unique_ptr --- lib/cpp/src/thrift/transport/TFileTransport.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/cpp/src/thrift/transport/TFileTransport.cpp b/lib/cpp/src/thrift/transport/TFileTransport.cpp index c9f65b8..afb4411 100644 --- a/lib/cpp/src/thrift/transport/TFileTransport.cpp +++ b/lib/cpp/src/thrift/transport/TFileTransport.cpp @@ -25,13 +25,6 @@ #include <thrift/concurrency/FunctionRunner.h> #include <boost/version.hpp> -#if (BOOST_VERSION >= 105700) -#include <boost/move/unique_ptr.hpp> -using boost::movelib::unique_ptr; -#else -#include <boost/interprocess/smart_ptr/unique_ptr.hpp> -using boost::interprocess::unique_ptr; -#endif #ifdef HAVE_SYS_TIME_H #include <sys/time.h> @@ -49,6 +42,7 @@ using boost::interprocess::unique_ptr; #include <cstring> #include <iostream> #include <limits> +#include <memory> #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif @@ -203,8 +197,6 @@ void TFileTransport::write(const uint8_t* buf, uint32_t len) { enqueueEvent(buf, len); } -// this is needed until boost 1.57 as the older unique_ptr implementation -// has no default deleter in interprocess template <class _T> struct uniqueDeleter { @@ -228,7 +220,7 @@ void TFileTransport::enqueueEvent(const uint8_t* buf, uint32_t eventLen) { return; } - unique_ptr<eventInfo, uniqueDeleter<eventInfo> > toEnqueue(new eventInfo()); + std::unique_ptr<eventInfo, uniqueDeleter<eventInfo> > toEnqueue(new eventInfo()); toEnqueue->eventBuff_ = new uint8_t[(sizeof(uint8_t) * eventLen) + 4]; // first 4 bytes is the event length