diff options
Diffstat (limited to 'src/google/protobuf/empty.pb.cc')
-rw-r--r-- | src/google/protobuf/empty.pb.cc | 54 |
1 files changed, 32 insertions, 22 deletions
diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc index 71195056..6aec108f 100644 --- a/src/google/protobuf/empty.pb.cc +++ b/src/google/protobuf/empty.pb.cc @@ -32,28 +32,27 @@ namespace { } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { NULL, NULL, 0, -1, -1, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Empty, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(Empty)}, }; @@ -83,12 +82,6 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _Empty_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -102,7 +95,7 @@ void InitDefaults() { } void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\033google/protobuf/empty.proto\022\017google.pr" "otobuf\"\007\n\005EmptyBv\n\023com.google.protobufB\n" "EmptyProtoP\001Z\'github.com/golang/protobuf" @@ -113,14 +106,13 @@ void AddDescriptorsImpl() { descriptor, 183); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "google/protobuf/empty.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -146,9 +138,7 @@ Empty::Empty() Empty::Empty(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_google_2fprotobuf_2fempty_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Empty) @@ -172,6 +162,7 @@ Empty::~Empty() { void Empty::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -205,6 +196,11 @@ Empty* Empty::New(::google::protobuf::Arena* arena) const { void Empty::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.Empty) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _internal_metadata_.Clear(); } bool Empty::MergePartialFromCodedStream( @@ -217,12 +213,11 @@ bool Empty::MergePartialFromCodedStream( tag = p.first; if (!p.second) goto handle_unusual; handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); } success: // @@protoc_insertion_point(parse_success:google.protobuf.Empty) @@ -239,6 +234,10 @@ void Empty::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:google.protobuf.Empty) } @@ -248,6 +247,10 @@ void Empty::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Empty) return target; } @@ -256,6 +259,11 @@ size_t Empty::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Empty) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = cached_size; @@ -325,7 +333,9 @@ void Empty::UnsafeArenaSwap(Empty* other) { InternalSwap(other); } void Empty::InternalSwap(Empty* other) { - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Empty::GetMetadata() const { |