From 4cbbf33b773fb95aa339ee50517fd375f5120ffe Mon Sep 17 00:00:00 2001 From: Jisi Liu Date: Thu, 3 Aug 2017 11:13:25 -0700 Subject: Fix invalid offsetof warning. Use composition instead of inheritance for oneof default. --- src/google/protobuf/source_context.pb.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/google/protobuf/source_context.pb.cc') diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc index effe0a43..5d990772 100644 --- a/src/google/protobuf/source_context.pb.cc +++ b/src/google/protobuf/source_context.pb.cc @@ -19,7 +19,10 @@ namespace google { namespace protobuf { -class SourceContextDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class SourceContextDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _SourceContext_default_instance_; namespace protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto { @@ -87,7 +90,7 @@ void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); - _SourceContext_default_instance_.DefaultConstruct(); + _SourceContext_default_instance_._instance.DefaultConstruct(); ::google::protobuf::internal::OnShutdownDestroyMessage( &_SourceContext_default_instance_);} -- cgit v1.2.3