aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/java/java_shared_code_generator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/java/java_shared_code_generator.cc')
-rw-r--r--src/google/protobuf/compiler/java/java_shared_code_generator.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/google/protobuf/compiler/java/java_shared_code_generator.cc b/src/google/protobuf/compiler/java/java_shared_code_generator.cc
index 9a42aba9..0cec20b9 100644
--- a/src/google/protobuf/compiler/java/java_shared_code_generator.cc
+++ b/src/google/protobuf/compiler/java/java_shared_code_generator.cc
@@ -33,16 +33,13 @@
#include <google/protobuf/compiler/java/java_shared_code_generator.h>
#include <memory>
-#ifndef _SHARED_PTR_H
-#include <google/protobuf/stubs/shared_ptr.h>
-#endif
#include <google/protobuf/compiler/java/java_helpers.h>
#include <google/protobuf/compiler/java/java_name_resolver.h>
#include <google/protobuf/compiler/code_generator.h>
+#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/io/zero_copy_stream.h>
-#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/stubs/strutil.h>
@@ -69,11 +66,11 @@ void SharedCodeGenerator::Generate(GeneratorContext* context,
string classname = name_resolver_->GetDescriptorClassName(file_);
string filename = package_dir + classname + ".java";
file_list->push_back(filename);
- google::protobuf::scoped_ptr<io::ZeroCopyOutputStream> output(context->Open(filename));
+ std::unique_ptr<io::ZeroCopyOutputStream> output(context->Open(filename));
GeneratedCodeInfo annotations;
io::AnnotationProtoCollector<GeneratedCodeInfo> annotation_collector(
&annotations);
- google::protobuf::scoped_ptr<io::Printer> printer(
+ std::unique_ptr<io::Printer> printer(
new io::Printer(output.get(), '$',
options_.annotate_code ? &annotation_collector : NULL));
string info_relative_path = classname + ".java.pb.meta";
@@ -108,7 +105,7 @@ void SharedCodeGenerator::Generate(GeneratorContext* context,
"}\n");
if (options_.annotate_code) {
- google::protobuf::scoped_ptr<io::ZeroCopyOutputStream> info_output(
+ std::unique_ptr<io::ZeroCopyOutputStream> info_output(
context->Open(info_full_path));
annotations.SerializeToZeroCopyStream(info_output.get());
annotation_file_list->push_back(info_full_path);