From 460e7dd7c47b5a3fc290008317c044fac741916a Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Thu, 22 Sep 2016 17:46:22 -0700 Subject: Fix Visual Studio compile issues. Change-Id: I6a5078b6bcdf4637e11c1cb9da1f74298e6fc26e --- src/google/protobuf/type.pb.h | 50 ++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 20 deletions(-) (limited to 'src/google/protobuf/type.pb.h') diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index c1089fb3..1b6d3410 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -150,9 +150,7 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i static const ::google::protobuf::Descriptor* descriptor(); static const Type& default_instance(); - static inline const Type* internal_default_instance() { - return &default_instance_.get(); - } + static const Type* internal_default_instance(); void UnsafeArenaSwap(Type* other); void Swap(Type* other); @@ -302,8 +300,9 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto(); void InitAsDefaultInstance(); - static ::google::protobuf::internal::ExplicitlyConstructed default_instance_; }; +extern ::google::protobuf::internal::ExplicitlyConstructed Type_default_instance_; + // ------------------------------------------------------------------- class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Field) */ { @@ -325,9 +324,7 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ static const ::google::protobuf::Descriptor* descriptor(); static const Field& default_instance(); - static inline const Field* internal_default_instance() { - return &default_instance_.get(); - } + static const Field* internal_default_instance(); void UnsafeArenaSwap(Field* other); void Swap(Field* other); @@ -593,8 +590,9 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_ friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto(); void InitAsDefaultInstance(); - static ::google::protobuf::internal::ExplicitlyConstructed default_instance_; }; +extern ::google::protobuf::internal::ExplicitlyConstructed Field_default_instance_; + // ------------------------------------------------------------------- class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Enum) */ { @@ -616,9 +614,7 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i static const ::google::protobuf::Descriptor* descriptor(); static const Enum& default_instance(); - static inline const Enum* internal_default_instance() { - return &default_instance_.get(); - } + static const Enum* internal_default_instance(); void UnsafeArenaSwap(Enum* other); void Swap(Enum* other); @@ -751,8 +747,9 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto(); void InitAsDefaultInstance(); - static ::google::protobuf::internal::ExplicitlyConstructed default_instance_; }; +extern ::google::protobuf::internal::ExplicitlyConstructed Enum_default_instance_; + // ------------------------------------------------------------------- class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValue) */ { @@ -774,9 +771,7 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro static const ::google::protobuf::Descriptor* descriptor(); static const EnumValue& default_instance(); - static inline const EnumValue* internal_default_instance() { - return &default_instance_.get(); - } + static const EnumValue* internal_default_instance(); void UnsafeArenaSwap(EnumValue* other); void Swap(EnumValue* other); @@ -879,8 +874,9 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto(); void InitAsDefaultInstance(); - static ::google::protobuf::internal::ExplicitlyConstructed default_instance_; }; +extern ::google::protobuf::internal::ExplicitlyConstructed EnumValue_default_instance_; + // ------------------------------------------------------------------- class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Option) */ { @@ -902,9 +898,7 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc static const ::google::protobuf::Descriptor* descriptor(); static const Option& default_instance(); - static inline const Option* internal_default_instance() { - return &default_instance_.get(); - } + static const Option* internal_default_instance(); void UnsafeArenaSwap(Option* other); void Swap(Option* other); @@ -1004,8 +998,9 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto(); void InitAsDefaultInstance(); - static ::google::protobuf::internal::ExplicitlyConstructed