diff options
Diffstat (limited to 'src/google/protobuf/compiler/javanano')
5 files changed, 7 insertions, 7 deletions
diff --git a/src/google/protobuf/compiler/javanano/javanano_field.cc b/src/google/protobuf/compiler/javanano/javanano_field.cc index e31d1177..0c134fe1 100644 --- a/src/google/protobuf/compiler/javanano/javanano_field.cc +++ b/src/google/protobuf/compiler/javanano/javanano_field.cc @@ -76,7 +76,7 @@ FieldGeneratorMap::FieldGeneratorMap( const Descriptor* descriptor, const Params ¶ms) : descriptor_(descriptor), field_generators_( - new scoped_ptr<FieldGenerator>[descriptor->field_count()]) { + new std::unique_ptr<FieldGenerator>[descriptor->field_count()]) { int next_has_bit_index = 0; bool saved_defaults_needed = false; diff --git a/src/google/protobuf/compiler/javanano/javanano_field.h b/src/google/protobuf/compiler/javanano/javanano_field.h index 347c888c..e3701f10 100644 --- a/src/google/protobuf/compiler/javanano/javanano_field.h +++ b/src/google/protobuf/compiler/javanano/javanano_field.h @@ -103,7 +103,7 @@ class FieldGeneratorMap { private: const Descriptor* descriptor_; - scoped_array<scoped_ptr<FieldGenerator> > field_generators_; + std::unique_ptr<std::unique_ptr<FieldGenerator>[]> field_generators_; int total_bits_; bool saved_defaults_needed_; diff --git a/src/google/protobuf/compiler/javanano/javanano_file.cc b/src/google/protobuf/compiler/javanano/javanano_file.cc index 7a661a42..9acdc3b5 100644 --- a/src/google/protobuf/compiler/javanano/javanano_file.cc +++ b/src/google/protobuf/compiler/javanano/javanano_file.cc @@ -221,7 +221,7 @@ static void GenerateSibling(const string& package_dir, string filename = package_dir + descriptor->name() + ".java"; file_list->push_back(filename); - scoped_ptr<io::ZeroCopyOutputStream> output( + std::unique_ptr<io::ZeroCopyOutputStream> output( output_directory->Open(filename)); io::Printer printer(output.get(), '$'); diff --git a/src/google/protobuf/compiler/javanano/javanano_generator.cc b/src/google/protobuf/compiler/javanano/javanano_generator.cc index fd7151b1..64ba3336 100644 --- a/src/google/protobuf/compiler/javanano/javanano_generator.cc +++ b/src/google/protobuf/compiler/javanano/javanano_generator.cc @@ -200,7 +200,7 @@ bool JavaNanoGenerator::Generate(const FileDescriptor* file, all_files.push_back(java_filename); // Generate main java file. - scoped_ptr<io::ZeroCopyOutputStream> output( + std::unique_ptr<io::ZeroCopyOutputStream> output( output_directory->Open(java_filename)); io::Printer printer(output.get(), '$'); file_generator.Generate(&printer); @@ -213,7 +213,7 @@ bool JavaNanoGenerator::Generate(const FileDescriptor* file, if (!output_list_file.empty()) { // Generate output list. This is just a simple text file placed in a // deterministic location which lists the .java files being generated. - scoped_ptr<io::ZeroCopyOutputStream> srclist_raw_output( + std::unique_ptr<io::ZeroCopyOutputStream> srclist_raw_output( output_directory->Open(output_list_file)); io::Printer srclist_printer(srclist_raw_output.get(), '$'); for (int i = 0; i < all_files.size(); i++) { diff --git a/src/google/protobuf/compiler/javanano/javanano_message.cc b/src/google/protobuf/compiler/javanano/javanano_message.cc index 78421887..e849521b 100644 --- a/src/google/protobuf/compiler/javanano/javanano_message.cc +++ b/src/google/protobuf/compiler/javanano/javanano_message.cc @@ -349,7 +349,7 @@ GenerateMessageSerializationMethods(io::Printer* printer) { return; } - scoped_array<const FieldDescriptor*> sorted_fields( + std::unique_ptr<const FieldDescriptor*[]> sorted_fields( SortFieldsByNumber(descriptor_)); printer->Print( @@ -391,7 +391,7 @@ GenerateMessageSerializationMethods(io::Printer* printer) { } void MessageGenerator::GenerateMergeFromMethods(io::Printer* printer) { - scoped_array<const FieldDescriptor*> sorted_fields( + std::unique_ptr<const FieldDescriptor*[]> sorted_fields( SortFieldsByNumber(descriptor_)); printer->Print( |