diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc index a7870560e5..271a1d4682 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); - _internal_mutable_paths()->~RepeatedPtrField(); + _impl_.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; - _internal_mutable_paths()->Clear(); + _impl_.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->_internal_paths_size(); i < n; ++i) { - const auto& s = this->_internal_paths().Get(i); + for (int i = 0, n = this->_impl_.paths_.size(); i < n; ++i) { + const auto& s = this->_impl_.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,10 +238,9 @@ 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(_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)); + 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)); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -261,7 +260,7 @@ void FieldMask::MergeImpl(::google::protobuf::Message& to_msg, const ::google::p ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_internal_mutable_paths()->MergeFrom(from._internal_paths()); + _this->_impl_.paths_.MergeFrom(from._impl_.paths_); _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } @@ -279,8 +278,7 @@ PROTOBUF_NOINLINE bool FieldMask::IsInitialized() const { void FieldMask::InternalSwap(FieldMask* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _internal_mutable_paths()->InternalSwap( - other->_internal_mutable_paths()); + _impl_.paths_.InternalSwap(&other->_impl_.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 65589ebc63..52f86e2385 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h @@ -270,75 +270,72 @@ inline int FieldMask::paths_size() const { return _internal_paths_size(); } inline void FieldMask::clear_paths() { - _internal_mutable_paths()->Clear(); + _impl_.paths_.Clear(); } inline std::string* FieldMask::add_paths() { - std::string* _s = _internal_mutable_paths()->Add(); + std::string* _s = _impl_.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 _internal_paths().Get(index); + return _impl_.paths_.Get(index); } inline std::string* FieldMask::mutable_paths(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FieldMask.paths) - return _internal_mutable_paths()->Mutable(index); + return _impl_.paths_.Mutable(index); } inline void FieldMask::set_paths(int index, const std::string& value) { - _internal_mutable_paths()->Mutable(index)->assign(value); + _impl_.paths_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths) } inline void FieldMask::set_paths(int index, std::string&& value) { - _internal_mutable_paths()->Mutable(index)->assign(std::move(value)); + _impl_.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); - _internal_mutable_paths()->Mutable(index)->assign(value); + _impl_.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) { - _internal_mutable_paths()->Mutable(index)->assign( - reinterpret_cast(value), size); + _impl_.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) { - _internal_mutable_paths()->Mutable(index)->assign(value.data(), - value.size()); + _impl_.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) { - _internal_mutable_paths()->Add()->assign(value); + _impl_.paths_.Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths) } inline void FieldMask::add_paths(std::string&& value) { - _internal_mutable_paths()->Add(std::move(value)); + _impl_.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); - _internal_mutable_paths()->Add()->assign(value); + _impl_.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) { - _internal_mutable_paths()->Add()->assign( - reinterpret_cast(value), size); + _impl_.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) { - _internal_mutable_paths()->Add()->assign(value.data(), value.size()); + _impl_.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 _internal_paths(); + return _impl_.paths_; } inline ::google::protobuf::RepeatedPtrField* FieldMask::mutable_paths() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldMask.paths) - return _internal_mutable_paths(); + return &_impl_.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 10cf16e1bd..150ea69059 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(); - _internal_mutable_oneofs()->~RepeatedPtrField(); + _impl_.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(); - _internal_mutable_oneofs()->Clear(); + _impl_.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->_internal_oneofs_size(); i < n; ++i) { - const auto& s = this->_internal_oneofs().Get(i); + for (int i = 0, n = this->_impl_.oneofs_.size(); i < n; ++i) { + const auto& s = this->_impl_.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,10 +744,9 @@ 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(_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)); + 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)); } // repeated .google.protobuf.Option options = 4; total_size += 1UL * this->_internal_options_size(); @@ -800,7 +799,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->_internal_mutable_oneofs()->MergeFrom(from._internal_oneofs()); + _this->_impl_.oneofs_.MergeFrom(from._impl_.oneofs_); _this->_internal_mutable_options()->MergeFrom(from._internal_options()); if (!from._internal_name().empty()) { _this->_internal_set_name(from._internal_name()); @@ -836,8 +835,7 @@ 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()); - _internal_mutable_oneofs()->InternalSwap( - other->_internal_mutable_oneofs()); + _impl_.oneofs_.InternalSwap(&other->_impl_.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 d2cd1a2cf0..ff09d5d416 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -1585,75 +1585,72 @@ inline int Type::oneofs_size() const { return _internal_oneofs_size(); } inline void Type::clear_oneofs() { - _internal_mutable_oneofs()->Clear(); + _impl_.oneofs_.Clear(); } inline std::string* Type::add_oneofs() { - std::string* _s = _internal_mutable_oneofs()->Add(); + std::string* _s = _impl_.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 _internal_oneofs().Get(index); + return _impl_.oneofs_.Get(index); } inline std::string* Type::mutable_oneofs(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Type.oneofs) - return _internal_mutable_oneofs()->Mutable(index); + return _impl_.oneofs_.Mutable(index); } inline void Type::set_oneofs(int index, const std::string& value) { - _internal_mutable_oneofs()->Mutable(index)->assign(value); + _impl_.oneofs_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs) } inline void Type::set_oneofs(int index, std::string&& value) { - _internal_mutable_oneofs()->Mutable(index)->assign(std::move(value)); + _impl_.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); - _internal_mutable_oneofs()->Mutable(index)->assign(value); + _impl_.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) { - _internal_mutable_oneofs()->Mutable(index)->assign( - reinterpret_cast(value), size); + _impl_.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) { - _internal_mutable_oneofs()->Mutable(index)->assign(value.data(), - value.size()); + _impl_.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) { - _internal_mutable_oneofs()->Add()->assign(value); + _impl_.oneofs_.Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs) } inline void Type::add_oneofs(std::string&& value) { - _internal_mutable_oneofs()->Add(std::move(value)); + _impl_.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); - _internal_mutable_oneofs()->Add()->assign(value); + _impl_.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) { - _internal_mutable_oneofs()->Add()->assign( - reinterpret_cast(value), size); + _impl_.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) { - _internal_mutable_oneofs()->Add()->assign(value.data(), value.size()); + _impl_.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 _internal_oneofs(); + return _impl_.oneofs_; } inline ::google::protobuf::RepeatedPtrField* Type::mutable_oneofs() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.oneofs) - return _internal_mutable_oneofs(); + return &_impl_.oneofs_; } inline const ::google::protobuf::RepeatedPtrField& Type::_internal_oneofs() const {