|
|
@ -248,7 +248,8 @@ Struct::Struct(const Struct& from) |
|
|
|
inline void Struct::SharedCtor(::_pb::Arena* arena) { |
|
|
|
inline void Struct::SharedCtor(::_pb::Arena* arena) { |
|
|
|
(void)arena; |
|
|
|
(void)arena; |
|
|
|
new (&_impl_) Impl_{ |
|
|
|
new (&_impl_) Impl_{ |
|
|
|
/*decltype(_impl_.fields_)*/{::_pbi::ArenaInitialized(), arena} |
|
|
|
/* decltype(_impl_.fields_) */ { ::PROTOBUF_NAMESPACE_ID::internal::ArenaInitialized(), arena } |
|
|
|
|
|
|
|
|
|
|
|
, /*decltype(_impl_._cached_size_)*/{} |
|
|
|
, /*decltype(_impl_._cached_size_)*/{} |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
@ -331,26 +332,26 @@ failure: |
|
|
|
(void) cached_has_bits; |
|
|
|
(void) cached_has_bits; |
|
|
|
|
|
|
|
|
|
|
|
// map<string, .google.protobuf.Value> fields = 1;
|
|
|
|
// map<string, .google.protobuf.Value> fields = 1;
|
|
|
|
if (!this->_internal_fields().empty()) { |
|
|
|
if (!_internal_fields().empty()) { |
|
|
|
using MapType = ::_pb::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>; |
|
|
|
using MapType = ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>; |
|
|
|
using WireHelper = Struct_FieldsEntry_DoNotUse::Funcs; |
|
|
|
using WireHelper = Struct_FieldsEntry_DoNotUse::Funcs; |
|
|
|
const auto& map_field = this->_internal_fields(); |
|
|
|
const auto& field = _internal_fields(); |
|
|
|
auto check_utf8 = [](const MapType::value_type& entry) { |
|
|
|
|
|
|
|
(void)entry; |
|
|
|
if (stream->IsSerializationDeterministic() && field.size() > 1) { |
|
|
|
|
|
|
|
for (const auto& entry : ::PROTOBUF_NAMESPACE_ID::internal::MapSorterPtr<MapType>(field)) { |
|
|
|
|
|
|
|
target = WireHelper::InternalSerialize( |
|
|
|
|
|
|
|
1, entry.first, entry.second, target, stream); |
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
|
|
|
entry.first.data(), static_cast<int>(entry.first.length()), |
|
|
|
entry.first.data(), static_cast<int>(entry.first.length()), |
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Struct.fields"); |
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Struct.fields"); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (stream->IsSerializationDeterministic() && map_field.size() > 1) { |
|
|
|
|
|
|
|
for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) { |
|
|
|
|
|
|
|
target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream); |
|
|
|
|
|
|
|
check_utf8(entry); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
for (const auto& entry : map_field) { |
|
|
|
for (const auto& entry : field) { |
|
|
|
target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream); |
|
|
|
target = WireHelper::InternalSerialize( |
|
|
|
check_utf8(entry); |
|
|
|
1, entry.first, entry.second, target, stream); |
|
|
|
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
|
|
|
|
|
|
|
entry.first.data(), static_cast<int>(entry.first.length()), |
|
|
|
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Struct.fields"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -372,12 +373,9 @@ failure: |
|
|
|
(void) cached_has_bits; |
|
|
|
(void) cached_has_bits; |
|
|
|
|
|
|
|
|
|
|
|
// map<string, .google.protobuf.Value> fields = 1;
|
|
|
|
// map<string, .google.protobuf.Value> fields = 1;
|
|
|
|
total_size += 1 * |
|
|
|
total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_fields_size()); |
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_fields_size()); |
|
|
|
for (const auto& entry : _internal_fields()) { |
|
|
|
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >::const_iterator |
|
|
|
total_size += Struct_FieldsEntry_DoNotUse::Funcs::ByteSizeLong(entry.first, entry.second); |
|
|
|
it = this->_internal_fields().begin(); |
|
|
|
|
|
|
|
it != this->_internal_fields().end(); ++it) { |
|
|
|
|
|
|
|
total_size += Struct_FieldsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
|
|
|