From 947d4c37cfa923be629b8693b610403092edfc49 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Tue, 6 Jun 2023 23:50:18 +0000 Subject: [PATCH] Auto-generate files after cl/538323872 --- src/google/protobuf/field_mask.pb.cc | 20 +++++++++------- src/google/protobuf/field_mask.pb.h | 35 +++++++++++++++------------- src/google/protobuf/type.pb.cc | 20 +++++++++------- src/google/protobuf/type.pb.h | 35 +++++++++++++++------------- 4 files changed, 60 insertions(+), 50 deletions(-) diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc index 271a1d4682..a7870560e5 100644 --- a/src/google/protobuf/field_mask.pb.cc +++ b/src/google/protobuf/field_mask.pb.cc @@ -149,7 +149,7 @@ FieldMask::~FieldMask() { } inline void FieldMask::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.paths_.~RepeatedPtrField(); + _internal_mutable_paths()->~RepeatedPtrField(); } void FieldMask::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); @@ -161,7 +161,7 @@ PROTOBUF_NOINLINE void FieldMask::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.paths_.Clear(); + _internal_mutable_paths()->Clear(); _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } @@ -213,8 +213,8 @@ const ::_pbi::TcParseTable<0, 1, 0, 39, 2> FieldMask::_table_ = { (void)cached_has_bits; // repeated string paths = 1; - for (int i = 0, n = this->_impl_.paths_.size(); i < n; ++i) { - const auto& s = this->_impl_.paths_.Get(i); + for (int i = 0, n = this->_internal_paths_size(); i < n; ++i) { + const auto& s = this->_internal_paths().Get(i); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.FieldMask.paths"); target = stream->WriteString(1, s, target); @@ -238,9 +238,10 @@ const ::_pbi::TcParseTable<0, 1, 0, 39, 2> FieldMask::_table_ = { (void) cached_has_bits; // repeated string paths = 1; - total_size += 1 * ::google::protobuf::internal::FromIntSize(_impl_.paths_.size()); - for (int i = 0, n = _impl_.paths_.size(); i < n; ++i) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize(_impl_.paths_.Get(i)); + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_paths().size()); + for (int i = 0, n = _internal_paths().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + _internal_paths().Get(i)); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -260,7 +261,7 @@ void FieldMask::MergeImpl(::google::protobuf::Message& to_msg, const ::google::p ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.paths_.MergeFrom(from._impl_.paths_); + _this->_internal_mutable_paths()->MergeFrom(from._internal_paths()); _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } @@ -278,7 +279,8 @@ PROTOBUF_NOINLINE bool FieldMask::IsInitialized() const { void FieldMask::InternalSwap(FieldMask* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.paths_.InternalSwap(&other->_impl_.paths_); + _internal_mutable_paths()->InternalSwap( + other->_internal_mutable_paths()); } ::google::protobuf::Metadata FieldMask::GetMetadata() const { diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index 52f86e2385..65589ebc63 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h @@ -270,72 +270,75 @@ inline int FieldMask::paths_size() const { return _internal_paths_size(); } inline void FieldMask::clear_paths() { - _impl_.paths_.Clear(); + _internal_mutable_paths()->Clear(); } inline std::string* FieldMask::add_paths() { - std::string* _s = _impl_.paths_.Add(); + std::string* _s = _internal_mutable_paths()->Add(); // @@protoc_insertion_point(field_add_mutable:google.protobuf.FieldMask.paths) return _s; } inline const std::string& FieldMask::paths(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FieldMask.paths) - return _impl_.paths_.Get(index); + return _internal_paths().Get(index); } inline std::string* FieldMask::mutable_paths(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FieldMask.paths) - return _impl_.paths_.Mutable(index); + return _internal_mutable_paths()->Mutable(index); } inline void FieldMask::set_paths(int index, const std::string& value) { - _impl_.paths_.Mutable(index)->assign(value); + _internal_mutable_paths()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths) } inline void FieldMask::set_paths(int index, std::string&& value) { - _impl_.paths_.Mutable(index)->assign(std::move(value)); + _internal_mutable_paths()->Mutable(index)->assign(std::move(value)); // @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths) } inline void FieldMask::set_paths(int index, const char* value) { ABSL_DCHECK(value != nullptr); - _impl_.paths_.Mutable(index)->assign(value); + _internal_mutable_paths()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldMask.paths) } inline void FieldMask::set_paths(int index, const char* value, std::size_t size) { - _impl_.paths_.Mutable(index)->assign(reinterpret_cast(value), size); + _internal_mutable_paths()->Mutable(index)->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldMask.paths) } inline void FieldMask::set_paths(int index, absl::string_view value) { - _impl_.paths_.Mutable(index)->assign(value.data(), value.size()); + _internal_mutable_paths()->Mutable(index)->assign(value.data(), + value.size()); // @@protoc_insertion_point(field_set_string_piece:google.protobuf.FieldMask.paths) } inline void FieldMask::add_paths(const std::string& value) { - _impl_.paths_.Add()->assign(value); + _internal_mutable_paths()->Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths) } inline void FieldMask::add_paths(std::string&& value) { - _impl_.paths_.Add(std::move(value)); + _internal_mutable_paths()->Add(std::move(value)); // @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths) } inline void FieldMask::add_paths(const char* value) { ABSL_DCHECK(value != nullptr); - _impl_.paths_.Add()->assign(value); + _internal_mutable_paths()->Add()->assign(value); // @@protoc_insertion_point(field_add_char:google.protobuf.FieldMask.paths) } inline void FieldMask::add_paths(const char* value, std::size_t size) { - _impl_.paths_.Add()->assign(reinterpret_cast(value), size); + _internal_mutable_paths()->Add()->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:google.protobuf.FieldMask.paths) } inline void FieldMask::add_paths(absl::string_view value) { - _impl_.paths_.Add()->assign(value.data(), value.size()); + _internal_mutable_paths()->Add()->assign(value.data(), value.size()); // @@protoc_insertion_point(field_add_string_piece:google.protobuf.FieldMask.paths) } inline const ::google::protobuf::RepeatedPtrField& FieldMask::paths() const { // @@protoc_insertion_point(field_list:google.protobuf.FieldMask.paths) - return _impl_.paths_; + return _internal_paths(); } inline ::google::protobuf::RepeatedPtrField* FieldMask::mutable_paths() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldMask.paths) - return &_impl_.paths_; + return _internal_mutable_paths(); } inline const ::google::protobuf::RepeatedPtrField& FieldMask::_internal_paths() const { diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc index 150ea69059..10cf16e1bd 100644 --- a/src/google/protobuf/type.pb.cc +++ b/src/google/protobuf/type.pb.cc @@ -546,7 +546,7 @@ Type::~Type() { inline void Type::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); _impl_.fields_.~RepeatedPtrField(); - _impl_.oneofs_.~RepeatedPtrField(); + _internal_mutable_oneofs()->~RepeatedPtrField(); _impl_.options_.~RepeatedPtrField(); _impl_.name_.Destroy(); _impl_.edition_.Destroy(); @@ -563,7 +563,7 @@ PROTOBUF_NOINLINE void Type::Clear() { (void) cached_has_bits; _internal_mutable_fields()->Clear(); - _impl_.oneofs_.Clear(); + _internal_mutable_oneofs()->Clear(); _internal_mutable_options()->Clear(); _impl_.name_.ClearToEmpty(); _impl_.edition_.ClearToEmpty(); @@ -682,8 +682,8 @@ const ::_pbi::TcParseTable<3, 7, 3, 46, 2> Type::_table_ = { } // repeated string oneofs = 3; - for (int i = 0, n = this->_impl_.oneofs_.size(); i < n; ++i) { - const auto& s = this->_impl_.oneofs_.Get(i); + for (int i = 0, n = this->_internal_oneofs_size(); i < n; ++i) { + const auto& s = this->_internal_oneofs().Get(i); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.oneofs"); target = stream->WriteString(3, s, target); @@ -744,9 +744,10 @@ const ::_pbi::TcParseTable<3, 7, 3, 46, 2> Type::_table_ = { ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } // repeated string oneofs = 3; - total_size += 1 * ::google::protobuf::internal::FromIntSize(_impl_.oneofs_.size()); - for (int i = 0, n = _impl_.oneofs_.size(); i < n; ++i) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize(_impl_.oneofs_.Get(i)); + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_oneofs().size()); + for (int i = 0, n = _internal_oneofs().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + _internal_oneofs().Get(i)); } // repeated .google.protobuf.Option options = 4; total_size += 1UL * this->_internal_options_size(); @@ -799,7 +800,7 @@ void Type::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protob (void) cached_has_bits; _this->_internal_mutable_fields()->MergeFrom(from._internal_fields()); - _this->_impl_.oneofs_.MergeFrom(from._impl_.oneofs_); + _this->_internal_mutable_oneofs()->MergeFrom(from._internal_oneofs()); _this->_internal_mutable_options()->MergeFrom(from._internal_options()); if (!from._internal_name().empty()) { _this->_internal_set_name(from._internal_name()); @@ -835,7 +836,8 @@ void Type::InternalSwap(Type* other) { _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _internal_mutable_fields()->InternalSwap(other->_internal_mutable_fields()); - _impl_.oneofs_.InternalSwap(&other->_impl_.oneofs_); + _internal_mutable_oneofs()->InternalSwap( + other->_internal_mutable_oneofs()); _internal_mutable_options()->InternalSwap(other->_internal_mutable_options()); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, lhs_arena, &other->_impl_.name_, rhs_arena); diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index ff09d5d416..d2cd1a2cf0 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -1585,72 +1585,75 @@ inline int Type::oneofs_size() const { return _internal_oneofs_size(); } inline void Type::clear_oneofs() { - _impl_.oneofs_.Clear(); + _internal_mutable_oneofs()->Clear(); } inline std::string* Type::add_oneofs() { - std::string* _s = _impl_.oneofs_.Add(); + std::string* _s = _internal_mutable_oneofs()->Add(); // @@protoc_insertion_point(field_add_mutable:google.protobuf.Type.oneofs) return _s; } inline const std::string& Type::oneofs(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Type.oneofs) - return _impl_.oneofs_.Get(index); + return _internal_oneofs().Get(index); } inline std::string* Type::mutable_oneofs(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Type.oneofs) - return _impl_.oneofs_.Mutable(index); + return _internal_mutable_oneofs()->Mutable(index); } inline void Type::set_oneofs(int index, const std::string& value) { - _impl_.oneofs_.Mutable(index)->assign(value); + _internal_mutable_oneofs()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs) } inline void Type::set_oneofs(int index, std::string&& value) { - _impl_.oneofs_.Mutable(index)->assign(std::move(value)); + _internal_mutable_oneofs()->Mutable(index)->assign(std::move(value)); // @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs) } inline void Type::set_oneofs(int index, const char* value) { ABSL_DCHECK(value != nullptr); - _impl_.oneofs_.Mutable(index)->assign(value); + _internal_mutable_oneofs()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:google.protobuf.Type.oneofs) } inline void Type::set_oneofs(int index, const char* value, std::size_t size) { - _impl_.oneofs_.Mutable(index)->assign(reinterpret_cast(value), size); + _internal_mutable_oneofs()->Mutable(index)->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.oneofs) } inline void Type::set_oneofs(int index, absl::string_view value) { - _impl_.oneofs_.Mutable(index)->assign(value.data(), value.size()); + _internal_mutable_oneofs()->Mutable(index)->assign(value.data(), + value.size()); // @@protoc_insertion_point(field_set_string_piece:google.protobuf.Type.oneofs) } inline void Type::add_oneofs(const std::string& value) { - _impl_.oneofs_.Add()->assign(value); + _internal_mutable_oneofs()->Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs) } inline void Type::add_oneofs(std::string&& value) { - _impl_.oneofs_.Add(std::move(value)); + _internal_mutable_oneofs()->Add(std::move(value)); // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs) } inline void Type::add_oneofs(const char* value) { ABSL_DCHECK(value != nullptr); - _impl_.oneofs_.Add()->assign(value); + _internal_mutable_oneofs()->Add()->assign(value); // @@protoc_insertion_point(field_add_char:google.protobuf.Type.oneofs) } inline void Type::add_oneofs(const char* value, std::size_t size) { - _impl_.oneofs_.Add()->assign(reinterpret_cast(value), size); + _internal_mutable_oneofs()->Add()->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:google.protobuf.Type.oneofs) } inline void Type::add_oneofs(absl::string_view value) { - _impl_.oneofs_.Add()->assign(value.data(), value.size()); + _internal_mutable_oneofs()->Add()->assign(value.data(), value.size()); // @@protoc_insertion_point(field_add_string_piece:google.protobuf.Type.oneofs) } inline const ::google::protobuf::RepeatedPtrField& Type::oneofs() const { // @@protoc_insertion_point(field_list:google.protobuf.Type.oneofs) - return _impl_.oneofs_; + return _internal_oneofs(); } inline ::google::protobuf::RepeatedPtrField* Type::mutable_oneofs() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.oneofs) - return &_impl_.oneofs_; + return _internal_mutable_oneofs(); } inline const ::google::protobuf::RepeatedPtrField& Type::_internal_oneofs() const {