This is an automated email from the ASF dual-hosted git repository.
jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new 5323965 THRIFT-3622 Fix deprecated uses of std::auto_ptr Client: cpp
Patch: zeshuai007 <[email protected]>
5323965 is described below
commit 53239655b7f48e741d9112ae8ca739c622268d7c
Author: zeshuai007 <[email protected]>
AuthorDate: Fri May 8 15:15:49 2020 +0800
THRIFT-3622 Fix deprecated uses of std::auto_ptr
Client: cpp
Patch: zeshuai007 <[email protected]>
This closes #2135
---
compiler/cpp/src/thrift/generate/t_cpp_generator.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
index a3ac854..14d1eb5 100644
--- a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
@@ -2199,7 +2199,7 @@ void
t_cpp_generator::generate_service_async_skeleton(t_service* tservice) {
<< "public " << svcname << "CobSvIf {" << endl << " public:" <<
endl;
indent_up();
f_skeleton << indent() << svcname << "AsyncHandler() {" << endl << indent()
- << " syncHandler_ = std::auto_ptr<" << svcname << "Handler>(new
" << svcname
+ << " syncHandler_ = std::unique_ptr<" << svcname <<
"Handler>(new " << svcname
<< "Handler);" << endl << indent() << " // Your initialization
goes here" << endl
<< indent() << "}" << endl;
f_skeleton << indent() << "virtual ~" << service_name_ << "AsyncHandler();"
<< endl;
@@ -2223,7 +2223,7 @@ void
t_cpp_generator::generate_service_async_skeleton(t_service* tservice) {
scope_down(f_skeleton);
}
- f_skeleton << endl << " protected:" << endl << indent() << "std::auto_ptr<"
<< svcname
+ f_skeleton << endl << " protected:" << endl << indent() <<
"std::unique_ptr<" << svcname
<< "Handler> syncHandler_;" << endl;
indent_down();
f_skeleton << "};" << endl << endl;