Răsfoiți Sursa

compiler/cpp: replace NULL with nullptr

This avoids compiler errors/warnings if zero-as-null-pointer-constant is
considered an error or warning.
Aleix Conchillo Flaque 7 ani în urmă
părinte
comite
83ddea02bd

+ 3 - 3
src/google/protobuf/any.pb.cc

@@ -134,13 +134,13 @@ const int Any::kValueFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Any::Any()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL), _any_metadata_(&type_url_, &value_) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr), _any_metadata_(&type_url_, &value_) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Any)
 }
 Any::Any(const Any& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL),
+      _internal_metadata_(nullptr),
       _any_metadata_(&type_url_, &value_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
@@ -422,7 +422,7 @@ void Any::MergeFrom(const ::google::protobuf::Message& from) {
   const Any* source =
       ::google::protobuf::DynamicCastToGenerated<Any>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Any)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {

+ 7 - 7
src/google/protobuf/any.pb.h

@@ -124,7 +124,7 @@ class PROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_inser
   // implements Message ----------------------------------------------
 
   inline Any* New() const final {
-    return CreateMaybeMessage<Any>(NULL);
+    return CreateMaybeMessage<Any>(nullptr);
   }
 
   Any* New(::google::protobuf::Arena* arena) const final {
@@ -158,10 +158,10 @@ class PROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_inser
   void InternalSwap(Any* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
-    return NULL;
+    return nullptr;
   }
   inline void* MaybeArenaPtr() const {
-    return NULL;
+    return nullptr;
   }
   public:
 
@@ -243,7 +243,7 @@ inline void Any::set_type_url(::std::string&& value) {
 }
 #endif
 inline void Any::set_type_url(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url)
@@ -265,7 +265,7 @@ inline ::std::string* Any::release_type_url() {
   return type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Any::set_allocated_type_url(::std::string* type_url) {
-  if (type_url != NULL) {
+  if (type_url != nullptr) {
     
   } else {
     
@@ -296,7 +296,7 @@ inline void Any::set_value(::std::string&& value) {
 }
 #endif
 inline void Any::set_value(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value)
@@ -318,7 +318,7 @@ inline ::std::string* Any::release_value() {
   return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Any::set_allocated_value(::std::string* value) {
-  if (value != NULL) {
+  if (value != nullptr) {
     
   } else {
     

+ 14 - 14
src/google/protobuf/api.pb.cc

@@ -204,10 +204,10 @@ void Api::clear_options() {
   options_.Clear();
 }
 void Api::clear_source_context() {
-  if (GetArenaNoVirtual() == NULL && source_context_ != NULL) {
+  if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) {
     delete source_context_;
   }
-  source_context_ = NULL;
+  source_context_ = nullptr;
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Api::kNameFieldNumber;
@@ -220,13 +220,13 @@ const int Api::kSyntaxFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Api::Api()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Api)
 }
 Api::Api(const Api& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL),
+      _internal_metadata_(nullptr),
       methods_(from.methods_),
       options_(from.options_),
       mixins_(from.mixins_) {
@@ -242,7 +242,7 @@ Api::Api(const Api& from)
   if (from.has_source_context()) {
     source_context_ = new ::google::protobuf::SourceContext(*from.source_context_);
   } else {
-    source_context_ = NULL;
+    source_context_ = nullptr;
   }
   syntax_ = from.syntax_;
   // @@protoc_insertion_point(copy_constructor:google.protobuf.Api)
@@ -289,10 +289,10 @@ void Api::Clear() {
   mixins_.Clear();
   name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  if (GetArenaNoVirtual() == NULL && source_context_ != NULL) {
+  if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) {
     delete source_context_;
   }
-  source_context_ = NULL;
+  source_context_ = nullptr;
   syntax_ = 0;
   _internal_metadata_.Clear();
 }
@@ -800,7 +800,7 @@ void Api::MergeFrom(const ::google::protobuf::Message& from) {
   const Api* source =
       ::google::protobuf::DynamicCastToGenerated<Api>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Api)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -899,13 +899,13 @@ const int Method::kSyntaxFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Method::Method()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Method)
 }
 Method::Method(const Method& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL),
+      _internal_metadata_(nullptr),
       options_(from.options_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
@@ -1454,7 +1454,7 @@ void Method::MergeFrom(const ::google::protobuf::Message& from) {
   const Method* source =
       ::google::protobuf::DynamicCastToGenerated<Method>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Method)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -1551,13 +1551,13 @@ const int Mixin::kRootFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Mixin::Mixin()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Mixin)
 }
 Mixin::Mixin(const Mixin& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (from.name().size() > 0) {
@@ -1851,7 +1851,7 @@ void Mixin::MergeFrom(const ::google::protobuf::Message& from) {
   const Mixin* source =
       ::google::protobuf::DynamicCastToGenerated<Mixin>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Mixin)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {

+ 29 - 29
src/google/protobuf/api.pb.h

@@ -118,7 +118,7 @@ class PROTOBUF_EXPORT Api : public ::google::protobuf::Message /* @@protoc_inser
   // implements Message ----------------------------------------------
 
   inline Api* New() const final {
-    return CreateMaybeMessage<Api>(NULL);
+    return CreateMaybeMessage<Api>(nullptr);
   }
 
   Api* New(::google::protobuf::Arena* arena) const final {
@@ -152,10 +152,10 @@ class PROTOBUF_EXPORT Api : public ::google::protobuf::Message /* @@protoc_inser
   void InternalSwap(Api* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
-    return NULL;
+    return nullptr;
   }
   inline void* MaybeArenaPtr() const {
-    return NULL;
+    return nullptr;
   }
   public:
 
@@ -308,7 +308,7 @@ class PROTOBUF_EXPORT Method : public ::google::protobuf::Message /* @@protoc_in
   // implements Message ----------------------------------------------
 
   inline Method* New() const final {
-    return CreateMaybeMessage<Method>(NULL);
+    return CreateMaybeMessage<Method>(nullptr);
   }
 
   Method* New(::google::protobuf::Arena* arena) const final {
@@ -342,10 +342,10 @@ class PROTOBUF_EXPORT Method : public ::google::protobuf::Message /* @@protoc_in
   void InternalSwap(Method* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
-    return NULL;
+    return nullptr;
   }
   inline void* MaybeArenaPtr() const {
-    return NULL;
+    return nullptr;
   }
   public:
 
@@ -491,7 +491,7 @@ class PROTOBUF_EXPORT Mixin : public ::google::protobuf::Message /* @@protoc_ins
   // implements Message ----------------------------------------------
 
   inline Mixin* New() const final {
-    return CreateMaybeMessage<Mixin>(NULL);
+    return CreateMaybeMessage<Mixin>(nullptr);
   }
 
   Mixin* New(::google::protobuf::Arena* arena) const final {
@@ -525,10 +525,10 @@ class PROTOBUF_EXPORT Mixin : public ::google::protobuf::Message /* @@protoc_ins
   void InternalSwap(Mixin* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
-    return NULL;
+    return nullptr;
   }
   inline void* MaybeArenaPtr() const {
-    return NULL;
+    return nullptr;
   }
   public:
 
@@ -609,7 +609,7 @@ inline void Api::set_name(::std::string&& value) {
 }
 #endif
 inline void Api::set_name(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.Api.name)
@@ -631,7 +631,7 @@ inline ::std::string* Api::release_name() {
   return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Api::set_allocated_name(::std::string* name) {
-  if (name != NULL) {
+  if (name != nullptr) {
     
   } else {
     
@@ -719,7 +719,7 @@ inline void Api::set_version(::std::string&& value) {
 }
 #endif
 inline void Api::set_version(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.Api.version)
@@ -741,7 +741,7 @@ inline ::std::string* Api::release_version() {
   return version_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Api::set_allocated_version(::std::string* version) {
-  if (version != NULL) {
+  if (version != nullptr) {
     
   } else {
     
@@ -752,24 +752,24 @@ inline void Api::set_allocated_version(::std::string* version) {
 
 // .google.protobuf.SourceContext source_context = 5;
 inline bool Api::has_source_context() const {
-  return this != internal_default_instance() && source_context_ != NULL;
+  return this != internal_default_instance() && source_context_ != nullptr;
 }
 inline const ::google::protobuf::SourceContext& Api::source_context() const {
   const ::google::protobuf::SourceContext* p = source_context_;
   // @@protoc_insertion_point(field_get:google.protobuf.Api.source_context)
-  return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::SourceContext*>(
+  return p != nullptr ? *p : *reinterpret_cast<const ::google::protobuf::SourceContext*>(
       &::google::protobuf::_SourceContext_default_instance_);
 }
 inline ::google::protobuf::SourceContext* Api::release_source_context() {
   // @@protoc_insertion_point(field_release:google.protobuf.Api.source_context)
   
   ::google::protobuf::SourceContext* temp = source_context_;
-  source_context_ = NULL;
+  source_context_ = nullptr;
   return temp;
 }
 inline ::google::protobuf::SourceContext* Api::mutable_source_context() {
   
-  if (source_context_ == NULL) {
+  if (source_context_ == nullptr) {
     auto* p = CreateMaybeMessage<::google::protobuf::SourceContext>(GetArenaNoVirtual());
     source_context_ = p;
   }
@@ -778,11 +778,11 @@ inline ::google::protobuf::SourceContext* Api::mutable_source_context() {
 }
 inline void Api::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
   ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
-  if (message_arena == NULL) {
+  if (message_arena == nullptr) {
     delete reinterpret_cast< ::google::protobuf::MessageLite*>(source_context_);
   }
   if (source_context) {
-    ::google::protobuf::Arena* submessage_arena = NULL;
+    ::google::protobuf::Arena* submessage_arena = nullptr;
     if (message_arena != submessage_arena) {
       source_context = ::google::protobuf::internal::GetOwnedMessage(
           message_arena, source_context, submessage_arena);
@@ -865,7 +865,7 @@ inline void Method::set_name(::std::string&& value) {
 }
 #endif
 inline void Method::set_name(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.Method.name)
@@ -887,7 +887,7 @@ inline ::std::string* Method::release_name() {
   return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Method::set_allocated_name(::std::string* name) {
-  if (name != NULL) {
+  if (name != nullptr) {
     
   } else {
     
@@ -918,7 +918,7 @@ inline void Method::set_request_type_url(::std::string&& value) {
 }
 #endif
 inline void Method::set_request_type_url(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   request_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.Method.request_type_url)
@@ -940,7 +940,7 @@ inline ::std::string* Method::release_request_type_url() {
   return request_type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Method::set_allocated_request_type_url(::std::string* request_type_url) {
-  if (request_type_url != NULL) {
+  if (request_type_url != nullptr) {
     
   } else {
     
@@ -985,7 +985,7 @@ inline void Method::set_response_type_url(::std::string&& value) {
 }
 #endif
 inline void Method::set_response_type_url(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   response_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.Method.response_type_url)
@@ -1007,7 +1007,7 @@ inline ::std::string* Method::release_response_type_url() {
   return response_type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Method::set_allocated_response_type_url(::std::string* response_type_url) {
-  if (response_type_url != NULL) {
+  if (response_type_url != nullptr) {
     
   } else {
     
@@ -1097,7 +1097,7 @@ inline void Mixin::set_name(::std::string&& value) {
 }
 #endif
 inline void Mixin::set_name(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.Mixin.name)
@@ -1119,7 +1119,7 @@ inline ::std::string* Mixin::release_name() {
   return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Mixin::set_allocated_name(::std::string* name) {
-  if (name != NULL) {
+  if (name != nullptr) {
     
   } else {
     
@@ -1150,7 +1150,7 @@ inline void Mixin::set_root(::std::string&& value) {
 }
 #endif
 inline void Mixin::set_root(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   root_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.Mixin.root)
@@ -1172,7 +1172,7 @@ inline ::std::string* Mixin::release_root() {
   return root_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Mixin::set_allocated_root(::std::string* root) {
-  if (root != NULL) {
+  if (root != nullptr) {
     
   } else {
     

+ 2 - 2
src/google/protobuf/compiler/cpp/cpp_enum_field.cc

@@ -365,8 +365,8 @@ void RepeatedEnumFieldGenerator::GenerateMergeFromCodedStreamWithPacking(
           "WireFormatLite::ReadPackedEnumPreserveUnknowns(\n"
           "       input,\n"
           "       $number$,\n"
-          "       NULL,\n"
-          "       NULL,\n"
+          "       nullptr,\n"
+          "       nullptr,\n"
           "       this->mutable_$name$())));\n");
     } else if (UseUnknownFieldSet(descriptor_->file(), options_)) {
       format(

+ 3 - 3
src/google/protobuf/compiler/cpp/cpp_file.cc

@@ -782,10 +782,10 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* printer) {
         // MSVC doesn't like empty arrays, so we add a dummy.
         "const $uint32$ $tablename$::offsets[1] = {};\n"
         "static constexpr ::$proto_ns$::internal::MigrationSchema* schemas = "
-        "NULL;"
+        "nullptr;"
         "\n"
         "static constexpr ::$proto_ns$::Message* const* "
-        "file_default_instances = NULL;\n"
+        "file_default_instances = nullptr;\n"
         "\n");
   }
 
@@ -1019,7 +1019,7 @@ void FileGenerator::GenerateTables(io::Printer* printer) {
     }
 
     if (message_generators_.empty()) {
-      format("{ NULL, NULL, 0, -1, -1, false },\n");
+      format("{ nullptr, nullptr, 0, -1, -1, false },\n");
     }
 
     format.Outdent();

+ 3 - 3
src/google/protobuf/compiler/cpp/cpp_map_field.cc

@@ -274,7 +274,7 @@ static void GenerateSerializationLoop(const Formatter& format,
   // If entry is allocated by arena, its desctructor should be avoided.
   if (supports_arenas) {
     format(
-        "if (entry->GetArena() != NULL) {\n"
+        "if (entry->GetArena() != nullptr) {\n"
         "  entry.release();\n"
         "}\n");
   }
@@ -395,7 +395,7 @@ GenerateByteSize(io::Printer* printer) const {
   // If entry is allocated by arena, its desctructor should be avoided.
   if (SupportsArenas(descriptor_)) {
     format(
-        "    if (entry.get() != NULL && entry->GetArena() != NULL) {\n"
+        "    if (entry.get() != nullptr && entry->GetArena() != nullptr) {\n"
         "      entry.release();\n"
         "    }\n");
   }
@@ -409,7 +409,7 @@ GenerateByteSize(io::Printer* printer) const {
   // If entry is allocated by arena, its desctructor should be avoided.
   if (SupportsArenas(descriptor_)) {
     format(
-        "  if (entry.get() != NULL && entry->GetArena() != NULL) {\n"
+        "  if (entry.get() != nullptr && entry->GetArena() != nullptr) {\n"
         "    entry.release();\n"
         "  }\n");
   }

+ 15 - 15
src/google/protobuf/compiler/cpp/cpp_message.cc

@@ -800,7 +800,7 @@ void MessageGenerator::GenerateSingularFieldHasBits(
       } else {
         format(
             "inline bool $classname$::has_$name$() const {\n"
-            "  return this != internal_default_instance() && $name$_ != NULL;\n"
+            "  return this != internal_default_instance() && $name$_ != nullptr;\n"
             "}\n");
       }
     }
@@ -1116,7 +1116,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
       "// implements Message ----------------------------------------------\n"
       "\n"
       "inline $classname$* New() const$ new_final$ {\n"
-      "  return CreateMaybeMessage<$classname$>(NULL);\n"
+      "  return CreateMaybeMessage<$classname$>(nullptr);\n"
       "}\n"
       "\n"
       "$classname$* New(::$proto_ns$::Arena* arena) const$ new_final$ {\n"
@@ -1226,10 +1226,10 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
     format(
         "private:\n"
         "inline ::$proto_ns$::Arena* GetArenaNoVirtual() const {\n"
-        "  return NULL;\n"
+        "  return nullptr;\n"
         "}\n"
         "inline void* MaybeArenaPtr() const {\n"
-        "  return NULL;\n"
+        "  return nullptr;\n"
         "}\n");
   }
 
@@ -1490,7 +1490,7 @@ bool MessageGenerator::GenerateParseTable(io::Printer* printer, size_t offset,
   Formatter format(printer, variables_);
 
   if (!table_driven_) {
-    format("{ NULL, NULL, 0, -1, -1, -1, -1, NULL, false },\n");
+    format("{ nullptr, nullptr, 0, -1, -1, -1, -1, nullptr, false },\n");
     return false;
   }
 
@@ -1628,7 +1628,7 @@ int MessageGenerator::GenerateFieldMetadata(io::Printer* printer) {
       vars["hasbit"] = SimpleItoa(i);
       vars["type"] =
           SimpleItoa(CalcFieldNum(generator, field, options_));
-      vars["ptr"] = "NULL";
+      vars["ptr"] = "nullptr";
       if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
         GOOGLE_CHECK(!IsMapEntryMessage(field->message_type()));
         if (!IsProto1(field->message_type()->file(), options_)) {
@@ -1654,7 +1654,7 @@ int MessageGenerator::GenerateFieldMetadata(io::Printer* printer) {
     return 2;
   }
   format(
-      "{PROTOBUF_FIELD_OFFSET($classtype$, _cached_size_), 0, 0, 0, NULL},\n");
+      "{PROTOBUF_FIELD_OFFSET($classtype$, _cached_size_), 0, 0, 0, nullptr},\n");
   std::vector<const Descriptor::ExtensionRange*> sorted_extensions;
   for (int i = 0; i < descriptor_->extension_range_count(); ++i) {
     sorted_extensions.push_back(descriptor_->extension_range(i));
@@ -1690,7 +1690,7 @@ int MessageGenerator::GenerateFieldMetadata(io::Printer* printer) {
       classfieldname = field->containing_oneof()->name();
     }
     format.Set("field_name", classfieldname);
-    string ptr = "NULL";
+    string ptr = "nullptr";
     if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
       if (IsMapEntryMessage(field->message_type())) {
         format(
@@ -1819,7 +1819,7 @@ void MessageGenerator::GenerateDefaultInstanceInitializer(
         format(
             "$package_ns$::$name$_ = reinterpret_cast<const "
             "::$proto_ns$::Message*>(&$1$);\n"
-            "if ($package_ns$::$name$_ == NULL) {\n"
+            "if ($package_ns$::$name$_ == nullptr) {\n"
             "  $package_ns$::$name$_ = "
             "::$proto_ns$::Empty::internal_default_instance();\n"
             "}\n",
@@ -2364,7 +2364,7 @@ void MessageGenerator::GenerateSharedDestructorCode(io::Printer* printer) {
   format("void $classname$::SharedDtor() {\n");
   format.Indent();
   if (SupportsArenas(descriptor_)) {
-    format("$DCHK$(GetArenaNoVirtual() == NULL);\n");
+    format("$DCHK$(GetArenaNoVirtual() == nullptr);\n");
   }
   // Write the destructors for each field except oneof members.
   // optimized_order_ does not contain oneof fields.
@@ -2440,7 +2440,7 @@ void MessageGenerator::GenerateArenaDestructorCode(io::Printer* printer) {
     format(
         "inline void $classname$::RegisterArenaDtor(::$proto_ns$::Arena* "
         "arena) {\n"
-        "  if (arena != NULL) {\n"
+        "  if (arena != nullptr) {\n"
         "    arena->OwnCustomDestructor(this, &$classname$::ArenaDtor);\n"
         "  }\n"
         "}\n");
@@ -2555,7 +2555,7 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) {
     initializer_with_arena += ", _weak_field_map_(arena)";
   }
 
-  string initializer_null = superclass + "(), _internal_metadata_(NULL)";
+  string initializer_null = superclass + "(), _internal_metadata_(nullptr)";
   if (IsAnyMessage(descriptor_, options_)) {
     initializer_null += ", _any_metadata_(&type_url_, &value_)";
   }
@@ -2600,7 +2600,7 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) {
     format.Indent();
     format.Indent();
     format.Indent();
-    format(",\n_internal_metadata_(NULL)");
+    format(",\n_internal_metadata_(nullptr)");
 
     if (HasFieldPresence(descriptor_->file())) {
       if (!IsProto2MessageSet(descriptor_, options_)) {
@@ -3001,7 +3001,7 @@ void MessageGenerator::GenerateSwap(io::Printer* printer) {
         "    temp->MergeFrom(*other);\n"
         "    other->CopyFrom(*this);\n"
         "    InternalSwap(temp);\n"
-        "    if (GetArenaNoVirtual() == NULL) {\n"
+        "    if (GetArenaNoVirtual() == nullptr) {\n"
         "      delete temp;\n"
         "    }\n"
         "  }\n"
@@ -3084,7 +3084,7 @@ void MessageGenerator::GenerateMergeFrom(io::Printer* printer) {
         "const $classname$* source =\n"
         "    ::$proto_ns$::DynamicCastToGenerated<$classname$>(\n"
         "        &from);\n"
-        "if (source == NULL) {\n"
+        "if (source == nullptr) {\n"
         "// @@protoc_insertion_point(generalized_merge_from_cast_fail:"
         "$full_name$)\n"
         "  ::$proto_ns$::internal::ReflectionOps::Merge(from, this);\n"

+ 29 - 29
src/google/protobuf/compiler/cpp/cpp_message_field.cc

@@ -149,7 +149,7 @@ void MessageFieldGenerator::GenerateNonInlineAccessorDefinitions(
         "    $type$* $name$) {\n"
         // If we're not on an arena, free whatever we were holding before.
         // (If we are on arena, we can just forget the earlier pointer.)
-        "  if (GetArenaNoVirtual() == NULL) {\n"
+        "  if (GetArenaNoVirtual() == nullptr) {\n"
         "    delete $name$_;\n"
         "  }\n"
         "  $name$_ = $name$;\n"
@@ -171,7 +171,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
       "inline const $type$& $classname$::$name$() const {\n"
       "  const $type$* p = $casted_member$;\n"
       "  // @@protoc_insertion_point(field_get:$full_name$)\n"
-      "  return p != NULL ? *p : *reinterpret_cast<const $type$*>(\n"
+      "  return p != nullptr ? *p : *reinterpret_cast<const $type$*>(\n"
       "      &$type_default_instance$);\n"
       "}\n");
 
@@ -183,12 +183,12 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
       "  $type$* temp = $casted_member$;\n");
   if (SupportsArenas(descriptor_)) {
     format(
-        "  if (GetArenaNoVirtual() != NULL) {\n"
+        "  if (GetArenaNoVirtual() != nullptr) {\n"
         "    temp = ::$proto_ns$::internal::DuplicateIfNonNull(temp);\n"
         "  }\n");
   }
   format(
-      "  $name$_ = NULL;\n"
+      "  $name$_ = nullptr;\n"
       "  return temp;\n"
       "}\n");
 
@@ -200,7 +200,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
         "$type_reference_function$"
         "  $clear_hasbit$\n"
         "  $type$* temp = $casted_member$;\n"
-        "  $name$_ = NULL;\n"
+        "  $name$_ = nullptr;\n"
         "  return temp;\n"
         "}\n");
   }
@@ -208,7 +208,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
   format(
       "inline $type$* $classname$::mutable_$name$() {\n"
       "  $set_hasbit$\n"
-      "  if ($name$_ == NULL) {\n"
+      "  if ($name$_ == nullptr) {\n"
       "    auto* p = CreateMaybeMessage<$type$>(GetArenaNoVirtual());\n");
   if (implicit_weak_field_) {
     format("    $name$_ = reinterpret_cast<::$proto_ns$::MessageLite*>(p);\n");
@@ -226,7 +226,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
   format(
       "inline void $classname$::set_allocated_$name$($type$* $name$) {\n"
       "  ::$proto_ns$::Arena* message_arena = GetArenaNoVirtual();\n");
-  format("  if (message_arena == NULL) {\n");
+  format("  if (message_arena == nullptr) {\n");
   if (IsCrossFileMessage(descriptor_)) {
     format(
         "    delete reinterpret_cast< ::$proto_ns$::MessageLite*>($name$_);\n");
@@ -245,7 +245,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
         "      "
         "reinterpret_cast<::$proto_ns$::MessageLite*>($name$)->GetArena();\n");
   } else if (!SupportsArenas(descriptor_->message_type())) {
-    format("    ::$proto_ns$::Arena* submessage_arena = NULL;\n");
+    format("    ::$proto_ns$::Arena* submessage_arena = nullptr;\n");
   } else {
     format(
         "    ::$proto_ns$::Arena* submessage_arena =\n"
@@ -297,9 +297,9 @@ GenerateInternalAccessorDefinitions(io::Printer* printer) const {
     format(
         "const ::$proto_ns$::MessageLite& $classname$::HasBitSetters::$name$(\n"
         "    const $classname$* msg) {\n"
-        "  if (msg->$name$_ != NULL) {\n"
+        "  if (msg->$name$_ != nullptr) {\n"
         "    return *msg->$name$_;\n"
-        "  } else if (&$type_default_instance$ != NULL) {\n"
+        "  } else if (&$type_default_instance$ != nullptr) {\n"
         "    return *reinterpret_cast<const ::$proto_ns$::MessageLite*>(\n"
         "        &$type_default_instance$);\n"
         "  } else {\n"
@@ -315,8 +315,8 @@ GenerateInternalAccessorDefinitions(io::Printer* printer) const {
         format("  msg->$set_hasbit$\n");
       }
       format(
-          "  if (msg->$name$_ == NULL) {\n"
-          "    if (&$type_default_instance$ == NULL) {\n"
+          "  if (msg->$name$_ == nullptr) {\n"
+          "    if (&$type_default_instance$ == nullptr) {\n"
           "      msg->$name$_ = ::$proto_ns$::Arena::CreateMessage<\n"
           "          ::$proto_ns$::internal::ImplicitWeakMessage>(\n"
           "              msg->GetArenaNoVirtual());\n"
@@ -337,8 +337,8 @@ GenerateInternalAccessorDefinitions(io::Printer* printer) const {
         format("  msg->$set_hasbit$\n");
       }
       format(
-          "  if (msg->$name$_ == NULL) {\n"
-          "    if (&$type_default_instance$ == NULL) {\n"
+          "  if (msg->$name$_ == nullptr) {\n"
+          "    if (&$type_default_instance$ == nullptr) {\n"
           "      msg->$name$_ = "
           "new ::$proto_ns$::internal::ImplicitWeakMessage;\n"
           "    } else {\n"
@@ -369,12 +369,12 @@ GenerateClearingCode(io::Printer* printer) const {
     // If we don't have has-bits, message presence is indicated only by ptr !=
     // NULL. Thus on clear, we need to delete the object.
     format(
-        "if (GetArenaNoVirtual() == NULL && $name$_ != NULL) {\n"
+        "if (GetArenaNoVirtual() == nullptr && $name$_ != nullptr) {\n"
         "  delete $name$_;\n"
         "}\n"
-        "$name$_ = NULL;\n");
+        "$name$_ = nullptr;\n");
   } else {
-    format("if ($name$_ != NULL) $name$_->Clear();\n");
+    format("if ($name$_ != nullptr) $name$_->Clear();\n");
   }
 }
 
@@ -385,13 +385,13 @@ GenerateMessageClearingCode(io::Printer* printer) const {
     // If we don't have has-bits, message presence is indicated only by ptr !=
     // NULL. Thus on clear, we need to delete the object.
     format(
-        "if (GetArenaNoVirtual() == NULL && $name$_ != NULL) {\n"
+        "if (GetArenaNoVirtual() == nullptr && $name$_ != nullptr) {\n"
         "  delete $name$_;\n"
         "}\n"
-        "$name$_ = NULL;\n");
+        "$name$_ = nullptr;\n");
   } else {
     format(
-        "$DCHK$($name$_ != NULL);\n"
+        "$DCHK$($name$_ != nullptr);\n"
         "$name$_->Clear();\n");
   }
 }
@@ -431,7 +431,7 @@ GenerateDestructorCode(io::Printer* printer) const {
 void MessageFieldGenerator::
 GenerateConstructorCode(io::Printer* printer) const {
   Formatter format(printer, variables_);
-  format("$name$_ = NULL;\n");
+  format("$name$_ = nullptr;\n");
 }
 
 void MessageFieldGenerator::
@@ -441,7 +441,7 @@ GenerateCopyConstructorCode(io::Printer* printer) const {
       "if (from.has_$name$()) {\n"
       "  $name$_ = new $type$(*from.$name$_);\n"
       "} else {\n"
-      "  $name$_ = NULL;\n"
+      "  $name$_ = nullptr;\n"
       "}\n");
 }
 
@@ -517,7 +517,7 @@ void MessageOneofFieldGenerator::GenerateNonInlineAccessorDefinitions(
         "      "
         "reinterpret_cast<::$proto_ns$::MessageLite*>($name$)->GetArena();\n");
   } else if (!SupportsArenas(descriptor_->message_type())) {
-    format("    ::$proto_ns$::Arena* submessage_arena = NULL;\n");
+    format("    ::$proto_ns$::Arena* submessage_arena = nullptr;\n");
   } else {
     format(
         "    ::$proto_ns$::Arena* submessage_arena =\n"
@@ -546,15 +546,15 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
       "      $type$* temp = $field_member$;\n");
   if (SupportsArenas(descriptor_)) {
     format(
-        "    if (GetArenaNoVirtual() != NULL) {\n"
+        "    if (GetArenaNoVirtual() != nullptr) {\n"
         "      temp = ::$proto_ns$::internal::DuplicateIfNonNull(temp);\n"
         "    }\n");
   }
   format(
-      "    $field_member$ = NULL;\n"
+      "    $field_member$ = nullptr;\n"
       "    return temp;\n"
       "  } else {\n"
-      "    return NULL;\n"
+      "    return nullptr;\n"
       "  }\n"
       "}\n");
 
@@ -574,10 +574,10 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
         "  if (has_$name$()) {\n"
         "    clear_has_$oneof_name$();\n"
         "    $type$* temp = $field_member$;\n"
-        "    $field_member$ = NULL;\n"
+        "    $field_member$ = nullptr;\n"
         "    return temp;\n"
         "  } else {\n"
-        "    return NULL;\n"
+        "    return nullptr;\n"
         "  }\n"
         "}\n"
         "inline void $classname$::unsafe_arena_set_allocated_$name$"
@@ -613,7 +613,7 @@ GenerateClearingCode(io::Printer* printer) const {
   Formatter format(printer, variables_);
   if (SupportsArenas(descriptor_)) {
     format(
-        "if (GetArenaNoVirtual() == NULL) {\n"
+        "if (GetArenaNoVirtual() == nullptr) {\n"
         "  delete $field_member$;\n"
         "}\n");
   } else {

+ 17 - 17
src/google/protobuf/compiler/cpp/cpp_string_field.cc

@@ -63,7 +63,7 @@ void SetStringVariables(const FieldDescriptor* descriptor,
                 "::" + default_variable_string + ".get()";
   (*variables)["pointer_type"] =
       descriptor->type() == FieldDescriptor::TYPE_BYTES ? "void" : "char";
-  (*variables)["null_check"] = (*variables)["DCHK"] + "(value != NULL);\n";
+  (*variables)["null_check"] = (*variables)["DCHK"] + "(value != nullptr);\n";
   // NOTE: Escaped here to unblock proto1->proto2 migration.
   // TODO(liujisi): Extend this to apply for other conflicting methods.
   (*variables)["release_name"] =
@@ -293,7 +293,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
     if (HasFieldPresence(descriptor_->file())) {
       format(
           "  if (!has_$name$()) {\n"
-          "    return NULL;\n"
+          "    return nullptr;\n"
           "  }\n"
           "  $clear_hasbit$\n"
           "  return $name$_.ReleaseNonDefault("
@@ -308,7 +308,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
     format(
         "}\n"
         "inline void $classname$::set_allocated_$name$($string$* $name$) {\n"
-        "  if ($name$ != NULL) {\n"
+        "  if ($name$ != nullptr) {\n"
         "    $set_hasbit$\n"
         "  } else {\n"
         "    $clear_hasbit$\n"
@@ -322,15 +322,15 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
           "inline $string$* $classname$::unsafe_arena_release_$name$() {\n"
           "  // "
           "@@protoc_insertion_point(field_unsafe_arena_release:$full_name$)\n"
-          "  $DCHK$(GetArenaNoVirtual() != NULL);\n"
+          "  $DCHK$(GetArenaNoVirtual() != nullptr);\n"
           "  $clear_hasbit$\n"
           "  return $name$_.UnsafeArenaRelease($default_variable$,\n"
           "      GetArenaNoVirtual());\n"
           "}\n"
           "inline void $classname$::unsafe_arena_set_allocated_$name$(\n"
           "    $string$* $name$) {\n"
-          "  $DCHK$(GetArenaNoVirtual() != NULL);\n"
-          "  if ($name$ != NULL) {\n"
+          "  $DCHK$(GetArenaNoVirtual() != nullptr);\n"
+          "  if ($name$ != nullptr) {\n"
           "    $set_hasbit$\n"
           "  } else {\n"
           "    $clear_hasbit$\n"
@@ -403,7 +403,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
     if (HasFieldPresence(descriptor_->file())) {
       format(
           "  if (!has_$name$()) {\n"
-          "    return NULL;\n"
+          "    return nullptr;\n"
           "  }\n"
           "  $clear_hasbit$\n"
           "  return $name$_.ReleaseNonDefaultNoArena($default_variable$);\n");
@@ -416,7 +416,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
     format(
         "}\n"
         "inline void $classname$::set_allocated_$name$($string$* $name$) {\n"
-        "  if ($name$ != NULL) {\n"
+        "  if ($name$ != nullptr) {\n"
         "    $set_hasbit$\n"
         "  } else {\n"
         "    $clear_hasbit$\n"
@@ -631,7 +631,7 @@ GenerateMergeFromCodedStream(io::Printer* printer) const {
     // destructor necessary) or a materialized ::std::string (and is on the Arena's
     // destructor list).  No call to ArenaStringPtr::Destroy is needed.
     format(
-        "if (arena != NULL) {\n"
+        "if (arena != nullptr) {\n"
         "  ::$proto_ns$::internal::TaggedPtr<$string$> str =\n"
         "    ::$proto_ns$::internal::ReadArenaString(input, arena);\n"
         "  DO_(!str.IsNull());\n"
@@ -819,14 +819,14 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
         "    return $field_member$.Release($default_variable$,\n"
         "        GetArenaNoVirtual());\n"
         "  } else {\n"
-        "    return NULL;\n"
+        "    return nullptr;\n"
         "  }\n"
         "}\n"
         "inline void $classname$::set_allocated_$name$($string$* $name$) {\n"
         "  if (has_$oneof_name$()) {\n"
         "    clear_$oneof_name$();\n"
         "  }\n"
-        "  if ($name$ != NULL) {\n"
+        "  if ($name$ != nullptr) {\n"
         "    set_has_$name$();\n"
         "    $field_member$.UnsafeSetDefault($name$);\n"
         "  }\n"
@@ -837,18 +837,18 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
           "inline $string$* $classname$::unsafe_arena_release_$name$() {\n"
           "  // "
           "@@protoc_insertion_point(field_unsafe_arena_release:$full_name$)\n"
-          "  $DCHK$(GetArenaNoVirtual() != NULL);\n"
+          "  $DCHK$(GetArenaNoVirtual() != nullptr);\n"
           "  if (has_$name$()) {\n"
           "    clear_has_$oneof_name$();\n"
           "    return $field_member$.UnsafeArenaRelease(\n"
           "        $default_variable$, GetArenaNoVirtual());\n"
           "  } else {\n"
-          "    return NULL;\n"
+          "    return nullptr;\n"
           "  }\n"
           "}\n"
           "inline void $classname$::unsafe_arena_set_allocated_$name$("
           "$string$* $name$) {\n"
-          "  $DCHK$(GetArenaNoVirtual() != NULL);\n"
+          "  $DCHK$(GetArenaNoVirtual() != nullptr);\n"
           "  if (!has_$name$()) {\n"
           "    $field_member$.UnsafeSetDefault($default_variable$);\n"
           "  }\n"
@@ -957,14 +957,14 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const {
         "    clear_has_$oneof_name$();\n"
         "    return $field_member$.ReleaseNoArena($default_variable$);\n"
         "  } else {\n"
-        "    return NULL;\n"
+        "    return nullptr;\n"
         "  }\n"
         "}\n"
         "inline void $classname$::set_allocated_$name$($string$* $name$) {\n"
         "  if (has_$oneof_name$()) {\n"
         "    clear_$oneof_name$();\n"
         "  }\n"
-        "  if ($name$ != NULL) {\n"
+        "  if ($name$ != nullptr) {\n"
         "    set_has_$name$();\n"
         "    $field_member$.UnsafeSetDefault($name$);\n"
         "  }\n"
@@ -1021,7 +1021,7 @@ GenerateMergeFromCodedStream(io::Printer* printer) const {
     // destructor necessary) or a materialized ::std::string (and is on the Arena's
     // destructor list).  No call to ArenaStringPtr::Destroy is needed.
     format(
-        "if (arena != NULL) {\n"
+        "if (arena != nullptr) {\n"
         "  clear_$oneof_name$();\n"
         "  if (!has_$name$()) {\n"
         "    $field_member$.UnsafeSetDefault($default_variable$);\n"

+ 15 - 15
src/google/protobuf/compiler/plugin.pb.cc

@@ -245,13 +245,13 @@ const int Version::kSuffixFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Version::Version()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.compiler.Version)
 }
 Version::Version(const Version& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL),
+      _internal_metadata_(nullptr),
       _has_bits_(from._has_bits_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   suffix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
@@ -617,7 +617,7 @@ void Version::MergeFrom(const ::google::protobuf::Message& from) {
   const Version* source =
       ::google::protobuf::DynamicCastToGenerated<Version>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.Version)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -723,13 +723,13 @@ const int CodeGeneratorRequest::kCompilerVersionFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 CodeGeneratorRequest::CodeGeneratorRequest()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorRequest)
 }
 CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL),
+      _internal_metadata_(nullptr),
       _has_bits_(from._has_bits_),
       file_to_generate_(from.file_to_generate_),
       proto_file_(from.proto_file_) {
@@ -741,7 +741,7 @@ CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
   if (from.has_compiler_version()) {
     compiler_version_ = new ::google::protobuf::compiler::Version(*from.compiler_version_);
   } else {
-    compiler_version_ = NULL;
+    compiler_version_ = nullptr;
   }
   // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorRequest)
 }
@@ -750,7 +750,7 @@ void CodeGeneratorRequest::SharedCtor() {
   ::google::protobuf::internal::InitSCC(
       &scc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base);
   parameter_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  compiler_version_ = NULL;
+  compiler_version_ = nullptr;
 }
 
 CodeGeneratorRequest::~CodeGeneratorRequest() {
@@ -786,7 +786,7 @@ void CodeGeneratorRequest::Clear() {
       parameter_.ClearNonDefaultToEmptyNoArena();
     }
     if (cached_has_bits & 0x00000002u) {
-      GOOGLE_DCHECK(compiler_version_ != NULL);
+      GOOGLE_DCHECK(compiler_version_ != nullptr);
       compiler_version_->Clear();
     }
   }
@@ -1150,7 +1150,7 @@ void CodeGeneratorRequest::MergeFrom(const ::google::protobuf::Message& from) {
   const CodeGeneratorRequest* source =
       ::google::protobuf::DynamicCastToGenerated<CodeGeneratorRequest>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.CodeGeneratorRequest)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -1244,13 +1244,13 @@ const int CodeGeneratorResponse_File::kContentFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 CodeGeneratorResponse_File::CodeGeneratorResponse_File()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
 }
 CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL),
+      _internal_metadata_(nullptr),
       _has_bits_(from._has_bits_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
@@ -1629,7 +1629,7 @@ void CodeGeneratorResponse_File::MergeFrom(const ::google::protobuf::Message& fr
   const CodeGeneratorResponse_File* source =
       ::google::protobuf::DynamicCastToGenerated<CodeGeneratorResponse_File>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.CodeGeneratorResponse.File)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -1719,13 +1719,13 @@ const int CodeGeneratorResponse::kFileFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 CodeGeneratorResponse::CodeGeneratorResponse()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse)
 }
 CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL),
+      _internal_metadata_(nullptr),
       _has_bits_(from._has_bits_),
       file_(from.file_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
@@ -2017,7 +2017,7 @@ void CodeGeneratorResponse::MergeFrom(const ::google::protobuf::Message& from) {
   const CodeGeneratorResponse* source =
       ::google::protobuf::DynamicCastToGenerated<CodeGeneratorResponse>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.CodeGeneratorResponse)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {

+ 38 - 38
src/google/protobuf/compiler/plugin.pb.h

@@ -137,7 +137,7 @@ class PROTOC_EXPORT Version : public ::google::protobuf::Message /* @@protoc_ins
   // implements Message ----------------------------------------------
 
   inline Version* New() const final {
-    return CreateMaybeMessage<Version>(NULL);
+    return CreateMaybeMessage<Version>(nullptr);
   }
 
   Version* New(::google::protobuf::Arena* arena) const final {
@@ -171,10 +171,10 @@ class PROTOC_EXPORT Version : public ::google::protobuf::Message /* @@protoc_ins
   void InternalSwap(Version* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
-    return NULL;
+    return nullptr;
   }
   inline void* MaybeArenaPtr() const {
-    return NULL;
+    return nullptr;
   }
   public:
 
@@ -289,7 +289,7 @@ class PROTOC_EXPORT CodeGeneratorRequest : public ::google::protobuf::Message /*
   // implements Message ----------------------------------------------
 
   inline CodeGeneratorRequest* New() const final {
-    return CreateMaybeMessage<CodeGeneratorRequest>(NULL);
+    return CreateMaybeMessage<CodeGeneratorRequest>(nullptr);
   }
 
   CodeGeneratorRequest* New(::google::protobuf::Arena* arena) const final {
@@ -323,10 +323,10 @@ class PROTOC_EXPORT CodeGeneratorRequest : public ::google::protobuf::Message /*
   void InternalSwap(CodeGeneratorRequest* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
-    return NULL;
+    return nullptr;
   }
   inline void* MaybeArenaPtr() const {
-    return NULL;
+    return nullptr;
   }
   public:
 
@@ -463,7 +463,7 @@ class PROTOC_EXPORT CodeGeneratorResponse_File : public ::google::protobuf::Mess
   // implements Message ----------------------------------------------
 
   inline CodeGeneratorResponse_File* New() const final {
-    return CreateMaybeMessage<CodeGeneratorResponse_File>(NULL);
+    return CreateMaybeMessage<CodeGeneratorResponse_File>(nullptr);
   }
 
   CodeGeneratorResponse_File* New(::google::protobuf::Arena* arena) const final {
@@ -497,10 +497,10 @@ class PROTOC_EXPORT CodeGeneratorResponse_File : public ::google::protobuf::Mess
   void InternalSwap(CodeGeneratorResponse_File* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
-    return NULL;
+    return nullptr;
   }
   inline void* MaybeArenaPtr() const {
-    return NULL;
+    return nullptr;
   }
   public:
 
@@ -623,7 +623,7 @@ class PROTOC_EXPORT CodeGeneratorResponse : public ::google::protobuf::Message /
   // implements Message ----------------------------------------------
 
   inline CodeGeneratorResponse* New() const final {
-    return CreateMaybeMessage<CodeGeneratorResponse>(NULL);
+    return CreateMaybeMessage<CodeGeneratorResponse>(nullptr);
   }
 
   CodeGeneratorResponse* New(::google::protobuf::Arena* arena) const final {
@@ -657,10 +657,10 @@ class PROTOC_EXPORT CodeGeneratorResponse : public ::google::protobuf::Message /
   void InternalSwap(CodeGeneratorResponse* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
-    return NULL;
+    return nullptr;
   }
   inline void* MaybeArenaPtr() const {
-    return NULL;
+    return nullptr;
   }
   public:
 
@@ -801,7 +801,7 @@ inline void Version::set_suffix(::std::string&& value) {
 }
 #endif
 inline void Version::set_suffix(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   _has_bits_[0] |= 0x00000001u;
   suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.Version.suffix)
@@ -820,13 +820,13 @@ inline ::std::string* Version::mutable_suffix() {
 inline ::std::string* Version::release_suffix() {
   // @@protoc_insertion_point(field_release:google.protobuf.compiler.Version.suffix)
   if (!has_suffix()) {
-    return NULL;
+    return nullptr;
   }
   _has_bits_[0] &= ~0x00000001u;
   return suffix_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Version::set_allocated_suffix(::std::string* suffix) {
-  if (suffix != NULL) {
+  if (suffix != nullptr) {
     _has_bits_[0] |= 0x00000001u;
   } else {
     _has_bits_[0] &= ~0x00000001u;
@@ -865,7 +865,7 @@ inline void CodeGeneratorRequest::set_file_to_generate(int index, ::std::string&
 }
 #endif
 inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   file_to_generate_.Mutable(index)->assign(value);
   // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
 }
@@ -889,7 +889,7 @@ inline void CodeGeneratorRequest::add_file_to_generate(::std::string&& value) {
 }
 #endif
 inline void CodeGeneratorRequest::add_file_to_generate(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   file_to_generate_.Add()->assign(value);
   // @@protoc_insertion_point(field_add_char:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
 }
@@ -934,7 +934,7 @@ inline void CodeGeneratorRequest::set_parameter(::std::string&& value) {
 }
 #endif
 inline void CodeGeneratorRequest::set_parameter(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   _has_bits_[0] |= 0x00000001u;
   parameter_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorRequest.parameter)
@@ -953,13 +953,13 @@ inline ::std::string* CodeGeneratorRequest::mutable_parameter() {
 inline ::std::string* CodeGeneratorRequest::release_parameter() {
   // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.parameter)
   if (!has_parameter()) {
-    return NULL;
+    return nullptr;
   }
   _has_bits_[0] &= ~0x00000001u;
   return parameter_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void CodeGeneratorRequest::set_allocated_parameter(::std::string* parameter) {
-  if (parameter != NULL) {
+  if (parameter != nullptr) {
     _has_bits_[0] |= 0x00000001u;
   } else {
     _has_bits_[0] &= ~0x00000001u;
@@ -1000,25 +1000,25 @@ inline bool CodeGeneratorRequest::has_compiler_version() const {
   return (_has_bits_[0] & 0x00000002u) != 0;
 }
 inline void CodeGeneratorRequest::clear_compiler_version() {
-  if (compiler_version_ != NULL) compiler_version_->Clear();
+  if (compiler_version_ != nullptr) compiler_version_->Clear();
   _has_bits_[0] &= ~0x00000002u;
 }
 inline const ::google::protobuf::compiler::Version& CodeGeneratorRequest::compiler_version() const {
   const ::google::protobuf::compiler::Version* p = compiler_version_;
   // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
-  return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::compiler::Version*>(
+  return p != nullptr ? *p : *reinterpret_cast<const ::google::protobuf::compiler::Version*>(
       &::google::protobuf::compiler::_Version_default_instance_);
 }
 inline ::google::protobuf::compiler::Version* CodeGeneratorRequest::release_compiler_version() {
   // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
   _has_bits_[0] &= ~0x00000002u;
   ::google::protobuf::compiler::Version* temp = compiler_version_;
-  compiler_version_ = NULL;
+  compiler_version_ = nullptr;
   return temp;
 }
 inline ::google::protobuf::compiler::Version* CodeGeneratorRequest::mutable_compiler_version() {
   _has_bits_[0] |= 0x00000002u;
-  if (compiler_version_ == NULL) {
+  if (compiler_version_ == nullptr) {
     auto* p = CreateMaybeMessage<::google::protobuf::compiler::Version>(GetArenaNoVirtual());
     compiler_version_ = p;
   }
@@ -1027,11 +1027,11 @@ inline ::google::protobuf::compiler::Version* CodeGeneratorRequest::mutable_comp
 }
 inline void CodeGeneratorRequest::set_allocated_compiler_version(::google::protobuf::compiler::Version* compiler_version) {
   ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
-  if (message_arena == NULL) {
+  if (message_arena == nullptr) {
     delete compiler_version_;
   }
   if (compiler_version) {
-    ::google::protobuf::Arena* submessage_arena = NULL;
+    ::google::protobuf::Arena* submessage_arena = nullptr;
     if (message_arena != submessage_arena) {
       compiler_version = ::google::protobuf::internal::GetOwnedMessage(
           message_arena, compiler_version, submessage_arena);
@@ -1074,7 +1074,7 @@ inline void CodeGeneratorResponse_File::set_name(::std::string&& value) {
 }
 #endif
 inline void CodeGeneratorResponse_File::set_name(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   _has_bits_[0] |= 0x00000001u;
   name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.name)
@@ -1093,13 +1093,13 @@ inline ::std::string* CodeGeneratorResponse_File::mutable_name() {
 inline ::std::string* CodeGeneratorResponse_File::release_name() {
   // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.name)
   if (!has_name()) {
-    return NULL;
+    return nullptr;
   }
   _has_bits_[0] &= ~0x00000001u;
   return name_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void CodeGeneratorResponse_File::set_allocated_name(::std::string* name) {
-  if (name != NULL) {
+  if (name != nullptr) {
     _has_bits_[0] |= 0x00000001u;
   } else {
     _has_bits_[0] &= ~0x00000001u;
@@ -1134,7 +1134,7 @@ inline void CodeGeneratorResponse_File::set_insertion_point(::std::string&& valu
 }
 #endif
 inline void CodeGeneratorResponse_File::set_insertion_point(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   _has_bits_[0] |= 0x00000002u;
   insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
@@ -1153,13 +1153,13 @@ inline ::std::string* CodeGeneratorResponse_File::mutable_insertion_point() {
 inline ::std::string* CodeGeneratorResponse_File::release_insertion_point() {
   // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
   if (!has_insertion_point()) {
-    return NULL;
+    return nullptr;
   }
   _has_bits_[0] &= ~0x00000002u;
   return insertion_point_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void CodeGeneratorResponse_File::set_allocated_insertion_point(::std::string* insertion_point) {
-  if (insertion_point != NULL) {
+  if (insertion_point != nullptr) {
     _has_bits_[0] |= 0x00000002u;
   } else {
     _has_bits_[0] &= ~0x00000002u;
@@ -1194,7 +1194,7 @@ inline void CodeGeneratorResponse_File::set_content(::std::string&& value) {
 }
 #endif
 inline void CodeGeneratorResponse_File::set_content(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   _has_bits_[0] |= 0x00000004u;
   content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.content)
@@ -1213,13 +1213,13 @@ inline ::std::string* CodeGeneratorResponse_File::mutable_content() {
 inline ::std::string* CodeGeneratorResponse_File::release_content() {
   // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.content)
   if (!has_content()) {
-    return NULL;
+    return nullptr;
   }
   _has_bits_[0] &= ~0x00000004u;
   return content_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void CodeGeneratorResponse_File::set_allocated_content(::std::string* content) {
-  if (content != NULL) {
+  if (content != nullptr) {
     _has_bits_[0] |= 0x00000004u;
   } else {
     _has_bits_[0] &= ~0x00000004u;
@@ -1258,7 +1258,7 @@ inline void CodeGeneratorResponse::set_error(::std::string&& value) {
 }
 #endif
 inline void CodeGeneratorResponse::set_error(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   _has_bits_[0] |= 0x00000001u;
   error_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.error)
@@ -1277,13 +1277,13 @@ inline ::std::string* CodeGeneratorResponse::mutable_error() {
 inline ::std::string* CodeGeneratorResponse::release_error() {
   // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.error)
   if (!has_error()) {
-    return NULL;
+    return nullptr;
   }
   _has_bits_[0] &= ~0x00000001u;
   return error_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void CodeGeneratorResponse::set_allocated_error(::std::string* error) {
-  if (error != NULL) {
+  if (error != nullptr) {
     _has_bits_[0] |= 0x00000001u;
   } else {
     _has_bits_[0] &= ~0x00000001u;

Fișier diff suprimat deoarece este prea mare
+ 113 - 113
src/google/protobuf/descriptor.pb.cc


Fișier diff suprimat deoarece este prea mare
+ 132 - 132
src/google/protobuf/descriptor.pb.h


+ 5 - 5
src/google/protobuf/duration.pb.cc

@@ -109,7 +109,7 @@ const int Duration::kNanosFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Duration::Duration()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Duration)
 }
@@ -122,7 +122,7 @@ Duration::Duration(::google::protobuf::Arena* arena)
 }
 Duration::Duration(const Duration& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   ::memcpy(&seconds_, &from.seconds_,
     static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -
@@ -142,7 +142,7 @@ Duration::~Duration() {
 }
 
 void Duration::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
 }
 
 void Duration::ArenaDtor(void* object) {
@@ -372,7 +372,7 @@ void Duration::MergeFrom(const ::google::protobuf::Message& from) {
   const Duration* source =
       ::google::protobuf::DynamicCastToGenerated<Duration>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Duration)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -423,7 +423,7 @@ void Duration::Swap(Duration* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }

+ 1 - 1
src/google/protobuf/duration.pb.h

@@ -115,7 +115,7 @@ class PROTOBUF_EXPORT Duration : public ::google::protobuf::Message /* @@protoc_
   // implements Message ----------------------------------------------
 
   inline Duration* New() const final {
-    return CreateMaybeMessage<Duration>(NULL);
+    return CreateMaybeMessage<Duration>(nullptr);
   }
 
   Duration* New(::google::protobuf::Arena* arena) const final {

+ 5 - 5
src/google/protobuf/empty.pb.cc

@@ -104,7 +104,7 @@ class Empty::HasBitSetters {
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Empty::Empty()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Empty)
 }
@@ -117,7 +117,7 @@ Empty::Empty(::google::protobuf::Arena* arena)
 }
 Empty::Empty(const Empty& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   // @@protoc_insertion_point(copy_constructor:google.protobuf.Empty)
 }
@@ -131,7 +131,7 @@ Empty::~Empty() {
 }
 
 void Empty::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
 }
 
 void Empty::ArenaDtor(void* object) {
@@ -273,7 +273,7 @@ void Empty::MergeFrom(const ::google::protobuf::Message& from) {
   const Empty* source =
       ::google::protobuf::DynamicCastToGenerated<Empty>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Empty)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -318,7 +318,7 @@ void Empty::Swap(Empty* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }

+ 1 - 1
src/google/protobuf/empty.pb.h

@@ -115,7 +115,7 @@ class PROTOBUF_EXPORT Empty : public ::google::protobuf::Message /* @@protoc_ins
   // implements Message ----------------------------------------------
 
   inline Empty* New() const final {
-    return CreateMaybeMessage<Empty>(NULL);
+    return CreateMaybeMessage<Empty>(nullptr);
   }
 
   Empty* New(::google::protobuf::Arena* arena) const final {

+ 5 - 5
src/google/protobuf/field_mask.pb.cc

@@ -107,7 +107,7 @@ const int FieldMask::kPathsFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 FieldMask::FieldMask()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.FieldMask)
 }
@@ -121,7 +121,7 @@ FieldMask::FieldMask(::google::protobuf::Arena* arena)
 }
 FieldMask::FieldMask(const FieldMask& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL),
+      _internal_metadata_(nullptr),
       paths_(from.paths_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask)
@@ -138,7 +138,7 @@ FieldMask::~FieldMask() {
 }
 
 void FieldMask::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
 }
 
 void FieldMask::ArenaDtor(void* object) {
@@ -352,7 +352,7 @@ void FieldMask::MergeFrom(const ::google::protobuf::Message& from) {
   const FieldMask* source =
       ::google::protobuf::DynamicCastToGenerated<FieldMask>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.FieldMask)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -398,7 +398,7 @@ void FieldMask::Swap(FieldMask* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }

+ 3 - 3
src/google/protobuf/field_mask.pb.h

@@ -115,7 +115,7 @@ class PROTOBUF_EXPORT FieldMask : public ::google::protobuf::Message /* @@protoc
   // implements Message ----------------------------------------------
 
   inline FieldMask* New() const final {
-    return CreateMaybeMessage<FieldMask>(NULL);
+    return CreateMaybeMessage<FieldMask>(nullptr);
   }
 
   FieldMask* New(::google::protobuf::Arena* arena) const final {
@@ -238,7 +238,7 @@ inline void FieldMask::set_paths(int index, ::std::string&& value) {
 }
 #endif
 inline void FieldMask::set_paths(int index, const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   paths_.Mutable(index)->assign(value);
   // @@protoc_insertion_point(field_set_char:google.protobuf.FieldMask.paths)
 }
@@ -262,7 +262,7 @@ inline void FieldMask::add_paths(::std::string&& value) {
 }
 #endif
 inline void FieldMask::add_paths(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   paths_.Add()->assign(value);
   // @@protoc_insertion_point(field_add_char:google.protobuf.FieldMask.paths)
 }

+ 3 - 3
src/google/protobuf/source_context.pb.cc

@@ -108,13 +108,13 @@ const int SourceContext::kFileNameFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 SourceContext::SourceContext()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.SourceContext)
 }
 SourceContext::SourceContext(const SourceContext& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   file_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (from.file_name().size() > 0) {
@@ -339,7 +339,7 @@ void SourceContext::MergeFrom(const ::google::protobuf::Message& from) {
   const SourceContext* source =
       ::google::protobuf::DynamicCastToGenerated<SourceContext>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.SourceContext)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {

+ 5 - 5
src/google/protobuf/source_context.pb.h

@@ -108,7 +108,7 @@ class PROTOBUF_EXPORT SourceContext : public ::google::protobuf::Message /* @@pr
   // implements Message ----------------------------------------------
 
   inline SourceContext* New() const final {
-    return CreateMaybeMessage<SourceContext>(NULL);
+    return CreateMaybeMessage<SourceContext>(nullptr);
   }
 
   SourceContext* New(::google::protobuf::Arena* arena) const final {
@@ -142,10 +142,10 @@ class PROTOBUF_EXPORT SourceContext : public ::google::protobuf::Message /* @@pr
   void InternalSwap(SourceContext* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
-    return NULL;
+    return nullptr;
   }
   inline void* MaybeArenaPtr() const {
-    return NULL;
+    return nullptr;
   }
   public:
 
@@ -211,7 +211,7 @@ inline void SourceContext::set_file_name(::std::string&& value) {
 }
 #endif
 inline void SourceContext::set_file_name(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:google.protobuf.SourceContext.file_name)
@@ -233,7 +233,7 @@ inline ::std::string* SourceContext::release_file_name() {
   return file_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void SourceContext::set_allocated_file_name(::std::string* file_name) {
-  if (file_name != NULL) {
+  if (file_name != nullptr) {
     
   } else {
     

+ 23 - 23
src/google/protobuf/struct.pb.cc

@@ -237,7 +237,7 @@ const int Struct::kFieldsFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Struct::Struct()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Struct)
 }
@@ -251,7 +251,7 @@ Struct::Struct(::google::protobuf::Arena* arena)
 }
 Struct::Struct(const Struct& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   fields_.MergeFrom(from.fields_);
   // @@protoc_insertion_point(copy_constructor:google.protobuf.Struct)
@@ -268,7 +268,7 @@ Struct::~Struct() {
 }
 
 void Struct::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
 }
 
 void Struct::ArenaDtor(void* object) {
@@ -442,7 +442,7 @@ void Struct::SerializeWithCachedSizes(
       for (size_type i = 0; i < n; i++) {
         entry.reset(fields_.NewEntryWrapper(items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
         ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(1, *entry, output);
-        if (entry->GetArena() != NULL) {
+        if (entry->GetArena() != nullptr) {
           entry.release();
         }
         Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
@@ -454,7 +454,7 @@ void Struct::SerializeWithCachedSizes(
           it != this->fields().end(); ++it) {
         entry.reset(fields_.NewEntryWrapper(it->first, it->second));
         ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(1, *entry, output);
-        if (entry->GetArena() != NULL) {
+        if (entry->GetArena() != nullptr) {
           entry.release();
         }
         Utf8Check::Check(&(*it));
@@ -507,7 +507,7 @@ void Struct::SerializeWithCachedSizes(
       for (size_type i = 0; i < n; i++) {
         entry.reset(fields_.NewEntryWrapper(items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
         target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(1, *entry, deterministic, target);
-        if (entry->GetArena() != NULL) {
+        if (entry->GetArena() != nullptr) {
           entry.release();
         }
         Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
@@ -519,7 +519,7 @@ void Struct::SerializeWithCachedSizes(
           it != this->fields().end(); ++it) {
         entry.reset(fields_.NewEntryWrapper(it->first, it->second));
         target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(1, *entry, deterministic, target);
-        if (entry->GetArena() != NULL) {
+        if (entry->GetArena() != nullptr) {
           entry.release();
         }
         Utf8Check::Check(&(*it));
@@ -556,14 +556,14 @@ size_t Struct::ByteSizeLong() const {
     for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
         it = this->fields().begin();
         it != this->fields().end(); ++it) {
-      if (entry.get() != NULL && entry->GetArena() != NULL) {
+      if (entry.get() != nullptr && entry->GetArena() != nullptr) {
         entry.release();
       }
       entry.reset(fields_.NewEntryWrapper(it->first, it->second));
       total_size += ::google::protobuf::internal::WireFormatLite::
           MessageSizeNoVirtual(*entry);
     }
-    if (entry.get() != NULL && entry->GetArena() != NULL) {
+    if (entry.get() != nullptr && entry->GetArena() != nullptr) {
       entry.release();
     }
   }
@@ -579,7 +579,7 @@ void Struct::MergeFrom(const ::google::protobuf::Message& from) {
   const Struct* source =
       ::google::protobuf::DynamicCastToGenerated<Struct>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Struct)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -625,7 +625,7 @@ void Struct::Swap(Struct* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }
@@ -714,7 +714,7 @@ const int Value::kListValueFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Value::Value()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Value)
 }
@@ -727,7 +727,7 @@ Value::Value(::google::protobuf::Arena* arena)
 }
 Value::Value(const Value& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   clear_has_kind();
   switch (from.kind_case()) {
@@ -774,7 +774,7 @@ Value::~Value() {
 }
 
 void Value::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
   if (has_kind()) {
     clear_kind();
   }
@@ -816,13 +816,13 @@ void Value::clear_kind() {
       break;
     }
     case kStructValue: {
-      if (GetArenaNoVirtual() == NULL) {
+      if (GetArenaNoVirtual() == nullptr) {
         delete kind_.struct_value_;
       }
       break;
     }
     case kListValue: {
-      if (GetArenaNoVirtual() == NULL) {
+      if (GetArenaNoVirtual() == nullptr) {
         delete kind_.list_value_;
       }
       break;
@@ -1243,7 +1243,7 @@ void Value::MergeFrom(const ::google::protobuf::Message& from) {
   const Value* source =
       ::google::protobuf::DynamicCastToGenerated<Value>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Value)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -1317,7 +1317,7 @@ void Value::Swap(Value* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }
@@ -1353,7 +1353,7 @@ const int ListValue::kValuesFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 ListValue::ListValue()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.ListValue)
 }
@@ -1367,7 +1367,7 @@ ListValue::ListValue(::google::protobuf::Arena* arena)
 }
 ListValue::ListValue(const ListValue& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL),
+      _internal_metadata_(nullptr),
       values_(from.values_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   // @@protoc_insertion_point(copy_constructor:google.protobuf.ListValue)
@@ -1384,7 +1384,7 @@ ListValue::~ListValue() {
 }
 
 void ListValue::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
 }
 
 void ListValue::ArenaDtor(void* object) {
@@ -1589,7 +1589,7 @@ void ListValue::MergeFrom(const ::google::protobuf::Message& from) {
   const ListValue* source =
       ::google::protobuf::DynamicCastToGenerated<ListValue>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.ListValue)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -1635,7 +1635,7 @@ void ListValue::Swap(ListValue* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }

+ 21 - 21
src/google/protobuf/struct.pb.h

@@ -175,7 +175,7 @@ class PROTOBUF_EXPORT Struct : public ::google::protobuf::Message /* @@protoc_in
   // implements Message ----------------------------------------------
 
   inline Struct* New() const final {
-    return CreateMaybeMessage<Struct>(NULL);
+    return CreateMaybeMessage<Struct>(nullptr);
   }
 
   Struct* New(::google::protobuf::Arena* arena) const final {
@@ -320,7 +320,7 @@ class PROTOBUF_EXPORT Value : public ::google::protobuf::Message /* @@protoc_ins
   // implements Message ----------------------------------------------
 
   inline Value* New() const final {
-    return CreateMaybeMessage<Value>(NULL);
+    return CreateMaybeMessage<Value>(nullptr);
   }
 
   Value* New(::google::protobuf::Arena* arena) const final {
@@ -538,7 +538,7 @@ class PROTOBUF_EXPORT ListValue : public ::google::protobuf::Message /* @@protoc
   // implements Message ----------------------------------------------
 
   inline ListValue* New() const final {
-    return CreateMaybeMessage<ListValue>(NULL);
+    return CreateMaybeMessage<ListValue>(nullptr);
   }
 
   ListValue* New(::google::protobuf::Arena* arena) const final {
@@ -752,7 +752,7 @@ inline void Value::set_string_value(::std::string&& value) {
 }
 #endif
 inline void Value::set_string_value(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   if (!has_string_value()) {
     clear_kind();
     set_has_string_value();
@@ -792,14 +792,14 @@ inline ::std::string* Value::release_string_value() {
     return kind_.string_value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
         GetArenaNoVirtual());
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 inline void Value::set_allocated_string_value(::std::string* string_value) {
   if (has_kind()) {
     clear_kind();
   }
-  if (string_value != NULL) {
+  if (string_value != nullptr) {
     set_has_string_value();
     kind_.string_value_.UnsafeSetDefault(string_value);
   }
@@ -807,17 +807,17 @@ inline void Value::set_allocated_string_value(::std::string* string_value) {
 }
 inline ::std::string* Value::unsafe_arena_release_string_value() {
   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.string_value)
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
   if (has_string_value()) {
     clear_has_kind();
     return kind_.string_value_.UnsafeArenaRelease(
         &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 inline void Value::unsafe_arena_set_allocated_string_value(::std::string* string_value) {
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
   if (!has_string_value()) {
     kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   }
@@ -867,7 +867,7 @@ inline void Value::set_has_struct_value() {
 }
 inline void Value::clear_struct_value() {
   if (has_struct_value()) {
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete kind_.struct_value_;
     }
     clear_has_kind();
@@ -878,13 +878,13 @@ inline ::google::protobuf::Struct* Value::release_struct_value() {
   if (has_struct_value()) {
     clear_has_kind();
       ::google::protobuf::Struct* temp = kind_.struct_value_;
-    if (GetArenaNoVirtual() != NULL) {
+    if (GetArenaNoVirtual() != nullptr) {
       temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
     }
-    kind_.struct_value_ = NULL;
+    kind_.struct_value_ = nullptr;
     return temp;
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 inline const ::google::protobuf::Struct& Value::struct_value() const {
@@ -898,10 +898,10 @@ inline ::google::protobuf::Struct* Value::unsafe_arena_release_struct_value() {
   if (has_struct_value()) {
     clear_has_kind();
     ::google::protobuf::Struct* temp = kind_.struct_value_;
-    kind_.struct_value_ = NULL;
+    kind_.struct_value_ = nullptr;
     return temp;
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 inline void Value::unsafe_arena_set_allocated_struct_value(::google::protobuf::Struct* struct_value) {
@@ -932,7 +932,7 @@ inline void Value::set_has_list_value() {
 }
 inline void Value::clear_list_value() {
   if (has_list_value()) {
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete kind_.list_value_;
     }
     clear_has_kind();
@@ -943,13 +943,13 @@ inline ::google::protobuf::ListValue* Value::release_list_value() {
   if (has_list_value()) {
     clear_has_kind();
       ::google::protobuf::ListValue* temp = kind_.list_value_;
-    if (GetArenaNoVirtual() != NULL) {
+    if (GetArenaNoVirtual() != nullptr) {
       temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
     }
-    kind_.list_value_ = NULL;
+    kind_.list_value_ = nullptr;
     return temp;
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 inline const ::google::protobuf::ListValue& Value::list_value() const {
@@ -963,10 +963,10 @@ inline ::google::protobuf::ListValue* Value::unsafe_arena_release_list_value() {
   if (has_list_value()) {
     clear_has_kind();
     ::google::protobuf::ListValue* temp = kind_.list_value_;
-    kind_.list_value_ = NULL;
+    kind_.list_value_ = nullptr;
     return temp;
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 inline void Value::unsafe_arena_set_allocated_list_value(::google::protobuf::ListValue* list_value) {

+ 5 - 5
src/google/protobuf/timestamp.pb.cc

@@ -109,7 +109,7 @@ const int Timestamp::kNanosFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Timestamp::Timestamp()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Timestamp)
 }
@@ -122,7 +122,7 @@ Timestamp::Timestamp(::google::protobuf::Arena* arena)
 }
 Timestamp::Timestamp(const Timestamp& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   ::memcpy(&seconds_, &from.seconds_,
     static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -
@@ -142,7 +142,7 @@ Timestamp::~Timestamp() {
 }
 
 void Timestamp::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
 }
 
 void Timestamp::ArenaDtor(void* object) {
@@ -372,7 +372,7 @@ void Timestamp::MergeFrom(const ::google::protobuf::Message& from) {
   const Timestamp* source =
       ::google::protobuf::DynamicCastToGenerated<Timestamp>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Timestamp)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -423,7 +423,7 @@ void Timestamp::Swap(Timestamp* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }

+ 1 - 1
src/google/protobuf/timestamp.pb.h

@@ -115,7 +115,7 @@ class PROTOBUF_EXPORT Timestamp : public ::google::protobuf::Message /* @@protoc
   // implements Message ----------------------------------------------
 
   inline Timestamp* New() const final {
-    return CreateMaybeMessage<Timestamp>(NULL);
+    return CreateMaybeMessage<Timestamp>(nullptr);
   }
 
   Timestamp* New(::google::protobuf::Arena* arena) const final {

+ 44 - 44
src/google/protobuf/type.pb.cc

@@ -384,7 +384,7 @@ Type::HasBitSetters::source_context(const Type* msg) {
 }
 void Type::unsafe_arena_set_allocated_source_context(
     ::google::protobuf::SourceContext* source_context) {
-  if (GetArenaNoVirtual() == NULL) {
+  if (GetArenaNoVirtual() == nullptr) {
     delete source_context_;
   }
   source_context_ = source_context;
@@ -396,10 +396,10 @@ void Type::unsafe_arena_set_allocated_source_context(
   // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Type.source_context)
 }
 void Type::clear_source_context() {
-  if (GetArenaNoVirtual() == NULL && source_context_ != NULL) {
+  if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) {
     delete source_context_;
   }
-  source_context_ = NULL;
+  source_context_ = nullptr;
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Type::kNameFieldNumber;
@@ -411,7 +411,7 @@ const int Type::kSyntaxFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Type::Type()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Type)
 }
@@ -427,7 +427,7 @@ Type::Type(::google::protobuf::Arena* arena)
 }
 Type::Type(const Type& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL),
+      _internal_metadata_(nullptr),
       fields_(from.fields_),
       oneofs_(from.oneofs_),
       options_(from.options_) {
@@ -440,7 +440,7 @@ Type::Type(const Type& from)
   if (from.has_source_context()) {
     source_context_ = new ::google::protobuf::SourceContext(*from.source_context_);
   } else {
-    source_context_ = NULL;
+    source_context_ = nullptr;
   }
   syntax_ = from.syntax_;
   // @@protoc_insertion_point(copy_constructor:google.protobuf.Type)
@@ -461,7 +461,7 @@ Type::~Type() {
 }
 
 void Type::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
   name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (this != internal_default_instance()) delete source_context_;
 }
@@ -491,10 +491,10 @@ void Type::Clear() {
   oneofs_.Clear();
   options_.Clear();
   name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
-  if (GetArenaNoVirtual() == NULL && source_context_ != NULL) {
+  if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) {
     delete source_context_;
   }
-  source_context_ = NULL;
+  source_context_ = nullptr;
   syntax_ = 0;
   _internal_metadata_.Clear();
 }
@@ -949,7 +949,7 @@ void Type::MergeFrom(const ::google::protobuf::Message& from) {
   const Type* source =
       ::google::protobuf::DynamicCastToGenerated<Type>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Type)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -1006,7 +1006,7 @@ void Type::Swap(Type* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }
@@ -1056,7 +1056,7 @@ const int Field::kDefaultValueFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Field::Field()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Field)
 }
@@ -1070,7 +1070,7 @@ Field::Field(::google::protobuf::Arena* arena)
 }
 Field::Field(const Field& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL),
+      _internal_metadata_(nullptr),
       options_(from.options_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
@@ -1117,7 +1117,7 @@ Field::~Field() {
 }
 
 void Field::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
   name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   json_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
@@ -1783,7 +1783,7 @@ void Field::MergeFrom(const ::google::protobuf::Message& from) {
   const Field* source =
       ::google::protobuf::DynamicCastToGenerated<Field>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Field)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -1856,7 +1856,7 @@ void Field::Swap(Field* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }
@@ -1908,7 +1908,7 @@ Enum::HasBitSetters::source_context(const Enum* msg) {
 }
 void Enum::unsafe_arena_set_allocated_source_context(
     ::google::protobuf::SourceContext* source_context) {
-  if (GetArenaNoVirtual() == NULL) {
+  if (GetArenaNoVirtual() == nullptr) {
     delete source_context_;
   }
   source_context_ = source_context;
@@ -1920,10 +1920,10 @@ void Enum::unsafe_arena_set_allocated_source_context(
   // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Enum.source_context)
 }
 void Enum::clear_source_context() {
-  if (GetArenaNoVirtual() == NULL && source_context_ != NULL) {
+  if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) {
     delete source_context_;
   }
-  source_context_ = NULL;
+  source_context_ = nullptr;
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Enum::kNameFieldNumber;
@@ -1934,7 +1934,7 @@ const int Enum::kSyntaxFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Enum::Enum()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Enum)
 }
@@ -1949,7 +1949,7 @@ Enum::Enum(::google::protobuf::Arena* arena)
 }
 Enum::Enum(const Enum& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL),
+      _internal_metadata_(nullptr),
       enumvalue_(from.enumvalue_),
       options_(from.options_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
@@ -1961,7 +1961,7 @@ Enum::Enum(const Enum& from)
   if (from.has_source_context()) {
     source_context_ = new ::google::protobuf::SourceContext(*from.source_context_);
   } else {
-    source_context_ = NULL;
+    source_context_ = nullptr;
   }
   syntax_ = from.syntax_;
   // @@protoc_insertion_point(copy_constructor:google.protobuf.Enum)
@@ -1982,7 +1982,7 @@ Enum::~Enum() {
 }
 
 void Enum::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
   name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (this != internal_default_instance()) delete source_context_;
 }
@@ -2011,10 +2011,10 @@ void Enum::Clear() {
   enumvalue_.Clear();
   options_.Clear();
   name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
-  if (GetArenaNoVirtual() == NULL && source_context_ != NULL) {
+  if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) {
     delete source_context_;
   }
-  source_context_ = NULL;
+  source_context_ = nullptr;
   syntax_ = 0;
   _internal_metadata_.Clear();
 }
@@ -2403,7 +2403,7 @@ void Enum::MergeFrom(const ::google::protobuf::Message& from) {
   const Enum* source =
       ::google::protobuf::DynamicCastToGenerated<Enum>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Enum)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -2459,7 +2459,7 @@ void Enum::Swap(Enum* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }
@@ -2501,7 +2501,7 @@ const int EnumValue::kOptionsFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 EnumValue::EnumValue()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.EnumValue)
 }
@@ -2515,7 +2515,7 @@ EnumValue::EnumValue(::google::protobuf::Arena* arena)
 }
 EnumValue::EnumValue(const EnumValue& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL),
+      _internal_metadata_(nullptr),
       options_(from.options_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
@@ -2540,7 +2540,7 @@ EnumValue::~EnumValue() {
 }
 
 void EnumValue::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
   name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 
@@ -2850,7 +2850,7 @@ void EnumValue::MergeFrom(const ::google::protobuf::Message& from) {
   const EnumValue* source =
       ::google::protobuf::DynamicCastToGenerated<EnumValue>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.EnumValue)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -2902,7 +2902,7 @@ void EnumValue::Swap(EnumValue* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }
@@ -2944,7 +2944,7 @@ Option::HasBitSetters::value(const Option* msg) {
 }
 void Option::unsafe_arena_set_allocated_value(
     ::google::protobuf::Any* value) {
-  if (GetArenaNoVirtual() == NULL) {
+  if (GetArenaNoVirtual() == nullptr) {
     delete value_;
   }
   value_ = value;
@@ -2956,10 +2956,10 @@ void Option::unsafe_arena_set_allocated_value(
   // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Option.value)
 }
 void Option::clear_value() {
-  if (GetArenaNoVirtual() == NULL && value_ != NULL) {
+  if (GetArenaNoVirtual() == nullptr && value_ != nullptr) {
     delete value_;
   }
-  value_ = NULL;
+  value_ = nullptr;
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Option::kNameFieldNumber;
@@ -2967,7 +2967,7 @@ const int Option::kValueFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Option::Option()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Option)
 }
@@ -2980,7 +2980,7 @@ Option::Option(::google::protobuf::Arena* arena)
 }
 Option::Option(const Option& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (from.name().size() > 0) {
@@ -2990,7 +2990,7 @@ Option::Option(const Option& from)
   if (from.has_value()) {
     value_ = new ::google::protobuf::Any(*from.value_);
   } else {
-    value_ = NULL;
+    value_ = nullptr;
   }
   // @@protoc_insertion_point(copy_constructor:google.protobuf.Option)
 }
@@ -2999,7 +2999,7 @@ void Option::SharedCtor() {
   ::google::protobuf::internal::InitSCC(
       &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base);
   name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  value_ = NULL;
+  value_ = nullptr;
 }
 
 Option::~Option() {
@@ -3008,7 +3008,7 @@ Option::~Option() {
 }
 
 void Option::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
   name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (this != internal_default_instance()) delete value_;
 }
@@ -3035,10 +3035,10 @@ void Option::Clear() {
   (void) cached_has_bits;
 
   name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
-  if (GetArenaNoVirtual() == NULL && value_ != NULL) {
+  if (GetArenaNoVirtual() == nullptr && value_ != nullptr) {
     delete value_;
   }
-  value_ = NULL;
+  value_ = nullptr;
   _internal_metadata_.Clear();
 }
 
@@ -3270,7 +3270,7 @@ void Option::MergeFrom(const ::google::protobuf::Message& from) {
   const Option* source =
       ::google::protobuf::DynamicCastToGenerated<Option>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Option)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -3321,7 +3321,7 @@ void Option::Swap(Option* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }

+ 71 - 71
src/google/protobuf/type.pb.h

@@ -216,7 +216,7 @@ class PROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_inse
   // implements Message ----------------------------------------------
 
   inline Type* New() const final {
-    return CreateMaybeMessage<Type>(NULL);
+    return CreateMaybeMessage<Type>(nullptr);
   }
 
   Type* New(::google::protobuf::Arena* arena) const final {
@@ -428,7 +428,7 @@ class PROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ins
   // implements Message ----------------------------------------------
 
   inline Field* New() const final {
-    return CreateMaybeMessage<Field>(NULL);
+    return CreateMaybeMessage<Field>(nullptr);
   }
 
   Field* New(::google::protobuf::Arena* arena) const final {
@@ -781,7 +781,7 @@ class PROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_inse
   // implements Message ----------------------------------------------
 
   inline Enum* New() const final {
-    return CreateMaybeMessage<Enum>(NULL);
+    return CreateMaybeMessage<Enum>(nullptr);
   }
 
   Enum* New(::google::protobuf::Arena* arena) const final {
@@ -970,7 +970,7 @@ class PROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@protoc
   // implements Message ----------------------------------------------
 
   inline EnumValue* New() const final {
-    return CreateMaybeMessage<EnumValue>(NULL);
+    return CreateMaybeMessage<EnumValue>(nullptr);
   }
 
   EnumValue* New(::google::protobuf::Arena* arena) const final {
@@ -1133,7 +1133,7 @@ class PROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc_in
   // implements Message ----------------------------------------------
 
   inline Option* New() const final {
-    return CreateMaybeMessage<Option>(NULL);
+    return CreateMaybeMessage<Option>(nullptr);
   }
 
   Option* New(::google::protobuf::Arena* arena) const final {
@@ -1266,7 +1266,7 @@ inline void Type::set_name(::std::string&& value) {
 }
 #endif
 inline void Type::set_name(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
               GetArenaNoVirtual());
@@ -1290,7 +1290,7 @@ inline ::std::string* Type::release_name() {
   return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
 }
 inline void Type::set_allocated_name(::std::string* name) {
-  if (name != NULL) {
+  if (name != nullptr) {
     
   } else {
     
@@ -1301,15 +1301,15 @@ inline void Type::set_allocated_name(::std::string* name) {
 }
 inline ::std::string* Type::unsafe_arena_release_name() {
   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.name)
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
   
   return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
       GetArenaNoVirtual());
 }
 inline void Type::unsafe_arena_set_allocated_name(
     ::std::string* name) {
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-  if (name != NULL) {
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
+  if (name != nullptr) {
     
   } else {
     
@@ -1375,7 +1375,7 @@ inline void Type::set_oneofs(int index, ::std::string&& value) {
 }
 #endif
 inline void Type::set_oneofs(int index, const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   oneofs_.Mutable(index)->assign(value);
   // @@protoc_insertion_point(field_set_char:google.protobuf.Type.oneofs)
 }
@@ -1399,7 +1399,7 @@ inline void Type::add_oneofs(::std::string&& value) {
 }
 #endif
 inline void Type::add_oneofs(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   oneofs_.Add()->assign(value);
   // @@protoc_insertion_point(field_add_char:google.protobuf.Type.oneofs)
 }
@@ -1450,34 +1450,34 @@ Type::options() const {
 
 // .google.protobuf.SourceContext source_context = 5;
 inline bool Type::has_source_context() const {
-  return this != internal_default_instance() && source_context_ != NULL;
+  return this != internal_default_instance() && source_context_ != nullptr;
 }
 inline const ::google::protobuf::SourceContext& Type::source_context() const {
   const ::google::protobuf::SourceContext* p = source_context_;
   // @@protoc_insertion_point(field_get:google.protobuf.Type.source_context)
-  return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::SourceContext*>(
+  return p != nullptr ? *p : *reinterpret_cast<const ::google::protobuf::SourceContext*>(
       &::google::protobuf::_SourceContext_default_instance_);
 }
 inline ::google::protobuf::SourceContext* Type::release_source_context() {
   // @@protoc_insertion_point(field_release:google.protobuf.Type.source_context)
   
   ::google::protobuf::SourceContext* temp = source_context_;
-  if (GetArenaNoVirtual() != NULL) {
+  if (GetArenaNoVirtual() != nullptr) {
     temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
   }
-  source_context_ = NULL;
+  source_context_ = nullptr;
   return temp;
 }
 inline ::google::protobuf::SourceContext* Type::unsafe_arena_release_source_context() {
   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.source_context)
   
   ::google::protobuf::SourceContext* temp = source_context_;
-  source_context_ = NULL;
+  source_context_ = nullptr;
   return temp;
 }
 inline ::google::protobuf::SourceContext* Type::mutable_source_context() {
   
-  if (source_context_ == NULL) {
+  if (source_context_ == nullptr) {
     auto* p = CreateMaybeMessage<::google::protobuf::SourceContext>(GetArenaNoVirtual());
     source_context_ = p;
   }
@@ -1486,11 +1486,11 @@ inline ::google::protobuf::SourceContext* Type::mutable_source_context() {
 }
 inline void Type::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
   ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
-  if (message_arena == NULL) {
+  if (message_arena == nullptr) {
     delete reinterpret_cast< ::google::protobuf::MessageLite*>(source_context_);
   }
   if (source_context) {
-    ::google::protobuf::Arena* submessage_arena = NULL;
+    ::google::protobuf::Arena* submessage_arena = nullptr;
     if (message_arena != submessage_arena) {
       source_context = ::google::protobuf::internal::GetOwnedMessage(
           message_arena, source_context, submessage_arena);
@@ -1585,7 +1585,7 @@ inline void Field::set_name(::std::string&& value) {
 }
 #endif
 inline void Field::set_name(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
               GetArenaNoVirtual());
@@ -1609,7 +1609,7 @@ inline ::std::string* Field::release_name() {
   return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
 }
 inline void Field::set_allocated_name(::std::string* name) {
-  if (name != NULL) {
+  if (name != nullptr) {
     
   } else {
     
@@ -1620,15 +1620,15 @@ inline void Field::set_allocated_name(::std::string* name) {
 }
 inline ::std::string* Field::unsafe_arena_release_name() {
   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.name)
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
   
   return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
       GetArenaNoVirtual());
 }
 inline void Field::unsafe_arena_set_allocated_name(
     ::std::string* name) {
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-  if (name != NULL) {
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
+  if (name != nullptr) {
     
   } else {
     
@@ -1660,7 +1660,7 @@ inline void Field::set_type_url(::std::string&& value) {
 }
 #endif
 inline void Field::set_type_url(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   type_url_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
               GetArenaNoVirtual());
@@ -1684,7 +1684,7 @@ inline ::std::string* Field::release_type_url() {
   return type_url_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
 }
 inline void Field::set_allocated_type_url(::std::string* type_url) {
-  if (type_url != NULL) {
+  if (type_url != nullptr) {
     
   } else {
     
@@ -1695,15 +1695,15 @@ inline void Field::set_allocated_type_url(::std::string* type_url) {
 }
 inline ::std::string* Field::unsafe_arena_release_type_url() {
   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.type_url)
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
   
   return type_url_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
       GetArenaNoVirtual());
 }
 inline void Field::unsafe_arena_set_allocated_type_url(
     ::std::string* type_url) {
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-  if (type_url != NULL) {
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
+  if (type_url != nullptr) {
     
   } else {
     
@@ -1793,7 +1793,7 @@ inline void Field::set_json_name(::std::string&& value) {
 }
 #endif
 inline void Field::set_json_name(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
               GetArenaNoVirtual());
@@ -1817,7 +1817,7 @@ inline ::std::string* Field::release_json_name() {
   return json_name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
 }
 inline void Field::set_allocated_json_name(::std::string* json_name) {
-  if (json_name != NULL) {
+  if (json_name != nullptr) {
     
   } else {
     
@@ -1828,15 +1828,15 @@ inline void Field::set_allocated_json_name(::std::string* json_name) {
 }
 inline ::std::string* Field::unsafe_arena_release_json_name() {
   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.json_name)
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
   
   return json_name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
       GetArenaNoVirtual());
 }
 inline void Field::unsafe_arena_set_allocated_json_name(
     ::std::string* json_name) {
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-  if (json_name != NULL) {
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
+  if (json_name != nullptr) {
     
   } else {
     
@@ -1868,7 +1868,7 @@ inline void Field::set_default_value(::std::string&& value) {
 }
 #endif
 inline void Field::set_default_value(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
               GetArenaNoVirtual());
@@ -1892,7 +1892,7 @@ inline ::std::string* Field::release_default_value() {
   return default_value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
 }
 inline void Field::set_allocated_default_value(::std::string* default_value) {
-  if (default_value != NULL) {
+  if (default_value != nullptr) {
     
   } else {
     
@@ -1903,15 +1903,15 @@ inline void Field::set_allocated_default_value(::std::string* default_value) {
 }
 inline ::std::string* Field::unsafe_arena_release_default_value() {
   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.default_value)
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
   
   return default_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
       GetArenaNoVirtual());
 }
 inline void Field::unsafe_arena_set_allocated_default_value(
     ::std::string* default_value) {
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-  if (default_value != NULL) {
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
+  if (default_value != nullptr) {
     
   } else {
     
@@ -1947,7 +1947,7 @@ inline void Enum::set_name(::std::string&& value) {
 }
 #endif
 inline void Enum::set_name(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
               GetArenaNoVirtual());
@@ -1971,7 +1971,7 @@ inline ::std::string* Enum::release_name() {
   return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
 }
 inline void Enum::set_allocated_name(::std::string* name) {
-  if (name != NULL) {
+  if (name != nullptr) {
     
   } else {
     
@@ -1982,15 +1982,15 @@ inline void Enum::set_allocated_name(::std::string* name) {
 }
 inline ::std::string* Enum::unsafe_arena_release_name() {
   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.name)
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
   
   return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
       GetArenaNoVirtual());
 }
 inline void Enum::unsafe_arena_set_allocated_name(
     ::std::string* name) {
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-  if (name != NULL) {
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
+  if (name != nullptr) {
     
   } else {
     
@@ -2062,34 +2062,34 @@ Enum::options() const {
 
 // .google.protobuf.SourceContext source_context = 4;
 inline bool Enum::has_source_context() const {
-  return this != internal_default_instance() && source_context_ != NULL;
+  return this != internal_default_instance() && source_context_ != nullptr;
 }
 inline const ::google::protobuf::SourceContext& Enum::source_context() const {
   const ::google::protobuf::SourceContext* p = source_context_;
   // @@protoc_insertion_point(field_get:google.protobuf.Enum.source_context)
-  return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::SourceContext*>(
+  return p != nullptr ? *p : *reinterpret_cast<const ::google::protobuf::SourceContext*>(
       &::google::protobuf::_SourceContext_default_instance_);
 }
 inline ::google::protobuf::SourceContext* Enum::release_source_context() {
   // @@protoc_insertion_point(field_release:google.protobuf.Enum.source_context)
   
   ::google::protobuf::SourceContext* temp = source_context_;
-  if (GetArenaNoVirtual() != NULL) {
+  if (GetArenaNoVirtual() != nullptr) {
     temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
   }
-  source_context_ = NULL;
+  source_context_ = nullptr;
   return temp;
 }
 inline ::google::protobuf::SourceContext* Enum::unsafe_arena_release_source_context() {
   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.source_context)
   
   ::google::protobuf::SourceContext* temp = source_context_;
-  source_context_ = NULL;
+  source_context_ = nullptr;
   return temp;
 }
 inline ::google::protobuf::SourceContext* Enum::mutable_source_context() {
   
-  if (source_context_ == NULL) {
+  if (source_context_ == nullptr) {
     auto* p = CreateMaybeMessage<::google::protobuf::SourceContext>(GetArenaNoVirtual());
     source_context_ = p;
   }
@@ -2098,11 +2098,11 @@ inline ::google::protobuf::SourceContext* Enum::mutable_source_context() {
 }
 inline void Enum::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
   ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
-  if (message_arena == NULL) {
+  if (message_arena == nullptr) {
     delete reinterpret_cast< ::google::protobuf::MessageLite*>(source_context_);
   }
   if (source_context) {
-    ::google::protobuf::Arena* submessage_arena = NULL;
+    ::google::protobuf::Arena* submessage_arena = nullptr;
     if (message_arena != submessage_arena) {
       source_context = ::google::protobuf::internal::GetOwnedMessage(
           message_arena, source_context, submessage_arena);
@@ -2155,7 +2155,7 @@ inline void EnumValue::set_name(::std::string&& value) {
 }
 #endif
 inline void EnumValue::set_name(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
               GetArenaNoVirtual());
@@ -2179,7 +2179,7 @@ inline ::std::string* EnumValue::release_name() {
   return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
 }
 inline void EnumValue::set_allocated_name(::std::string* name) {
-  if (name != NULL) {
+  if (name != nullptr) {
     
   } else {
     
@@ -2190,15 +2190,15 @@ inline void EnumValue::set_allocated_name(::std::string* name) {
 }
 inline ::std::string* EnumValue::unsafe_arena_release_name() {
   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumValue.name)
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
   
   return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
       GetArenaNoVirtual());
 }
 inline void EnumValue::unsafe_arena_set_allocated_name(
     ::std::string* name) {
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-  if (name != NULL) {
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
+  if (name != nullptr) {
     
   } else {
     
@@ -2278,7 +2278,7 @@ inline void Option::set_name(::std::string&& value) {
 }
 #endif
 inline void Option::set_name(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
               GetArenaNoVirtual());
@@ -2302,7 +2302,7 @@ inline ::std::string* Option::release_name() {
   return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
 }
 inline void Option::set_allocated_name(::std::string* name) {
-  if (name != NULL) {
+  if (name != nullptr) {
     
   } else {
     
@@ -2313,15 +2313,15 @@ inline void Option::set_allocated_name(::std::string* name) {
 }
 inline ::std::string* Option::unsafe_arena_release_name() {
   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.name)
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
   
   return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
       GetArenaNoVirtual());
 }
 inline void Option::unsafe_arena_set_allocated_name(
     ::std::string* name) {
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-  if (name != NULL) {
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
+  if (name != nullptr) {
     
   } else {
     
@@ -2333,34 +2333,34 @@ inline void Option::unsafe_arena_set_allocated_name(
 
 // .google.protobuf.Any value = 2;
 inline bool Option::has_value() const {
-  return this != internal_default_instance() && value_ != NULL;
+  return this != internal_default_instance() && value_ != nullptr;
 }
 inline const ::google::protobuf::Any& Option::value() const {
   const ::google::protobuf::Any* p = value_;
   // @@protoc_insertion_point(field_get:google.protobuf.Option.value)
-  return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::Any*>(
+  return p != nullptr ? *p : *reinterpret_cast<const ::google::protobuf::Any*>(
       &::google::protobuf::_Any_default_instance_);
 }
 inline ::google::protobuf::Any* Option::release_value() {
   // @@protoc_insertion_point(field_release:google.protobuf.Option.value)
   
   ::google::protobuf::Any* temp = value_;
-  if (GetArenaNoVirtual() != NULL) {
+  if (GetArenaNoVirtual() != nullptr) {
     temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
   }
-  value_ = NULL;
+  value_ = nullptr;
   return temp;
 }
 inline ::google::protobuf::Any* Option::unsafe_arena_release_value() {
   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.value)
   
   ::google::protobuf::Any* temp = value_;
-  value_ = NULL;
+  value_ = nullptr;
   return temp;
 }
 inline ::google::protobuf::Any* Option::mutable_value() {
   
-  if (value_ == NULL) {
+  if (value_ == nullptr) {
     auto* p = CreateMaybeMessage<::google::protobuf::Any>(GetArenaNoVirtual());
     value_ = p;
   }
@@ -2369,11 +2369,11 @@ inline ::google::protobuf::Any* Option::mutable_value() {
 }
 inline void Option::set_allocated_value(::google::protobuf::Any* value) {
   ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
-  if (message_arena == NULL) {
+  if (message_arena == nullptr) {
     delete reinterpret_cast< ::google::protobuf::MessageLite*>(value_);
   }
   if (value) {
-    ::google::protobuf::Arena* submessage_arena = NULL;
+    ::google::protobuf::Arena* submessage_arena = nullptr;
     if (message_arena != submessage_arena) {
       value = ::google::protobuf::internal::GetOwnedMessage(
           message_arena, value, submessage_arena);

+ 45 - 45
src/google/protobuf/wrappers.pb.cc

@@ -329,7 +329,7 @@ const int DoubleValue::kValueFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 DoubleValue::DoubleValue()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.DoubleValue)
 }
@@ -342,7 +342,7 @@ DoubleValue::DoubleValue(::google::protobuf::Arena* arena)
 }
 DoubleValue::DoubleValue(const DoubleValue& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   value_ = from.value_;
   // @@protoc_insertion_point(copy_constructor:google.protobuf.DoubleValue)
@@ -358,7 +358,7 @@ DoubleValue::~DoubleValue() {
 }
 
 void DoubleValue::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
 }
 
 void DoubleValue::ArenaDtor(void* object) {
@@ -543,7 +543,7 @@ void DoubleValue::MergeFrom(const ::google::protobuf::Message& from) {
   const DoubleValue* source =
       ::google::protobuf::DynamicCastToGenerated<DoubleValue>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.DoubleValue)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -591,7 +591,7 @@ void DoubleValue::Swap(DoubleValue* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }
@@ -626,7 +626,7 @@ const int FloatValue::kValueFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 FloatValue::FloatValue()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.FloatValue)
 }
@@ -639,7 +639,7 @@ FloatValue::FloatValue(::google::protobuf::Arena* arena)
 }
 FloatValue::FloatValue(const FloatValue& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   value_ = from.value_;
   // @@protoc_insertion_point(copy_constructor:google.protobuf.FloatValue)
@@ -655,7 +655,7 @@ FloatValue::~FloatValue() {
 }
 
 void FloatValue::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
 }
 
 void FloatValue::ArenaDtor(void* object) {
@@ -840,7 +840,7 @@ void FloatValue::MergeFrom(const ::google::protobuf::Message& from) {
   const FloatValue* source =
       ::google::protobuf::DynamicCastToGenerated<FloatValue>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.FloatValue)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -888,7 +888,7 @@ void FloatValue::Swap(FloatValue* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }
@@ -923,7 +923,7 @@ const int Int64Value::kValueFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Int64Value::Int64Value()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Int64Value)
 }
@@ -936,7 +936,7 @@ Int64Value::Int64Value(::google::protobuf::Arena* arena)
 }
 Int64Value::Int64Value(const Int64Value& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   value_ = from.value_;
   // @@protoc_insertion_point(copy_constructor:google.protobuf.Int64Value)
@@ -952,7 +952,7 @@ Int64Value::~Int64Value() {
 }
 
 void Int64Value::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
 }
 
 void Int64Value::ArenaDtor(void* object) {
@@ -1140,7 +1140,7 @@ void Int64Value::MergeFrom(const ::google::protobuf::Message& from) {
   const Int64Value* source =
       ::google::protobuf::DynamicCastToGenerated<Int64Value>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Int64Value)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -1188,7 +1188,7 @@ void Int64Value::Swap(Int64Value* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }
@@ -1223,7 +1223,7 @@ const int UInt64Value::kValueFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 UInt64Value::UInt64Value()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.UInt64Value)
 }
@@ -1236,7 +1236,7 @@ UInt64Value::UInt64Value(::google::protobuf::Arena* arena)
 }
 UInt64Value::UInt64Value(const UInt64Value& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   value_ = from.value_;
   // @@protoc_insertion_point(copy_constructor:google.protobuf.UInt64Value)
@@ -1252,7 +1252,7 @@ UInt64Value::~UInt64Value() {
 }
 
 void UInt64Value::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
 }
 
 void UInt64Value::ArenaDtor(void* object) {
@@ -1440,7 +1440,7 @@ void UInt64Value::MergeFrom(const ::google::protobuf::Message& from) {
   const UInt64Value* source =
       ::google::protobuf::DynamicCastToGenerated<UInt64Value>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.UInt64Value)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -1488,7 +1488,7 @@ void UInt64Value::Swap(UInt64Value* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }
@@ -1523,7 +1523,7 @@ const int Int32Value::kValueFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Int32Value::Int32Value()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.Int32Value)
 }
@@ -1536,7 +1536,7 @@ Int32Value::Int32Value(::google::protobuf::Arena* arena)
 }
 Int32Value::Int32Value(const Int32Value& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   value_ = from.value_;
   // @@protoc_insertion_point(copy_constructor:google.protobuf.Int32Value)
@@ -1552,7 +1552,7 @@ Int32Value::~Int32Value() {
 }
 
 void Int32Value::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
 }
 
 void Int32Value::ArenaDtor(void* object) {
@@ -1740,7 +1740,7 @@ void Int32Value::MergeFrom(const ::google::protobuf::Message& from) {
   const Int32Value* source =
       ::google::protobuf::DynamicCastToGenerated<Int32Value>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Int32Value)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -1788,7 +1788,7 @@ void Int32Value::Swap(Int32Value* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }
@@ -1823,7 +1823,7 @@ const int UInt32Value::kValueFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 UInt32Value::UInt32Value()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.UInt32Value)
 }
@@ -1836,7 +1836,7 @@ UInt32Value::UInt32Value(::google::protobuf::Arena* arena)
 }
 UInt32Value::UInt32Value(const UInt32Value& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   value_ = from.value_;
   // @@protoc_insertion_point(copy_constructor:google.protobuf.UInt32Value)
@@ -1852,7 +1852,7 @@ UInt32Value::~UInt32Value() {
 }
 
 void UInt32Value::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
 }
 
 void UInt32Value::ArenaDtor(void* object) {
@@ -2040,7 +2040,7 @@ void UInt32Value::MergeFrom(const ::google::protobuf::Message& from) {
   const UInt32Value* source =
       ::google::protobuf::DynamicCastToGenerated<UInt32Value>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.UInt32Value)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -2088,7 +2088,7 @@ void UInt32Value::Swap(UInt32Value* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }
@@ -2123,7 +2123,7 @@ const int BoolValue::kValueFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 BoolValue::BoolValue()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.BoolValue)
 }
@@ -2136,7 +2136,7 @@ BoolValue::BoolValue(::google::protobuf::Arena* arena)
 }
 BoolValue::BoolValue(const BoolValue& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   value_ = from.value_;
   // @@protoc_insertion_point(copy_constructor:google.protobuf.BoolValue)
@@ -2152,7 +2152,7 @@ BoolValue::~BoolValue() {
 }
 
 void BoolValue::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
 }
 
 void BoolValue::ArenaDtor(void* object) {
@@ -2338,7 +2338,7 @@ void BoolValue::MergeFrom(const ::google::protobuf::Message& from) {
   const BoolValue* source =
       ::google::protobuf::DynamicCastToGenerated<BoolValue>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.BoolValue)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -2386,7 +2386,7 @@ void BoolValue::Swap(BoolValue* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }
@@ -2421,7 +2421,7 @@ const int StringValue::kValueFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 StringValue::StringValue()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.StringValue)
 }
@@ -2434,7 +2434,7 @@ StringValue::StringValue(::google::protobuf::Arena* arena)
 }
 StringValue::StringValue(const StringValue& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (from.value().size() > 0) {
@@ -2456,7 +2456,7 @@ StringValue::~StringValue() {
 }
 
 void StringValue::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
   value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 
@@ -2667,7 +2667,7 @@ void StringValue::MergeFrom(const ::google::protobuf::Message& from) {
   const StringValue* source =
       ::google::protobuf::DynamicCastToGenerated<StringValue>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.StringValue)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -2715,7 +2715,7 @@ void StringValue::Swap(StringValue* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }
@@ -2751,7 +2751,7 @@ const int BytesValue::kValueFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 BytesValue::BytesValue()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
   SharedCtor();
   // @@protoc_insertion_point(constructor:google.protobuf.BytesValue)
 }
@@ -2764,7 +2764,7 @@ BytesValue::BytesValue(::google::protobuf::Arena* arena)
 }
 BytesValue::BytesValue(const BytesValue& from)
   : ::google::protobuf::Message(),
-      _internal_metadata_(NULL) {
+      _internal_metadata_(nullptr) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (from.value().size() > 0) {
@@ -2786,7 +2786,7 @@ BytesValue::~BytesValue() {
 }
 
 void BytesValue::SharedDtor() {
-  GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
   value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 
@@ -2984,7 +2984,7 @@ void BytesValue::MergeFrom(const ::google::protobuf::Message& from) {
   const BytesValue* source =
       ::google::protobuf::DynamicCastToGenerated<BytesValue>(
           &from);
-  if (source == NULL) {
+  if (source == nullptr) {
   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.BytesValue)
     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   } else {
@@ -3032,7 +3032,7 @@ void BytesValue::Swap(BytesValue* other) {
     temp->MergeFrom(*other);
     other->CopyFrom(*this);
     InternalSwap(temp);
-    if (GetArenaNoVirtual() == NULL) {
+    if (GetArenaNoVirtual() == nullptr) {
       delete temp;
     }
   }

+ 19 - 19
src/google/protobuf/wrappers.pb.h

@@ -147,7 +147,7 @@ class PROTOBUF_EXPORT DoubleValue : public ::google::protobuf::Message /* @@prot
   // implements Message ----------------------------------------------
 
   inline DoubleValue* New() const final {
-    return CreateMaybeMessage<DoubleValue>(NULL);
+    return CreateMaybeMessage<DoubleValue>(nullptr);
   }
 
   DoubleValue* New(::google::protobuf::Arena* arena) const final {
@@ -273,7 +273,7 @@ class PROTOBUF_EXPORT FloatValue : public ::google::protobuf::Message /* @@proto
   // implements Message ----------------------------------------------
 
   inline FloatValue* New() const final {
-    return CreateMaybeMessage<FloatValue>(NULL);
+    return CreateMaybeMessage<FloatValue>(nullptr);
   }
 
   FloatValue* New(::google::protobuf::Arena* arena) const final {
@@ -399,7 +399,7 @@ class PROTOBUF_EXPORT Int64Value : public ::google::protobuf::Message /* @@proto
   // implements Message ----------------------------------------------
 
   inline Int64Value* New() const final {
-    return CreateMaybeMessage<Int64Value>(NULL);
+    return CreateMaybeMessage<Int64Value>(nullptr);
   }
 
   Int64Value* New(::google::protobuf::Arena* arena) const final {
@@ -525,7 +525,7 @@ class PROTOBUF_EXPORT UInt64Value : public ::google::protobuf::Message /* @@prot
   // implements Message ----------------------------------------------
 
   inline UInt64Value* New() const final {
-    return CreateMaybeMessage<UInt64Value>(NULL);
+    return CreateMaybeMessage<UInt64Value>(nullptr);
   }
 
   UInt64Value* New(::google::protobuf::Arena* arena) const final {
@@ -651,7 +651,7 @@ class PROTOBUF_EXPORT Int32Value : public ::google::protobuf::Message /* @@proto
   // implements Message ----------------------------------------------
 
   inline Int32Value* New() const final {
-    return CreateMaybeMessage<Int32Value>(NULL);
+    return CreateMaybeMessage<Int32Value>(nullptr);
   }
 
   Int32Value* New(::google::protobuf::Arena* arena) const final {
@@ -777,7 +777,7 @@ class PROTOBUF_EXPORT UInt32Value : public ::google::protobuf::Message /* @@prot
   // implements Message ----------------------------------------------
 
   inline UInt32Value* New() const final {
-    return CreateMaybeMessage<UInt32Value>(NULL);
+    return CreateMaybeMessage<UInt32Value>(nullptr);
   }
 
   UInt32Value* New(::google::protobuf::Arena* arena) const final {
@@ -903,7 +903,7 @@ class PROTOBUF_EXPORT BoolValue : public ::google::protobuf::Message /* @@protoc
   // implements Message ----------------------------------------------
 
   inline BoolValue* New() const final {
-    return CreateMaybeMessage<BoolValue>(NULL);
+    return CreateMaybeMessage<BoolValue>(nullptr);
   }
 
   BoolValue* New(::google::protobuf::Arena* arena) const final {
@@ -1029,7 +1029,7 @@ class PROTOBUF_EXPORT StringValue : public ::google::protobuf::Message /* @@prot
   // implements Message ----------------------------------------------
 
   inline StringValue* New() const final {
-    return CreateMaybeMessage<StringValue>(NULL);
+    return CreateMaybeMessage<StringValue>(nullptr);
   }
 
   StringValue* New(::google::protobuf::Arena* arena) const final {
@@ -1172,7 +1172,7 @@ class PROTOBUF_EXPORT BytesValue : public ::google::protobuf::Message /* @@proto
   // implements Message ----------------------------------------------
 
   inline BytesValue* New() const final {
-    return CreateMaybeMessage<BytesValue>(NULL);
+    return CreateMaybeMessage<BytesValue>(nullptr);
   }
 
   BytesValue* New(::google::protobuf::Arena* arena) const final {
@@ -1418,7 +1418,7 @@ inline void StringValue::set_value(::std::string&& value) {
 }
 #endif
 inline void StringValue::set_value(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
               GetArenaNoVirtual());
@@ -1442,7 +1442,7 @@ inline ::std::string* StringValue::release_value() {
   return value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
 }
 inline void StringValue::set_allocated_value(::std::string* value) {
-  if (value != NULL) {
+  if (value != nullptr) {
     
   } else {
     
@@ -1453,15 +1453,15 @@ inline void StringValue::set_allocated_value(::std::string* value) {
 }
 inline ::std::string* StringValue::unsafe_arena_release_value() {
   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.StringValue.value)
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
   
   return value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
       GetArenaNoVirtual());
 }
 inline void StringValue::unsafe_arena_set_allocated_value(
     ::std::string* value) {
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-  if (value != NULL) {
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
+  if (value != nullptr) {
     
   } else {
     
@@ -1497,7 +1497,7 @@ inline void BytesValue::set_value(::std::string&& value) {
 }
 #endif
 inline void BytesValue::set_value(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
+  GOOGLE_DCHECK(value != nullptr);
   
   value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
               GetArenaNoVirtual());
@@ -1521,7 +1521,7 @@ inline ::std::string* BytesValue::release_value() {
   return value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
 }
 inline void BytesValue::set_allocated_value(::std::string* value) {
-  if (value != NULL) {
+  if (value != nullptr) {
     
   } else {
     
@@ -1532,15 +1532,15 @@ inline void BytesValue::set_allocated_value(::std::string* value) {
 }
 inline ::std::string* BytesValue::unsafe_arena_release_value() {
   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.BytesValue.value)
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
   
   return value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
       GetArenaNoVirtual());
 }
 inline void BytesValue::unsafe_arena_set_allocated_value(
     ::std::string* value) {
-  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-  if (value != NULL) {
+  GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr);
+  if (value != nullptr) {
     
   } else {
     

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff