diff options
Diffstat (limited to 'src/google/protobuf/timestamp.pb.cc')
-rw-r--r-- | src/google/protobuf/timestamp.pb.cc | 70 |
1 files changed, 43 insertions, 27 deletions
diff --git a/src/google/protobuf/timestamp.pb.cc b/src/google/protobuf/timestamp.pb.cc index 7c9d396e..44ddc749 100644 --- a/src/google/protobuf/timestamp.pb.cc +++ b/src/google/protobuf/timestamp.pb.cc @@ -19,7 +19,10 @@ namespace google { namespace protobuf { -class TimestampDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Timestamp> { +class TimestampDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed<Timestamp> + _instance; } _Timestamp_default_instance_; namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto { @@ -32,20 +35,20 @@ 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[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, 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(Timestamp, _internal_metadata_), ~0u, // no _extensions_ @@ -54,8 +57,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Timestamp, seconds_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Timestamp, nanos_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(Timestamp)}, }; @@ -85,18 +87,13 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _Timestamp_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); - _Timestamp_default_instance_.DefaultConstruct(); -} + _Timestamp_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_Timestamp_default_instance_);} void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); @@ -105,7 +102,7 @@ void InitDefaults() { namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\037google/protobuf/timestamp.proto\022\017googl" "e.protobuf\"+\n\tTimestamp\022\017\n\007seconds\030\001 \001(\003" "\022\r\n\005nanos\030\002 \001(\005B~\n\023com.google.protobufB\016" @@ -117,7 +114,6 @@ void AddDescriptorsImpl() { descriptor, 231); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "google/protobuf/timestamp.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } } // anonymous namespace @@ -183,6 +179,7 @@ Timestamp::~Timestamp() { void Timestamp::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -216,9 +213,14 @@ Timestamp* Timestamp::New(::google::protobuf::Arena* arena) const { void Timestamp::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.Timestamp) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + ::memset(&seconds_, 0, static_cast<size_t>( reinterpret_cast<char*>(&nanos_) - reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_)); + _internal_metadata_.Clear(); } bool Timestamp::MergePartialFromCodedStream( @@ -234,7 +236,7 @@ bool Timestamp::MergePartialFromCodedStream( // int64 seconds = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( @@ -248,7 +250,7 @@ bool Timestamp::MergePartialFromCodedStream( // int32 nanos = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( @@ -261,12 +263,11 @@ bool Timestamp::MergePartialFromCodedStream( default: { 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())); break; } } @@ -296,6 +297,10 @@ void Timestamp::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->nanos(), output); } + 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.Timestamp) } @@ -316,6 +321,10 @@ void Timestamp::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->nanos(), target); } + 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.Timestamp) return target; } @@ -324,6 +333,11 @@ size_t Timestamp::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Timestamp) 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())); + } // int64 seconds = 1; if (this->seconds() != 0) { total_size += 1 + @@ -413,9 +427,11 @@ void Timestamp::UnsafeArenaSwap(Timestamp* other) { InternalSwap(other); } void Timestamp::InternalSwap(Timestamp* other) { - std::swap(seconds_, other->seconds_); - std::swap(nanos_, other->nanos_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(seconds_, other->seconds_); + swap(nanos_, other->nanos_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Timestamp::GetMetadata() const { |