aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/protobuf/src
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:45:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:01 +0300
commit2d37894b1b037cf24231090eda8589bbb44fb6fc (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/protobuf/src
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
downloadydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/protobuf/src')
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/any.cc2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/any.h6
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/any.pb.cc68
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/any.pb.h44
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/any.proto16
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/api.pb.cc306
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/api.pb.h202
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/api.proto58
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/arena.cc62
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/arena.h110
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/arena_impl.h198
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/arenastring.h16
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/descriptor.cc1388
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/descriptor.h336
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/descriptor.pb.cc3334
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/descriptor.pb.h1730
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/descriptor.proto110
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/descriptor_database.cc10
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/descriptor_database.h26
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/duration.pb.cc88
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/duration.pb.h68
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/duration.proto44
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/dynamic_message.cc86
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/dynamic_message.h132
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/empty.pb.cc52
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/empty.pb.h50
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/extension_set.cc12
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/extension_set.h34
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/extension_set_heavy.cc38
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/field_mask.pb.cc56
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/field_mask.pb.h66
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/field_mask.proto2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.cc516
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.h278
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven.cc150
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven.h330
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven_lite.cc148
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven_lite.h1186
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/generated_message_util.cc1110
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/generated_message_util.h56
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/has_bits.h190
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/coded_stream.cc24
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/coded_stream.h158
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/gzip_stream.cc2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/io_win32.cc572
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/io_win32.h152
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/printer.cc58
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/printer.h22
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream.h8
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc16
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h4
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/map.h104
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/map_entry.h38
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/map_entry_lite.h238
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/map_field.cc32
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/map_field.h294
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/map_field_inl.h64
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/map_field_lite.h56
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/map_type_handler.h24
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/message.cc10
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/message.h58
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/message_lite.cc38
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/message_lite.h246
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/metadata_lite.h208
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/reflection.h38
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc38
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/repeated_field.cc24
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/repeated_field.h268
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/source_context.pb.cc58
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/source_context.pb.h52
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/struct.pb.cc302
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/struct.pb.h250
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/struct.proto2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/bytestream.h2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/callback.h64
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/common.cc42
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/common.h6
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/hash.h2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/int128.cc4
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/map_util.h8
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/platform_macros.h6
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/port.h126
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/status.cc2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/stringpiece.cc2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/stringpiece.h16
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc26
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/substitute.cc6
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/text_format.cc676
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/text_format.h128
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/timestamp.pb.cc74
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/timestamp.pb.h58
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/timestamp.proto42
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/type.pb.cc690
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/type.pb.h422
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/type.proto18
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/unknown_field_set.cc28
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/unknown_field_set.h52
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.cc132
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.h112
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/field_comparator.h6
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/field_mask_util.cc134
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/field_mask_util.h54
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.cc74
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.h34
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc80
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h60
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/json_escaping.cc6
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc12
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/json_objectwriter.h2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc118
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/json_stream_parser.h22
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/proto_writer.cc4
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/proto_writer.h16
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc74
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectsource.h36
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc202
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h120
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/type_info.cc36
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/utility.cc88
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/utility.h18
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/json_util.cc30
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/json_util.h28
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/message_differencer.cc140
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/message_differencer.h76
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/time_util.cc6
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/time_util.h8
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/type_resolver.h4
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/type_resolver_util.cc24
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/type_resolver_util.h4
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/wire_format.cc562
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/wire_format.h16
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/wire_format_lite.cc304
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/wire_format_lite.h242
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/wrappers.pb.cc414
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/wrappers.pb.h340
137 files changed, 11157 insertions, 11157 deletions
diff --git a/contrib/libs/protobuf/src/google/protobuf/any.cc b/contrib/libs/protobuf/src/google/protobuf/any.cc
index 36d89b84e2..955dd80b5b 100644
--- a/contrib/libs/protobuf/src/google/protobuf/any.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/any.cc
@@ -34,7 +34,7 @@
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/message.h>
-
+
#include <google/protobuf/port_def.inc>
namespace google {
diff --git a/contrib/libs/protobuf/src/google/protobuf/any.h b/contrib/libs/protobuf/src/google/protobuf/any.h
index fed6c064bf..555d5136a9 100644
--- a/contrib/libs/protobuf/src/google/protobuf/any.h
+++ b/contrib/libs/protobuf/src/google/protobuf/any.h
@@ -90,7 +90,7 @@ class PROTOBUF_EXPORT AnyMetadata {
// Unpacks the payload into the given message. Returns false if the message's
// type doesn't match the type specified in the type URL (i.e., the full
- // name after the last "/" of the type URL doesn't match the message's actual
+ // name after the last "/" of the type URL doesn't match the message's actual
// full name) or parsing the payload has failed.
template <typename T>
bool UnpackTo(T* message) const {
@@ -124,8 +124,8 @@ class PROTOBUF_EXPORT AnyMetadata {
// Get the proto type name from Any::type_url value. For example, passing
// "type.googleapis.com/rpc.QueryOrigin" will return "rpc.QueryOrigin" in
-// *full_type_name. Returns false if the type_url does not have a "/"
-// in the type url separating the full type name.
+// *full_type_name. Returns false if the type_url does not have a "/"
+// in the type url separating the full type name.
//
// NOTE: this function is available publicly as:
// google::protobuf::Any() // static method on the generated message type.
diff --git a/contrib/libs/protobuf/src/google/protobuf/any.pb.cc b/contrib/libs/protobuf/src/google/protobuf/any.pb.cc
index 8c558087de..66b731e296 100644
--- a/contrib/libs/protobuf/src/google/protobuf/any.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/any.pb.cc
@@ -29,30 +29,30 @@ struct AnyDefaultTypeInternal {
union {
Any _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AnyDefaultTypeInternal _Any_default_instance_;
PROTOBUF_NAMESPACE_CLOSE
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fany_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fany_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fany_2eproto = nullptr;
-
+
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fany_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Any, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Any, type_url_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Any, value_),
-};
+};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Any)},
-};
+};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Any_default_instance_),
-};
-
+};
+
const char descriptor_table_protodef_google_2fprotobuf_2fany_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\031google/protobuf/any.proto\022\017google.prot"
"obuf\"&\n\003Any\022\020\n\010type_url\030\001 \001(\t\022\r\n\005value\030\002"
@@ -70,8 +70,8 @@ const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_google_2fprotobuf_2fany_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2fany_2eproto;
-}
-
+}
+
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fany_2eproto(&descriptor_table_google_2fprotobuf_2fany_2eproto);
PROTOBUF_NAMESPACE_OPEN
@@ -108,18 +108,18 @@ Any::Any(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
Any::Any(const Any& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _any_metadata_(&type_url_, &value_) {
+ _any_metadata_(&type_url_, &value_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from._internal_type_url().empty()) {
type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_type_url(),
GetArenaForAllocation());
- }
+ }
value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from._internal_value().empty()) {
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_value(),
GetArenaForAllocation());
- }
+ }
// @@protoc_insertion_point(copy_constructor:google.protobuf.Any)
}
@@ -154,9 +154,9 @@ void Any::SetCachedSize(int size) const {
void Any::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Any)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
type_url_.ClearToEmpty();
value_.ClearToEmpty();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
@@ -168,7 +168,7 @@ const char* Any::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // string type_url = 1;
+ // string type_url = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
auto str = _internal_mutable_type_url();
@@ -177,7 +177,7 @@ const char* Any::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern
CHK_(ptr);
} else goto handle_unusual;
continue;
- // bytes value = 2;
+ // bytes value = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
auto str = _internal_mutable_value();
@@ -212,9 +212,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Any)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string type_url = 1;
+ (void) cached_has_bits;
+
+ // string type_url = 1;
if (!this->_internal_type_url().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_type_url().data(), static_cast<int>(this->_internal_type_url().length()),
@@ -224,7 +224,7 @@ failure:
1, this->_internal_type_url(), target);
}
- // bytes value = 2;
+ // bytes value = 2;
if (!this->_internal_value().empty()) {
target = stream->WriteBytesMaybeAliased(
2, this->_internal_value(), target);
@@ -233,27 +233,27 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Any)
return target;
}
-size_t Any::ByteSizeLong() const {
+size_t Any::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Any)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // string type_url = 1;
+ // string type_url = 1;
if (!this->_internal_type_url().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_type_url());
}
- // bytes value = 2;
+ // bytes value = 2;
if (!this->_internal_value().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
@@ -284,10 +284,10 @@ void Any::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Any::MergeFrom(const Any& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Any)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (!from._internal_type_url().empty()) {
_internal_set_type_url(from._internal_type_url());
}
@@ -301,7 +301,7 @@ void Any::CopyFrom(const Any& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Any)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Any::IsInitialized() const {
@@ -309,7 +309,7 @@ bool Any::IsInitialized() const {
}
void Any::InternalSwap(Any* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
diff --git a/contrib/libs/protobuf/src/google/protobuf/any.pb.h b/contrib/libs/protobuf/src/google/protobuf/any.pb.h
index 4f117896ad..f45f983ffb 100644
--- a/contrib/libs/protobuf/src/google/protobuf/any.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/any.pb.h
@@ -51,7 +51,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fany_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
-};
+};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fany_2eproto;
PROTOBUF_NAMESPACE_OPEN
class Any;
@@ -104,13 +104,13 @@ class PROTOBUF_EXPORT Any final :
static const Any& default_instance() {
return *internal_default_instance();
}
- static inline const Any* internal_default_instance() {
- return reinterpret_cast<const Any*>(
- &_Any_default_instance_);
- }
+ static inline const Any* internal_default_instance() {
+ return reinterpret_cast<const Any*>(
+ &_Any_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 0;
-
+ 0;
+
// implements Any -----------------------------------------------
bool PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message) {
@@ -144,9 +144,9 @@ class PROTOBUF_EXPORT Any final :
}
static bool ParseAnyTypeUrl(::PROTOBUF_NAMESPACE_ID::ConstStringParam type_url,
TProtoStringType* full_type_name);
- friend void swap(Any& a, Any& b) {
- a.Swap(&b);
- }
+ friend void swap(Any& a, Any& b) {
+ a.Swap(&b);
+ }
inline void Swap(Any* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -216,7 +216,7 @@ class PROTOBUF_EXPORT Any final :
kTypeUrlFieldNumber = 1,
kValueFieldNumber = 2,
};
- // string type_url = 1;
+ // string type_url = 1;
void clear_type_url();
const TProtoStringType& type_url() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -230,7 +230,7 @@ class PROTOBUF_EXPORT Any final :
TProtoStringType* _internal_mutable_type_url();
public:
- // bytes value = 2;
+ // bytes value = 2;
void clear_value();
const TProtoStringType& value() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -262,13 +262,13 @@ class PROTOBUF_EXPORT Any final :
// ===================================================================
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
// Any
-// string type_url = 1;
+// string type_url = 1;
inline void Any::clear_type_url() {
type_url_.ClearToEmpty();
}
@@ -314,7 +314,7 @@ inline void Any::set_allocated_type_url(TProtoStringType* type_url) {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
}
-// bytes value = 2;
+// bytes value = 2;
inline void Any::clear_value() {
value_.ClearToEmpty();
}
@@ -360,14 +360,14 @@ inline void Any::set_allocated_value(TProtoStringType* value) {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
}
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_CLOSE
-
+
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protobuf/src/google/protobuf/any.proto b/contrib/libs/protobuf/src/google/protobuf/any.proto
index cc66026767..6ed8a23cf5 100644
--- a/contrib/libs/protobuf/src/google/protobuf/any.proto
+++ b/contrib/libs/protobuf/src/google/protobuf/any.proto
@@ -74,19 +74,19 @@ option objc_class_prefix = "GPB";
// any.Unpack(foo)
// ...
//
-// Example 4: Pack and unpack a message in Go
-//
-// foo := &pb.Foo{...}
+// Example 4: Pack and unpack a message in Go
+//
+// foo := &pb.Foo{...}
// any, err := anypb.New(foo)
// if err != nil {
// ...
// }
-// ...
-// foo := &pb.Foo{}
+// ...
+// foo := &pb.Foo{}
// if err := any.UnmarshalTo(foo); err != nil {
-// ...
-// }
-//
+// ...
+// }
+//
// The pack methods provided by protobuf library will by default use
// 'type.googleapis.com/full.type.name' as the type URL and the unpack
// methods only use the fully qualified type name after the last '/'
diff --git a/contrib/libs/protobuf/src/google/protobuf/api.pb.cc b/contrib/libs/protobuf/src/google/protobuf/api.pb.cc
index e91ec008bd..b2e14d1836 100644
--- a/contrib/libs/protobuf/src/google/protobuf/api.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/api.pb.cc
@@ -34,7 +34,7 @@ struct ApiDefaultTypeInternal {
union {
Api _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ApiDefaultTypeInternal _Api_default_instance_;
constexpr Method::Method(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
@@ -53,7 +53,7 @@ struct MethodDefaultTypeInternal {
union {
Method _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MethodDefaultTypeInternal _Method_default_instance_;
constexpr Mixin::Mixin(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
@@ -66,19 +66,19 @@ struct MixinDefaultTypeInternal {
union {
Mixin _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MixinDefaultTypeInternal _Mixin_default_instance_;
PROTOBUF_NAMESPACE_CLOSE
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fapi_2eproto[3];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr;
-
+
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fapi_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, methods_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, options_),
@@ -86,11 +86,11 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fapi_2eprot
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, source_context_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, mixins_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, syntax_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, request_type_url_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, request_streaming_),
@@ -98,26 +98,26 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fapi_2eprot
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, response_streaming_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, options_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, syntax_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Mixin, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Mixin, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Mixin, root_),
-};
+};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Api)},
{ 12, -1, sizeof(PROTOBUF_NAMESPACE_ID::Method)},
{ 24, -1, sizeof(PROTOBUF_NAMESPACE_ID::Mixin)},
-};
+};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Api_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Method_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Mixin_default_instance_),
-};
-
+};
+
const char descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\031google/protobuf/api.proto\022\017google.prot"
"obuf\032$google/protobuf/source_context.pro"
@@ -152,8 +152,8 @@ const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_google_2fprotobuf_2fapi_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2fapi_2eproto;
-}
-
+}
+
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fapi_2eproto(&descriptor_table_google_2fprotobuf_2fapi_2eproto);
PROTOBUF_NAMESPACE_OPEN
@@ -168,10 +168,10 @@ class Api::_Internal {
const PROTOBUF_NAMESPACE_ID::SourceContext&
Api::_Internal::source_context(const Api* msg) {
return *msg->source_context_;
-}
+}
void Api::clear_options() {
options_.Clear();
-}
+}
void Api::clear_source_context() {
if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) {
delete source_context_;
@@ -192,26 +192,26 @@ Api::Api(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
Api::Api(const Api& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- methods_(from.methods_),
- options_(from.options_),
+ methods_(from.methods_),
+ options_(from.options_),
mixins_(from.mixins_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from._internal_version().empty()) {
version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_version(),
GetArenaForAllocation());
- }
+ }
if (from._internal_has_source_context()) {
source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
- } else {
+ } else {
source_context_ = nullptr;
- }
- syntax_ = from.syntax_;
+ }
+ syntax_ = from.syntax_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.Api)
}
@@ -235,7 +235,7 @@ inline void Api::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete source_context_;
+ if (this != internal_default_instance()) delete source_context_;
}
void Api::ArenaDtor(void* object) {
@@ -251,17 +251,17 @@ void Api::SetCachedSize(int size) const {
void Api::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Api)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- methods_.Clear();
- options_.Clear();
- mixins_.Clear();
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ methods_.Clear();
+ options_.Clear();
+ mixins_.Clear();
name_.ClearToEmpty();
version_.ClearToEmpty();
if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) {
- delete source_context_;
- }
+ delete source_context_;
+ }
source_context_ = nullptr;
syntax_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
@@ -273,7 +273,7 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // string name = 1;
+ // string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
auto str = _internal_mutable_name();
@@ -306,7 +306,7 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
} else goto handle_unusual;
continue;
- // string version = 4;
+ // string version = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
auto str = _internal_mutable_version();
@@ -315,7 +315,7 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern
CHK_(ptr);
} else goto handle_unusual;
continue;
- // .google.protobuf.SourceContext source_context = 5;
+ // .google.protobuf.SourceContext source_context = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr);
@@ -334,7 +334,7 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
} else goto handle_unusual;
continue;
- // .google.protobuf.Syntax syntax = 7;
+ // .google.protobuf.Syntax syntax = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -369,9 +369,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string name = 1;
+ (void) cached_has_bits;
+
+ // string name = 1;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
@@ -382,7 +382,7 @@ failure:
}
// repeated .google.protobuf.Method methods = 2;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_methods_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -390,14 +390,14 @@ failure:
}
// repeated .google.protobuf.Option options = 3;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_options_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, this->_internal_options(i), target, stream);
}
- // string version = 4;
+ // string version = 4;
if (!this->_internal_version().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_version().data(), static_cast<int>(this->_internal_version().length()),
@@ -407,7 +407,7 @@ failure:
4, this->_internal_version(), target);
}
- // .google.protobuf.SourceContext source_context = 5;
+ // .google.protobuf.SourceContext source_context = 5;
if (this->_internal_has_source_context()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -416,14 +416,14 @@ failure:
}
// repeated .google.protobuf.Mixin mixins = 6;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_mixins_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(6, this->_internal_mixins(i), target, stream);
}
- // .google.protobuf.Syntax syntax = 7;
+ // .google.protobuf.Syntax syntax = 7;
if (this->_internal_syntax() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
@@ -433,14 +433,14 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Api)
return target;
}
-size_t Api::ByteSizeLong() const {
+size_t Api::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Api)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -449,9 +449,9 @@ size_t Api::ByteSizeLong() const {
// repeated .google.protobuf.Method methods = 2;
total_size += 1UL * this->_internal_methods_size();
for (const auto& msg : this->methods_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
+ }
// repeated .google.protobuf.Option options = 3;
total_size += 1UL * this->_internal_options_size();
@@ -467,33 +467,33 @@ size_t Api::ByteSizeLong() const {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- // string name = 1;
+ // string name = 1;
if (!this->_internal_name().empty()) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
- }
-
- // string version = 4;
+ }
+
+ // string version = 4;
if (!this->_internal_version().empty()) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_version());
- }
-
- // .google.protobuf.SourceContext source_context = 5;
+ }
+
+ // .google.protobuf.SourceContext source_context = 5;
if (this->_internal_has_source_context()) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*source_context_);
- }
-
- // .google.protobuf.Syntax syntax = 7;
+ }
+
+ // .google.protobuf.Syntax syntax = 7;
if (this->_internal_syntax() != 0) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_syntax());
- }
-
+ }
+
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
_internal_metadata_, total_size, &_cached_size_);
@@ -518,10 +518,10 @@ void Api::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Api::MergeFrom(const Api& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Api)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
methods_.MergeFrom(from.methods_);
options_.MergeFrom(from.options_);
mixins_.MergeFrom(from.mixins_);
@@ -544,7 +544,7 @@ void Api::CopyFrom(const Api& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Api)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Api::IsInitialized() const {
@@ -552,11 +552,11 @@ bool Api::IsInitialized() const {
}
void Api::InternalSwap(Api* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- methods_.InternalSwap(&other->methods_);
- options_.InternalSwap(&other->options_);
- mixins_.InternalSwap(&other->mixins_);
+ methods_.InternalSwap(&other->methods_);
+ options_.InternalSwap(&other->options_);
+ mixins_.InternalSwap(&other->mixins_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, GetArenaForAllocation(),
@@ -608,20 +608,20 @@ Method::Method(const Method& from)
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
request_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from._internal_request_type_url().empty()) {
request_type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_request_type_url(),
GetArenaForAllocation());
- }
+ }
response_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from._internal_response_type_url().empty()) {
response_type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_response_type_url(),
GetArenaForAllocation());
- }
- ::memcpy(&request_streaming_, &from.request_streaming_,
- static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
- reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_));
+ }
+ ::memcpy(&request_streaming_, &from.request_streaming_,
+ static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
+ reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.Method)
}
@@ -662,16 +662,16 @@ void Method::SetCachedSize(int size) const {
void Method::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Method)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- options_.Clear();
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ options_.Clear();
name_.ClearToEmpty();
request_type_url_.ClearToEmpty();
response_type_url_.ClearToEmpty();
- ::memset(&request_streaming_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&syntax_) -
- reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_));
+ ::memset(&request_streaming_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&syntax_) -
+ reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -681,7 +681,7 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // string name = 1;
+ // string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
auto str = _internal_mutable_name();
@@ -690,7 +690,7 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
CHK_(ptr);
} else goto handle_unusual;
continue;
- // string request_type_url = 2;
+ // string request_type_url = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
auto str = _internal_mutable_request_type_url();
@@ -699,14 +699,14 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
CHK_(ptr);
} else goto handle_unusual;
continue;
- // bool request_streaming = 3;
+ // bool request_streaming = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
request_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
- // string response_type_url = 4;
+ // string response_type_url = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
auto str = _internal_mutable_response_type_url();
@@ -715,7 +715,7 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
CHK_(ptr);
} else goto handle_unusual;
continue;
- // bool response_streaming = 5;
+ // bool response_streaming = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
response_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -734,7 +734,7 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
} else goto handle_unusual;
continue;
- // .google.protobuf.Syntax syntax = 7;
+ // .google.protobuf.Syntax syntax = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -769,9 +769,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string name = 1;
+ (void) cached_has_bits;
+
+ // string name = 1;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
@@ -781,7 +781,7 @@ failure:
1, this->_internal_name(), target);
}
- // string request_type_url = 2;
+ // string request_type_url = 2;
if (!this->_internal_request_type_url().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_request_type_url().data(), static_cast<int>(this->_internal_request_type_url().length()),
@@ -791,13 +791,13 @@ failure:
2, this->_internal_request_type_url(), target);
}
- // bool request_streaming = 3;
+ // bool request_streaming = 3;
if (this->_internal_request_streaming() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_request_streaming(), target);
}
- // string response_type_url = 4;
+ // string response_type_url = 4;
if (!this->_internal_response_type_url().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_response_type_url().data(), static_cast<int>(this->_internal_response_type_url().length()),
@@ -807,21 +807,21 @@ failure:
4, this->_internal_response_type_url(), target);
}
- // bool response_streaming = 5;
+ // bool response_streaming = 5;
if (this->_internal_response_streaming() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_response_streaming(), target);
}
// repeated .google.protobuf.Option options = 6;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_options_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(6, this->_internal_options(i), target, stream);
}
- // .google.protobuf.Syntax syntax = 7;
+ // .google.protobuf.Syntax syntax = 7;
if (this->_internal_syntax() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
@@ -831,14 +831,14 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Method)
return target;
}
-size_t Method::ByteSizeLong() const {
+size_t Method::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Method)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -847,42 +847,42 @@ size_t Method::ByteSizeLong() const {
// repeated .google.protobuf.Option options = 6;
total_size += 1UL * this->_internal_options_size();
for (const auto& msg : this->options_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
-
- // string name = 1;
+ }
+
+ // string name = 1;
if (!this->_internal_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
- // string request_type_url = 2;
+ // string request_type_url = 2;
if (!this->_internal_request_type_url().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_request_type_url());
}
- // string response_type_url = 4;
+ // string response_type_url = 4;
if (!this->_internal_response_type_url().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_response_type_url());
}
- // bool request_streaming = 3;
+ // bool request_streaming = 3;
if (this->_internal_request_streaming() != 0) {
- total_size += 1 + 1;
- }
-
- // bool response_streaming = 5;
+ total_size += 1 + 1;
+ }
+
+ // bool response_streaming = 5;
if (this->_internal_response_streaming() != 0) {
total_size += 1 + 1;
}
- // .google.protobuf.Syntax syntax = 7;
+ // .google.protobuf.Syntax syntax = 7;
if (this->_internal_syntax() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_syntax());
@@ -912,10 +912,10 @@ void Method::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Method::MergeFrom(const Method& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Method)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
options_.MergeFrom(from.options_);
if (!from._internal_name().empty()) {
_internal_set_name(from._internal_name());
@@ -928,7 +928,7 @@ void Method::MergeFrom(const Method& from) {
}
if (from._internal_request_streaming() != 0) {
_internal_set_request_streaming(from._internal_request_streaming());
- }
+ }
if (from._internal_response_streaming() != 0) {
_internal_set_response_streaming(from._internal_response_streaming());
}
@@ -942,7 +942,7 @@ void Method::CopyFrom(const Method& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Method)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Method::IsInitialized() const {
@@ -950,9 +950,9 @@ bool Method::IsInitialized() const {
}
void Method::InternalSwap(Method* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- options_.InternalSwap(&other->options_);
+ options_.InternalSwap(&other->options_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, GetArenaForAllocation(),
@@ -1004,12 +1004,12 @@ Mixin::Mixin(const Mixin& from)
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
root_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from._internal_root().empty()) {
root_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_root(),
GetArenaForAllocation());
- }
+ }
// @@protoc_insertion_point(copy_constructor:google.protobuf.Mixin)
}
@@ -1044,9 +1044,9 @@ void Mixin::SetCachedSize(int size) const {
void Mixin::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Mixin)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
name_.ClearToEmpty();
root_.ClearToEmpty();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
@@ -1058,7 +1058,7 @@ const char* Mixin::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // string name = 1;
+ // string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
auto str = _internal_mutable_name();
@@ -1067,7 +1067,7 @@ const char* Mixin::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
CHK_(ptr);
} else goto handle_unusual;
continue;
- // string root = 2;
+ // string root = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
auto str = _internal_mutable_root();
@@ -1103,9 +1103,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string name = 1;
+ (void) cached_has_bits;
+
+ // string name = 1;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
@@ -1115,7 +1115,7 @@ failure:
1, this->_internal_name(), target);
}
- // string root = 2;
+ // string root = 2;
if (!this->_internal_root().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_root().data(), static_cast<int>(this->_internal_root().length()),
@@ -1128,27 +1128,27 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Mixin)
return target;
}
-size_t Mixin::ByteSizeLong() const {
+size_t Mixin::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Mixin)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // string name = 1;
+ // string name = 1;
if (!this->_internal_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
- // string root = 2;
+ // string root = 2;
if (!this->_internal_root().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
@@ -1179,10 +1179,10 @@ void Mixin::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Mixin::MergeFrom(const Mixin& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Mixin)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (!from._internal_name().empty()) {
_internal_set_name(from._internal_name());
}
@@ -1196,7 +1196,7 @@ void Mixin::CopyFrom(const Mixin& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Mixin)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Mixin::IsInitialized() const {
@@ -1204,7 +1204,7 @@ bool Mixin::IsInitialized() const {
}
void Mixin::InternalSwap(Mixin* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
diff --git a/contrib/libs/protobuf/src/google/protobuf/api.pb.h b/contrib/libs/protobuf/src/google/protobuf/api.pb.h
index ab05cd51c2..09482c7fee 100644
--- a/contrib/libs/protobuf/src/google/protobuf/api.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/api.pb.h
@@ -56,13 +56,13 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fapi_2eproto {
};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fapi_2eproto;
PROTOBUF_NAMESPACE_OPEN
-class Api;
+class Api;
struct ApiDefaultTypeInternal;
PROTOBUF_EXPORT extern ApiDefaultTypeInternal _Api_default_instance_;
-class Method;
+class Method;
struct MethodDefaultTypeInternal;
PROTOBUF_EXPORT extern MethodDefaultTypeInternal _Method_default_instance_;
-class Mixin;
+class Mixin;
struct MixinDefaultTypeInternal;
PROTOBUF_EXPORT extern MixinDefaultTypeInternal _Mixin_default_instance_;
PROTOBUF_NAMESPACE_CLOSE
@@ -92,15 +92,15 @@ class PROTOBUF_EXPORT Api final :
CopyFrom(from);
return *this;
}
- inline Api& operator=(Api&& from) noexcept {
+ inline Api& operator=(Api&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
@@ -114,16 +114,16 @@ class PROTOBUF_EXPORT Api final :
static const Api& default_instance() {
return *internal_default_instance();
}
- static inline const Api* internal_default_instance() {
- return reinterpret_cast<const Api*>(
- &_Api_default_instance_);
- }
+ static inline const Api* internal_default_instance() {
+ return reinterpret_cast<const Api*>(
+ &_Api_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 0;
-
- friend void swap(Api& a, Api& b) {
- a.Swap(&b);
- }
+ 0;
+
+ friend void swap(Api& a, Api& b) {
+ a.Swap(&b);
+ }
inline void Swap(Api* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -234,15 +234,15 @@ class PROTOBUF_EXPORT Api final :
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
options() const;
- // repeated .google.protobuf.Mixin mixins = 6;
- int mixins_size() const;
+ // repeated .google.protobuf.Mixin mixins = 6;
+ int mixins_size() const;
private:
int _internal_mixins_size() const;
public:
- void clear_mixins();
+ void clear_mixins();
PROTOBUF_NAMESPACE_ID::Mixin* mutable_mixins(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin >*
- mutable_mixins();
+ mutable_mixins();
private:
const PROTOBUF_NAMESPACE_ID::Mixin& _internal_mixins(int index) const;
PROTOBUF_NAMESPACE_ID::Mixin* _internal_add_mixins();
@@ -250,23 +250,23 @@ class PROTOBUF_EXPORT Api final :
const PROTOBUF_NAMESPACE_ID::Mixin& mixins(int index) const;
PROTOBUF_NAMESPACE_ID::Mixin* add_mixins();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin >&
- mixins() const;
-
- // string name = 1;
- void clear_name();
- const TProtoStringType& name() const;
+ mixins() const;
+
+ // string name = 1;
+ void clear_name();
+ const TProtoStringType& name() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
void set_name(ArgT0&& arg0, ArgT... args);
- TProtoStringType* mutable_name();
+ TProtoStringType* mutable_name();
PROTOBUF_MUST_USE_RESULT TProtoStringType* release_name();
- void set_allocated_name(TProtoStringType* name);
+ void set_allocated_name(TProtoStringType* name);
private:
const TProtoStringType& _internal_name() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const TProtoStringType& value);
TProtoStringType* _internal_mutable_name();
public:
-
- // string version = 4;
+
+ // string version = 4;
void clear_version();
const TProtoStringType& version() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -280,7 +280,7 @@ class PROTOBUF_EXPORT Api final :
TProtoStringType* _internal_mutable_version();
public:
- // .google.protobuf.SourceContext source_context = 5;
+ // .google.protobuf.SourceContext source_context = 5;
bool has_source_context() const;
private:
bool _internal_has_source_context() const;
@@ -298,7 +298,7 @@ class PROTOBUF_EXPORT Api final :
PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
PROTOBUF_NAMESPACE_ID::SourceContext* unsafe_arena_release_source_context();
- // .google.protobuf.Syntax syntax = 7;
+ // .google.protobuf.Syntax syntax = 7;
void clear_syntax();
PROTOBUF_NAMESPACE_ID::Syntax syntax() const;
void set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value);
@@ -343,15 +343,15 @@ class PROTOBUF_EXPORT Method final :
CopyFrom(from);
return *this;
}
- inline Method& operator=(Method&& from) noexcept {
+ inline Method& operator=(Method&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
@@ -365,16 +365,16 @@ class PROTOBUF_EXPORT Method final :
static const Method& default_instance() {
return *internal_default_instance();
}
- static inline const Method* internal_default_instance() {
- return reinterpret_cast<const Method*>(
- &_Method_default_instance_);
- }
+ static inline const Method* internal_default_instance() {
+ return reinterpret_cast<const Method*>(
+ &_Method_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 1;
-
- friend void swap(Method& a, Method& b) {
- a.Swap(&b);
- }
+ 1;
+
+ friend void swap(Method& a, Method& b) {
+ a.Swap(&b);
+ }
inline void Swap(Method* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -449,15 +449,15 @@ class PROTOBUF_EXPORT Method final :
kResponseStreamingFieldNumber = 5,
kSyntaxFieldNumber = 7,
};
- // repeated .google.protobuf.Option options = 6;
- int options_size() const;
+ // repeated .google.protobuf.Option options = 6;
+ int options_size() const;
private:
int _internal_options_size() const;
public:
- void clear_options();
+ void clear_options();
PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
- mutable_options();
+ mutable_options();
private:
const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
@@ -465,9 +465,9 @@ class PROTOBUF_EXPORT Method final :
const PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
PROTOBUF_NAMESPACE_ID::Option* add_options();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
- options() const;
-
- // string name = 1;
+ options() const;
+
+ // string name = 1;
void clear_name();
const TProtoStringType& name() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -481,7 +481,7 @@ class PROTOBUF_EXPORT Method final :
TProtoStringType* _internal_mutable_name();
public:
- // string request_type_url = 2;
+ // string request_type_url = 2;
void clear_request_type_url();
const TProtoStringType& request_type_url() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -495,7 +495,7 @@ class PROTOBUF_EXPORT Method final :
TProtoStringType* _internal_mutable_request_type_url();
public:
- // string response_type_url = 4;
+ // string response_type_url = 4;
void clear_response_type_url();
const TProtoStringType& response_type_url() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -509,16 +509,16 @@ class PROTOBUF_EXPORT Method final :
TProtoStringType* _internal_mutable_response_type_url();
public:
- // bool request_streaming = 3;
- void clear_request_streaming();
- bool request_streaming() const;
- void set_request_streaming(bool value);
+ // bool request_streaming = 3;
+ void clear_request_streaming();
+ bool request_streaming() const;
+ void set_request_streaming(bool value);
private:
bool _internal_request_streaming() const;
void _internal_set_request_streaming(bool value);
public:
-
- // bool response_streaming = 5;
+
+ // bool response_streaming = 5;
void clear_response_streaming();
bool response_streaming() const;
void set_response_streaming(bool value);
@@ -527,7 +527,7 @@ class PROTOBUF_EXPORT Method final :
void _internal_set_response_streaming(bool value);
public:
- // .google.protobuf.Syntax syntax = 7;
+ // .google.protobuf.Syntax syntax = 7;
void clear_syntax();
PROTOBUF_NAMESPACE_ID::Syntax syntax() const;
void set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value);
@@ -572,15 +572,15 @@ class PROTOBUF_EXPORT Mixin final :
CopyFrom(from);
return *this;
}
- inline Mixin& operator=(Mixin&& from) noexcept {
+ inline Mixin& operator=(Mixin&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
@@ -594,16 +594,16 @@ class PROTOBUF_EXPORT Mixin final :
static const Mixin& default_instance() {
return *internal_default_instance();
}
- static inline const Mixin* internal_default_instance() {
- return reinterpret_cast<const Mixin*>(
- &_Mixin_default_instance_);
- }
+ static inline const Mixin* internal_default_instance() {
+ return reinterpret_cast<const Mixin*>(
+ &_Mixin_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 2;
-
- friend void swap(Mixin& a, Mixin& b) {
- a.Swap(&b);
- }
+ 2;
+
+ friend void swap(Mixin& a, Mixin& b) {
+ a.Swap(&b);
+ }
inline void Swap(Mixin* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -673,7 +673,7 @@ class PROTOBUF_EXPORT Mixin final :
kNameFieldNumber = 1,
kRootFieldNumber = 2,
};
- // string name = 1;
+ // string name = 1;
void clear_name();
const TProtoStringType& name() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -687,7 +687,7 @@ class PROTOBUF_EXPORT Mixin final :
TProtoStringType* _internal_mutable_name();
public:
- // string root = 2;
+ // string root = 2;
void clear_root();
const TProtoStringType& root() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -718,13 +718,13 @@ class PROTOBUF_EXPORT Mixin final :
// ===================================================================
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
// Api
-// string name = 1;
+// string name = 1;
inline void Api::clear_name() {
name_.ClearToEmpty();
}
@@ -847,7 +847,7 @@ Api::options() const {
return options_;
}
-// string version = 4;
+// string version = 4;
inline void Api::clear_version() {
version_.ClearToEmpty();
}
@@ -893,7 +893,7 @@ inline void Api::set_allocated_version(TProtoStringType* version) {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.version)
}
-// .google.protobuf.SourceContext source_context = 5;
+// .google.protobuf.SourceContext source_context = 5;
inline bool Api::_internal_has_source_context() const {
return this != internal_default_instance() && source_context_ != nullptr;
}
@@ -1019,7 +1019,7 @@ Api::mixins() const {
return mixins_;
}
-// .google.protobuf.Syntax syntax = 7;
+// .google.protobuf.Syntax syntax = 7;
inline void Api::clear_syntax() {
syntax_ = 0;
}
@@ -1043,7 +1043,7 @@ inline void Api::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) {
// Method
-// string name = 1;
+// string name = 1;
inline void Method::clear_name() {
name_.ClearToEmpty();
}
@@ -1089,7 +1089,7 @@ inline void Method::set_allocated_name(TProtoStringType* name) {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.name)
}
-// string request_type_url = 2;
+// string request_type_url = 2;
inline void Method::clear_request_type_url() {
request_type_url_.ClearToEmpty();
}
@@ -1135,7 +1135,7 @@ inline void Method::set_allocated_request_type_url(TProtoStringType* request_typ
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.request_type_url)
}
-// bool request_streaming = 3;
+// bool request_streaming = 3;
inline void Method::clear_request_streaming() {
request_streaming_ = false;
}
@@ -1155,7 +1155,7 @@ inline void Method::set_request_streaming(bool value) {
// @@protoc_insertion_point(field_set:google.protobuf.Method.request_streaming)
}
-// string response_type_url = 4;
+// string response_type_url = 4;
inline void Method::clear_response_type_url() {
response_type_url_.ClearToEmpty();
}
@@ -1201,7 +1201,7 @@ inline void Method::set_allocated_response_type_url(TProtoStringType* response_t
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.response_type_url)
}
-// bool response_streaming = 5;
+// bool response_streaming = 5;
inline void Method::clear_response_streaming() {
response_streaming_ = false;
}
@@ -1258,7 +1258,7 @@ Method::options() const {
return options_;
}
-// .google.protobuf.Syntax syntax = 7;
+// .google.protobuf.Syntax syntax = 7;
inline void Method::clear_syntax() {
syntax_ = 0;
}
@@ -1282,7 +1282,7 @@ inline void Method::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) {
// Mixin
-// string name = 1;
+// string name = 1;
inline void Mixin::clear_name() {
name_.ClearToEmpty();
}
@@ -1328,7 +1328,7 @@ inline void Mixin::set_allocated_name(TProtoStringType* name) {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Mixin.name)
}
-// string root = 2;
+// string root = 2;
inline void Mixin::clear_root() {
root_.ClearToEmpty();
}
@@ -1374,9 +1374,9 @@ inline void Mixin::set_allocated_root(TProtoStringType* root) {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Mixin.root)
}
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif // __GNUC__
// -------------------------------------------------------------------
// -------------------------------------------------------------------
@@ -1385,7 +1385,7 @@ inline void Mixin::set_allocated_root(TProtoStringType* root) {
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_CLOSE
-
+
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protobuf/src/google/protobuf/api.proto b/contrib/libs/protobuf/src/google/protobuf/api.proto
index ed0d3f1258..3d598fc859 100644
--- a/contrib/libs/protobuf/src/google/protobuf/api.proto
+++ b/contrib/libs/protobuf/src/google/protobuf/api.proto
@@ -42,32 +42,32 @@ option java_multiple_files = true;
option objc_class_prefix = "GPB";
option go_package = "google.golang.org/protobuf/types/known/apipb";
-// Api is a light-weight descriptor for an API Interface.
-//
-// Interfaces are also described as "protocol buffer services" in some contexts,
-// such as by the "service" keyword in a .proto file, but they are different
-// from API Services, which represent a concrete implementation of an interface
-// as opposed to simply a description of methods and bindings. They are also
-// sometimes simply referred to as "APIs" in other contexts, such as the name of
-// this message itself. See https://cloud.google.com/apis/design/glossary for
-// detailed terminology.
+// Api is a light-weight descriptor for an API Interface.
+//
+// Interfaces are also described as "protocol buffer services" in some contexts,
+// such as by the "service" keyword in a .proto file, but they are different
+// from API Services, which represent a concrete implementation of an interface
+// as opposed to simply a description of methods and bindings. They are also
+// sometimes simply referred to as "APIs" in other contexts, such as the name of
+// this message itself. See https://cloud.google.com/apis/design/glossary for
+// detailed terminology.
message Api {
- // The fully qualified name of this interface, including package name
- // followed by the interface's simple name.
+ // The fully qualified name of this interface, including package name
+ // followed by the interface's simple name.
string name = 1;
- // The methods of this interface, in unspecified order.
+ // The methods of this interface, in unspecified order.
repeated Method methods = 2;
- // Any metadata attached to the interface.
+ // Any metadata attached to the interface.
repeated Option options = 3;
- // A version string for this interface. If specified, must have the form
- // `major-version.minor-version`, as in `1.10`. If the minor version is
- // omitted, it defaults to zero. If the entire version field is empty, the
- // major version is derived from the package name, as outlined below. If the
- // field is not empty, the version in the package name will be verified to be
- // consistent with what is provided here.
+ // A version string for this interface. If specified, must have the form
+ // `major-version.minor-version`, as in `1.10`. If the minor version is
+ // omitted, it defaults to zero. If the entire version field is empty, the
+ // major version is derived from the package name, as outlined below. If the
+ // field is not empty, the version in the package name will be verified to be
+ // consistent with what is provided here.
//
// The versioning schema uses [semantic
// versioning](http://semver.org) where the major version number
@@ -77,10 +77,10 @@ message Api {
// chosen based on the product plan.
//
// The major version is also reflected in the package name of the
- // interface, which must end in `v<major-version>`, as in
+ // interface, which must end in `v<major-version>`, as in
// `google.feature.v1`. For major versions 0 and 1, the suffix can
// be omitted. Zero major versions must only be used for
- // experimental, non-GA interfaces.
+ // experimental, non-GA interfaces.
//
//
string version = 4;
@@ -89,14 +89,14 @@ message Api {
// message.
SourceContext source_context = 5;
- // Included interfaces. See [Mixin][].
+ // Included interfaces. See [Mixin][].
repeated Mixin mixins = 6;
// The source syntax of the service.
Syntax syntax = 7;
}
-// Method represents a method of an API interface.
+// Method represents a method of an API interface.
message Method {
// The simple name of this method.
string name = 1;
@@ -120,9 +120,9 @@ message Method {
Syntax syntax = 7;
}
-// Declares an API Interface to be included in this interface. The including
-// interface must redeclare all the methods from the included interface, but
-// documentation and options are inherited as follows:
+// Declares an API Interface to be included in this interface. The including
+// interface must redeclare all the methods from the included interface, but
+// documentation and options are inherited as follows:
//
// - If after comment and whitespace stripping, the documentation
// string of the redeclared method is empty, it will be inherited
@@ -134,8 +134,8 @@ message Method {
//
// - If an http annotation is inherited, the path pattern will be
// modified as follows. Any version prefix will be replaced by the
-// version of the including interface plus the [root][] path if
-// specified.
+// version of the including interface plus the [root][] path if
+// specified.
//
// Example of a simple mixin:
//
@@ -199,7 +199,7 @@ message Method {
// ...
// }
message Mixin {
- // The fully qualified name of the interface which is included.
+ // The fully qualified name of the interface which is included.
string name = 1;
// If non-empty specifies a path under which inherited HTTP paths
diff --git a/contrib/libs/protobuf/src/google/protobuf/arena.cc b/contrib/libs/protobuf/src/google/protobuf/arena.cc
index 61629d5fdb..bd9516b600 100644
--- a/contrib/libs/protobuf/src/google/protobuf/arena.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/arena.cc
@@ -30,25 +30,25 @@
#include <google/protobuf/arena.h>
-#include <algorithm>
+#include <algorithm>
#include <atomic>
#include <cstddef>
#include <cstdint>
-#include <limits>
+#include <limits>
#include <typeinfo>
-
+
#include <google/protobuf/arena_impl.h>
-
+
#include <google/protobuf/stubs/mutex.h>
-#ifdef ADDRESS_SANITIZER
-#include <sanitizer/asan_interface.h>
-#endif // ADDRESS_SANITIZER
-
+#ifdef ADDRESS_SANITIZER
+#include <sanitizer/asan_interface.h>
+#endif // ADDRESS_SANITIZER
+
#include <google/protobuf/port_def.inc>
namespace google {
namespace protobuf {
-namespace internal {
+namespace internal {
static SerialArena::Memory AllocateMemory(const AllocationPolicy* policy_ptr,
size_t last_size, size_t min_bytes) {
@@ -163,9 +163,9 @@ void SerialArena::AllocateNewBlock(size_t n, const AllocationPolicy* policy) {
ptr_ = head_->Pointer(kBlockHeaderSize);
limit_ = head_->Pointer(head_->size);
-#ifdef ADDRESS_SANITIZER
+#ifdef ADDRESS_SANITIZER
ASAN_POISON_MEMORY_REGION(ptr_, limit_ - ptr_);
-#endif // ADDRESS_SANITIZER
+#endif // ADDRESS_SANITIZER
}
uint64 SerialArena::SpaceUsed() const {
@@ -222,9 +222,9 @@ void ThreadSafeArena::InitializeFrom(void* mem, size_t size) {
if (mem != nullptr && size >= kBlockHeaderSize + kSerialArenaSize) {
alloc_policy_ |= kUserOwnedInitialBlock;
SetInitialBlock(mem, size);
- }
-}
-
+ }
+}
+
void ThreadSafeArena::InitializeWithPolicy(void* mem, size_t size,
bool record_allocs,
AllocationPolicy policy) {
@@ -244,9 +244,9 @@ void ThreadSafeArena::InitializeWithPolicy(void* mem, size_t size,
auto tmp = AllocateMemory(&policy, 0, kMinimumSize);
mem = tmp.ptr;
size = tmp.size;
- }
+ }
SetInitialBlock(mem, size);
-
+
auto sa = threads_.load(std::memory_order_relaxed);
// We ensured enough space so this cannot fail.
void* p;
@@ -257,7 +257,7 @@ void ThreadSafeArena::InitializeWithPolicy(void* mem, size_t size,
new (p) AllocationPolicy{policy};
alloc_policy_ |= reinterpret_cast<intptr_t>(p);
}
-
+
void ThreadSafeArena::Init(bool record_allocs) {
ThreadCache& tc = thread_cache();
auto id = tc.next_lifecycle_id;
@@ -283,7 +283,7 @@ void ThreadSafeArena::SetInitialBlock(void* mem, size_t size) {
serial->set_next(NULL);
threads_.store(serial, std::memory_order_relaxed);
CacheSerialArena(serial);
-}
+}
ThreadSafeArena::~ThreadSafeArena() {
// Have to do this in a first pass, because some of the destructors might
@@ -304,8 +304,8 @@ ThreadSafeArena::~ThreadSafeArena() {
}
if (collector) collector->OnDestroy(space_allocated);
-}
-
+}
+
SerialArena::Memory ThreadSafeArena::Free(size_t* space_allocated) {
SerialArena::Memory mem = {nullptr, 0};
auto deallocator = GetDeallocator(AllocPolicy(), space_allocated);
@@ -313,14 +313,14 @@ SerialArena::Memory ThreadSafeArena::Free(size_t* space_allocated) {
if (mem.ptr) deallocator(mem);
mem = a->Free(deallocator);
});
- return mem;
-}
-
+ return mem;
+}
+
uint64 ThreadSafeArena::Reset() {
// Have to do this in a first pass, because some of the destructors might
// refer to memory in other blocks.
CleanupList();
-
+
// Discard all blocks except the special block (if present).
size_t space_allocated = 0;
auto mem = Free(&space_allocated);
@@ -384,7 +384,7 @@ void* ThreadSafeArena::AllocateAlignedFallback(size_t n,
return GetSerialArenaFallback(&thread_cache())
->AllocateAligned(n, AllocPolicy());
}
-
+
PROTOBUF_NOINLINE
std::pair<void*, SerialArena::CleanupNode*>
ThreadSafeArena::AllocateAlignedWithCleanupFallback(
@@ -394,7 +394,7 @@ ThreadSafeArena::AllocateAlignedWithCleanupFallback(
SerialArena* arena;
if (GetSerialArenaFast(LifeCycleId(), &arena)) {
return arena->AllocateAlignedWithCleanup(n, AllocPolicy());
- }
+ }
}
return GetSerialArenaFallback(&thread_cache())
->AllocateAlignedWithCleanup(n, AllocPolicy());
@@ -427,7 +427,7 @@ uint64 ThreadSafeArena::SpaceUsed() const {
void ThreadSafeArena::CleanupList() {
PerSerialArena([](SerialArena* a) { a->CleanupList(); });
}
-
+
PROTOBUF_NOINLINE
SerialArena* ThreadSafeArena::GetSerialArenaFallback(void* me) {
// Look for this SerialArena in our linked list.
@@ -455,13 +455,13 @@ SerialArena* ThreadSafeArena::GetSerialArenaFallback(void* me) {
return serial;
}
-} // namespace internal
-
+} // namespace internal
+
PROTOBUF_FUNC_ALIGN(32)
void* Arena::AllocateAlignedNoHook(size_t n) {
return impl_.AllocateAligned(n, nullptr);
-}
-
+}
+
PROTOBUF_FUNC_ALIGN(32)
void* Arena::AllocateAlignedWithHook(size_t n, const std::type_info* type) {
return impl_.AllocateAligned(n, type);
diff --git a/contrib/libs/protobuf/src/google/protobuf/arena.h b/contrib/libs/protobuf/src/google/protobuf/arena.h
index 11caf4a404..ba080baec0 100644
--- a/contrib/libs/protobuf/src/google/protobuf/arena.h
+++ b/contrib/libs/protobuf/src/google/protobuf/arena.h
@@ -28,8 +28,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// This file defines an Arena allocator for better allocation performance.
-
+// This file defines an Arena allocator for better allocation performance.
+
#ifndef GOOGLE_PROTOBUF_ARENA_H__
#define GOOGLE_PROTOBUF_ARENA_H__
@@ -251,14 +251,14 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
// Default constructor with sensible default options, tuned for average
// use-cases.
inline Arena() : impl_() {}
-
+
// Construct an arena with default options, except for the supplied
// initial block. It is more efficient to use this constructor
// instead of passing ArenaOptions if the only configuration needed
// by the caller is supplying an initial block.
inline Arena(char* initial_block, size_t initial_block_size)
: impl_(initial_block, initial_block_size) {}
-
+
// Arena constructor taking custom options. See ArenaOptions above for
// descriptions of the options available.
explicit Arena(const ArenaOptions& options)
@@ -292,9 +292,9 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
// allocation protocol, documented above.
template <typename T, typename... Args>
PROTOBUF_ALWAYS_INLINE static T* CreateMessage(Arena* arena, Args&&... args) {
- static_assert(
- InternalHelper<T>::is_arena_constructable::value,
- "CreateMessage can only construct types that are ArenaConstructable");
+ static_assert(
+ InternalHelper<T>::is_arena_constructable::value,
+ "CreateMessage can only construct types that are ArenaConstructable");
// We must delegate to CreateMaybeMessage() and NOT CreateMessageInternal()
// because protobuf generated classes specialize CreateMaybeMessage() and we
// need to use that specialization for code size reasons.
@@ -320,7 +320,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
PROTOBUF_NDEBUG_INLINE static T* Create(Arena* arena, Args&&... args) {
return CreateInternal<T>(arena, std::is_convertible<T*, MessageLite*>(),
std::forward<Args>(args)...);
- }
+ }
// Create an array of object type T on the arena *without* invoking the
// constructor of T. If `arena` is null, then the return value should be freed
@@ -348,14 +348,14 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
// total sum allocated and used memory, but the exact value is an
// implementation deal. For instance allocated space depends on growth
// policies. Do not use these in unit tests.
- // Returns the total space allocated by the arena, which is the sum of the
+ // Returns the total space allocated by the arena, which is the sum of the
// sizes of the underlying blocks.
- uint64 SpaceAllocated() const { return impl_.SpaceAllocated(); }
- // Returns the total space used by the arena. Similar to SpaceAllocated but
- // does not include free space and block overhead. The total space returned
- // may not include space used by other threads executing concurrently with
- // the call to this method.
- uint64 SpaceUsed() const { return impl_.SpaceUsed(); }
+ uint64 SpaceAllocated() const { return impl_.SpaceAllocated(); }
+ // Returns the total space used by the arena. Similar to SpaceAllocated but
+ // does not include free space and block overhead. The total space returned
+ // may not include space used by other threads executing concurrently with
+ // the call to this method.
+ uint64 SpaceUsed() const { return impl_.SpaceUsed(); }
// Frees all storage allocated by this arena after calling destructors
// registered with OwnDestructor() and freeing objects registered with Own().
@@ -379,7 +379,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
template <typename T>
PROTOBUF_ALWAYS_INLINE void OwnDestructor(T* object) {
if (object != NULL) {
- impl_.AddCleanup(object, &internal::arena_destruct_object<T>);
+ impl_.AddCleanup(object, &internal::arena_destruct_object<T>);
}
}
@@ -389,7 +389,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
// the class destructor.
PROTOBUF_ALWAYS_INLINE void OwnCustomDestructor(void* object,
void (*destruct)(void*)) {
- impl_.AddCleanup(object, destruct);
+ impl_.AddCleanup(object, destruct);
}
// Retrieves the arena associated with |value| if |value| is an arena-capable
@@ -401,8 +401,8 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
return GetArenaInternal(value);
}
- template <typename T>
- class InternalHelper {
+ template <typename T>
+ class InternalHelper {
public:
// Provides access to protected GetOwningArena to generated messages.
static Arena* GetOwningArena(const T* p) { return p->GetOwningArena(); }
@@ -446,28 +446,28 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
return nullptr;
}
- template <typename U>
- static char DestructorSkippable(const typename U::DestructorSkippable_*);
- template <typename U>
- static double DestructorSkippable(...);
-
+ template <typename U>
+ static char DestructorSkippable(const typename U::DestructorSkippable_*);
+ template <typename U>
+ static double DestructorSkippable(...);
+
typedef std::integral_constant<
- bool, sizeof(DestructorSkippable<T>(static_cast<const T*>(0))) ==
- sizeof(char) ||
+ bool, sizeof(DestructorSkippable<T>(static_cast<const T*>(0))) ==
+ sizeof(char) ||
std::is_trivially_destructible<T>::value>
- is_destructor_skippable;
-
+ is_destructor_skippable;
+
template <typename U>
static char ArenaConstructable(
const typename U::InternalArenaConstructable_*);
template <typename U>
static double ArenaConstructable(...);
-
+
typedef std::integral_constant<bool, sizeof(ArenaConstructable<T>(
static_cast<const T*>(0))) ==
sizeof(char)>
- is_arena_constructable;
-
+ is_arena_constructable;
+
template <typename U,
typename std::enable_if<
std::is_same<Arena*, decltype(std::declval<const U>()
@@ -481,18 +481,18 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
sizeof(char)>
has_get_arena;
- template <typename... Args>
- static T* Construct(void* ptr, Args&&... args) {
- return new (ptr) T(std::forward<Args>(args)...);
- }
-
+ template <typename... Args>
+ static T* Construct(void* ptr, Args&&... args) {
+ return new (ptr) T(std::forward<Args>(args)...);
+ }
+
static T* New() {
return new T(nullptr);
}
static Arena* GetArena(const T* p) { return p->GetArena(); }
-
- friend class Arena;
+
+ friend class Arena;
friend class TestUtil::ReflectionTester;
};
@@ -509,7 +509,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
// This is inside Arena because only Arena has the friend relationships
// necessary to see the underlying generated code traits.
template <typename T>
- struct is_arena_constructable : InternalHelper<T>::is_arena_constructable {};
+ struct is_arena_constructable : InternalHelper<T>::is_arena_constructable {};
template <typename T>
struct is_destructor_skippable : InternalHelper<T>::is_destructor_skippable {
};
@@ -530,7 +530,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
return new T(nullptr, std::forward<Args>(args)...);
} else {
return arena->DoCreateMessage<T>(std::forward<Args>(args)...);
- }
+ }
}
// This specialization for no arguments is necessary, because its behavior is
@@ -555,10 +555,10 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
PROTOBUF_NDEBUG_INLINE void* AllocateInternal(size_t size, size_t align,
void (*destructor)(void*),
const std::type_info* type) {
- // Monitor allocation if needed.
+ // Monitor allocation if needed.
if (destructor == nullptr) {
return AllocateAlignedWithHook(size, align, type);
- } else {
+ } else {
if (align <= 8) {
auto res = AllocateAlignedWithCleanup(internal::AlignUpTo8(size), type);
res.second->elem = res.first;
@@ -571,7 +571,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
res.second->cleanup = destructor;
return ptr;
}
- }
+ }
}
// CreateMessage<T> requires that T supports arenas, but this private method
@@ -598,8 +598,8 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
Args&&... args) {
return DoCreateMaybeMessage<T>(arena, is_arena_constructable<T>(),
std::forward<Args>(args)...);
- }
-
+ }
+
// Just allocate the required size for the given type assuming the
// type has a trivial constructor.
template <typename T>
@@ -615,7 +615,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
template <typename T, typename... Args>
PROTOBUF_NDEBUG_INLINE T* DoCreateMessage(Args&&... args) {
- return InternalHelper<T>::Construct(
+ return InternalHelper<T>::Construct(
AllocateInternal(sizeof(T), alignof(T),
internal::ObjectDestructor<
InternalHelper<T>::is_destructor_skippable::value,
@@ -632,9 +632,9 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
CreateInArenaStorageInternal(ptr, arena,
typename is_arena_constructable<T>::type(),
std::forward<Args>(args)...);
- RegisterDestructorInternal(
- ptr, arena,
- typename InternalHelper<T>::is_destructor_skippable::type());
+ RegisterDestructorInternal(
+ ptr, arena,
+ typename InternalHelper<T>::is_destructor_skippable::type());
}
template <typename T, typename... Args>
@@ -704,7 +704,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
template <typename T>
PROTOBUF_ALWAYS_INLINE void OwnInternal(T* object, std::false_type) {
if (object != NULL) {
- impl_.AddCleanup(object, &internal::arena_delete_object<T>);
+ impl_.AddCleanup(object, &internal::arena_delete_object<T>);
}
}
@@ -714,7 +714,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
template <typename T, typename std::enable_if<
is_arena_constructable<T>::value, int>::type = 0>
PROTOBUF_ALWAYS_INLINE static Arena* GetArenaInternal(const T* value) {
- return InternalHelper<T>::GetArena(value);
+ return InternalHelper<T>::GetArena(value);
}
template <typename T,
typename std::enable_if<!is_arena_constructable<T>::value &&
@@ -751,7 +751,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
return nullptr;
}
- // For friends of arena.
+ // For friends of arena.
void* AllocateAligned(size_t n, size_t align = 8) {
if (align <= 8) {
return AllocateAlignedNoHook(internal::AlignUpTo8(n));
@@ -785,14 +785,14 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
std::pair<void*, internal::SerialArena::CleanupNode*>
AllocateAlignedWithCleanup(size_t n, const std::type_info* type);
- template <typename Type>
+ template <typename Type>
friend class internal::GenericTypeHandler;
friend struct internal::ArenaStringPtr; // For AllocateAligned.
friend class internal::LazyField; // For CreateMaybeMessage.
friend class internal::EpsCopyInputStream; // For parser performance
friend class MessageLite;
- template <typename Key, typename T>
- friend class Map;
+ template <typename Key, typename T>
+ friend class Map;
};
// Defined above for supporting environments without RTTI.
diff --git a/contrib/libs/protobuf/src/google/protobuf/arena_impl.h b/contrib/libs/protobuf/src/google/protobuf/arena_impl.h
index 47cf6b5e4c..40608dfe0d 100644
--- a/contrib/libs/protobuf/src/google/protobuf/arena_impl.h
+++ b/contrib/libs/protobuf/src/google/protobuf/arena_impl.h
@@ -1,45 +1,45 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This file defines an Arena allocator for better allocation performance.
-
-#ifndef GOOGLE_PROTOBUF_ARENA_IMPL_H__
-#define GOOGLE_PROTOBUF_ARENA_IMPL_H__
-
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// This file defines an Arena allocator for better allocation performance.
+
+#ifndef GOOGLE_PROTOBUF_ARENA_IMPL_H__
+#define GOOGLE_PROTOBUF_ARENA_IMPL_H__
+
#include <atomic>
-#include <limits>
+#include <limits>
#include <typeinfo>
-
+
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/logging.h>
-
+
#ifdef ADDRESS_SANITIZER
#include <sanitizer/asan_interface.h>
#endif // ADDRESS_SANITIZER
@@ -47,15 +47,15 @@
#include <google/protobuf/port_def.inc>
-namespace google {
-namespace protobuf {
-namespace internal {
-
+namespace google {
+namespace protobuf {
+namespace internal {
+
inline constexpr size_t AlignUpTo8(size_t n) {
- // Align n to next multiple of 8 (from Hacker's Delight, Chapter 3.)
+ // Align n to next multiple of 8 (from Hacker's Delight, Chapter 3.)
return (n + 7) & static_cast<size_t>(-8);
-}
-
+}
+
using LifecycleIdAtomic = uint64_t;
// MetricsCollector collects stats for a particular arena.
@@ -245,18 +245,18 @@ class PROTOBUF_EXPORT SerialArena {
static constexpr size_t kCleanupSize = AlignUpTo8(sizeof(CleanupNode));
};
-// This class provides the core Arena memory allocation library. Different
-// implementations only need to implement the public interface below.
-// Arena is not a template type as that would only be useful if all protos
-// in turn would be templates, which will/cannot happen. However separating
-// the memory allocation part from the cruft of the API users expect we can
-// use #ifdef the select the best implementation based on hardware / OS.
+// This class provides the core Arena memory allocation library. Different
+// implementations only need to implement the public interface below.
+// Arena is not a template type as that would only be useful if all protos
+// in turn would be templates, which will/cannot happen. However separating
+// the memory allocation part from the cruft of the API users expect we can
+// use #ifdef the select the best implementation based on hardware / OS.
class PROTOBUF_EXPORT ThreadSafeArena {
- public:
+ public:
ThreadSafeArena() { Init(false); }
-
+
ThreadSafeArena(char* mem, size_t size) { InitializeFrom(mem, size); }
-
+
explicit ThreadSafeArena(void* mem, size_t size,
const AllocationPolicy& policy) {
if (policy.IsDefault()) {
@@ -269,19 +269,19 @@ class PROTOBUF_EXPORT ThreadSafeArena {
bool record_allocs = collector && collector->RecordAllocs();
InitializeWithPolicy(mem, size, record_allocs, policy);
}
- }
-
- // Destructor deletes all owned heap allocated objects, and destructs objects
- // that have non-trivial destructors, except for proto2 message objects whose
- // destructors can be skipped. Also, frees all blocks except the initial block
- // if it was passed in.
+ }
+
+ // Destructor deletes all owned heap allocated objects, and destructs objects
+ // that have non-trivial destructors, except for proto2 message objects whose
+ // destructors can be skipped. Also, frees all blocks except the initial block
+ // if it was passed in.
~ThreadSafeArena();
-
- uint64 Reset();
-
- uint64 SpaceAllocated() const;
- uint64 SpaceUsed() const;
-
+
+ uint64 Reset();
+
+ uint64 SpaceAllocated() const;
+ uint64 SpaceUsed() const;
+
void* AllocateAligned(size_t n, const std::type_info* type) {
SerialArena* arena;
if (PROTOBUF_PREDICT_TRUE(GetSerialArenaFast(tag_and_id_, &arena))) {
@@ -290,7 +290,7 @@ class PROTOBUF_EXPORT ThreadSafeArena {
return AllocateAlignedFallback(n, type);
}
}
-
+
// This function allocates n bytes if the common happy case is true and
// returns true. Otherwise does nothing and returns false. This strange
// semantics is necessary to allow callers to program functions that only
@@ -303,19 +303,19 @@ class PROTOBUF_EXPORT ThreadSafeArena {
}
return false;
}
-
+
std::pair<void*, SerialArena::CleanupNode*> AllocateAlignedWithCleanup(
size_t n, const std::type_info* type);
- // Add object pointer and cleanup function pointer to the list.
- void AddCleanup(void* elem, void (*cleanup)(void*));
-
- private:
+ // Add object pointer and cleanup function pointer to the list.
+ void AddCleanup(void* elem, void (*cleanup)(void*));
+
+ private:
// Unique for each arena. Changes on Reset().
uint64 tag_and_id_;
// The LSB of tag_and_id_ indicates if allocs in this arena are recorded.
enum { kRecordAllocs = 1 };
-
+
intptr_t alloc_policy_ = 0; // Tagged pointer to AllocPolicy.
// The LSB of alloc_policy_ indicates if the user owns the initial block.
enum { kUserOwnedInitialBlock = 1 };
@@ -374,10 +374,10 @@ class PROTOBUF_EXPORT ThreadSafeArena {
if (PROTOBUF_PREDICT_TRUE(serial != NULL && serial->owner() == tc)) {
*arena = serial;
return true;
- }
+ }
return false;
}
-
+
PROTOBUF_NDEBUG_INLINE bool GetSerialArenaFromThreadCache(
uint64 lifecycle_id, SerialArena** arena) {
// If this thread already owns a block in this arena then try to use that.
@@ -391,7 +391,7 @@ class PROTOBUF_EXPORT ThreadSafeArena {
return false;
}
SerialArena* GetSerialArenaFallback(void* me);
-
+
template <typename Functor>
void PerSerialArena(Functor fn) {
// By omitting an Acquire barrier we ensure that any user code that doesn't
@@ -428,42 +428,42 @@ class PROTOBUF_EXPORT ThreadSafeArena {
// Next lifecycle ID available to this thread. We need to reserve a new
// batch, if `next_lifecycle_id & (kPerThreadIds - 1) == 0`.
uint64 next_lifecycle_id;
- // The ThreadCache is considered valid as long as this matches the
- // lifecycle_id of the arena being used.
+ // The ThreadCache is considered valid as long as this matches the
+ // lifecycle_id of the arena being used.
uint64 last_lifecycle_id_seen;
SerialArena* last_serial_arena;
- };
-
+ };
+
// Lifecycle_id can be highly contended variable in a situation of lots of
// arena creation. Make sure that other global variables are not sharing the
// cacheline.
#ifdef _MSC_VER
#pragma warning(disable : 4324)
-#endif
+#endif
struct alignas(64) CacheAlignedLifecycleIdGenerator {
std::atomic<LifecycleIdAtomic> id;
};
static CacheAlignedLifecycleIdGenerator lifecycle_id_generator_;
-#if defined(GOOGLE_PROTOBUF_NO_THREADLOCAL)
+#if defined(GOOGLE_PROTOBUF_NO_THREADLOCAL)
// Android ndk does not support __thread keyword so we use a custom thread
- // local storage class we implemented.
+ // local storage class we implemented.
// iOS also does not support the __thread keyword.
- static ThreadCache& thread_cache();
-#elif defined(PROTOBUF_USE_DLLS)
- // Thread local variables cannot be exposed through DLL interface but we can
- // wrap them in static functions.
- static ThreadCache& thread_cache();
-#else
+ static ThreadCache& thread_cache();
+#elif defined(PROTOBUF_USE_DLLS)
+ // Thread local variables cannot be exposed through DLL interface but we can
+ // wrap them in static functions.
+ static ThreadCache& thread_cache();
+#else
static PROTOBUF_THREAD_LOCAL ThreadCache thread_cache_;
- static ThreadCache& thread_cache() { return thread_cache_; }
-#endif
-
+ static ThreadCache& thread_cache() { return thread_cache_; }
+#endif
+
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ThreadSafeArena);
// All protos have pointers back to the arena hence Arena must have
// pointer stability.
ThreadSafeArena(ThreadSafeArena&&) = delete;
ThreadSafeArena& operator=(ThreadSafeArena&&) = delete;
-
+
public:
// kBlockHeaderSize is sizeof(Block), aligned up to the nearest multiple of 8
// to protect the invariant that pos is always at a multiple of 8.
@@ -474,12 +474,12 @@ class PROTOBUF_EXPORT ThreadSafeArena {
"kBlockHeaderSize must be a multiple of 8.");
static_assert(kSerialArenaSize % 8 == 0,
"kSerialArenaSize must be a multiple of 8.");
-};
-
-} // namespace internal
-} // namespace protobuf
+};
+
+} // namespace internal
+} // namespace protobuf
} // namespace google
-
+
#include <google/protobuf/port_undef.inc>
-#endif // GOOGLE_PROTOBUF_ARENA_IMPL_H__
+#endif // GOOGLE_PROTOBUF_ARENA_IMPL_H__
diff --git a/contrib/libs/protobuf/src/google/protobuf/arenastring.h b/contrib/libs/protobuf/src/google/protobuf/arenastring.h
index c8ee2395f8..65aafce21a 100644
--- a/contrib/libs/protobuf/src/google/protobuf/arenastring.h
+++ b/contrib/libs/protobuf/src/google/protobuf/arenastring.h
@@ -261,7 +261,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr {
const TProtoStringType* default_value, ArenaStringPtr* rhs, Arena* rhs_arena,
ArenaStringPtr* lhs, Arena* lhs_arena);
- // Frees storage (if not on an arena).
+ // Frees storage (if not on an arena).
void Destroy(const TProtoStringType* default_value, ::google::protobuf::Arena* arena);
void Destroy(EmptyDefault, ::google::protobuf::Arena* arena);
void Destroy(NonEmptyDefault, ::google::protobuf::Arena* arena);
@@ -297,7 +297,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr {
// If the value was donated, the contents are discarded.
TProtoStringType* MutableNoCopy(const TProtoStringType* default_value,
::google::protobuf::Arena* arena);
-
+
// Destroy the string. Assumes `arena == nullptr`.
void DestroyNoArena(const TProtoStringType* default_value);
@@ -396,9 +396,9 @@ inline TProtoStringType* ArenaStringPtr::MutableNoArenaNoDefault(
inline void ArenaStringPtr::DestroyNoArena(const TProtoStringType* default_value) {
if (!IsDefault(default_value)) {
DestroyNoArenaSlowPath();
- }
-}
-
+ }
+}
+
inline TProtoStringType* ArenaStringPtr::UnsafeMutablePointer() {
GOOGLE_DCHECK(!tagged_ptr_.IsTagged());
GOOGLE_DCHECK(tagged_ptr_.UnsafeGet() != nullptr);
@@ -406,10 +406,10 @@ inline TProtoStringType* ArenaStringPtr::UnsafeMutablePointer() {
}
-} // namespace internal
-} // namespace protobuf
+} // namespace internal
+} // namespace protobuf
} // namespace google
-
+
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_ARENASTRING_H__
diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor.cc b/contrib/libs/protobuf/src/google/protobuf/descriptor.cc
index 272e83518c..8b8d7fd9cf 100644
--- a/contrib/libs/protobuf/src/google/protobuf/descriptor.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/descriptor.cc
@@ -75,79 +75,79 @@
namespace google {
namespace protobuf {
-struct Symbol {
- enum Type {
- NULL_SYMBOL,
- MESSAGE,
- FIELD,
- ONEOF,
- ENUM,
- ENUM_VALUE,
- SERVICE,
- METHOD,
- PACKAGE
- };
- Type type;
- union {
- const Descriptor* descriptor;
- const FieldDescriptor* field_descriptor;
- const OneofDescriptor* oneof_descriptor;
- const EnumDescriptor* enum_descriptor;
- const EnumValueDescriptor* enum_value_descriptor;
- const ServiceDescriptor* service_descriptor;
- const MethodDescriptor* method_descriptor;
- const FileDescriptor* package_file_descriptor;
- };
-
+struct Symbol {
+ enum Type {
+ NULL_SYMBOL,
+ MESSAGE,
+ FIELD,
+ ONEOF,
+ ENUM,
+ ENUM_VALUE,
+ SERVICE,
+ METHOD,
+ PACKAGE
+ };
+ Type type;
+ union {
+ const Descriptor* descriptor;
+ const FieldDescriptor* field_descriptor;
+ const OneofDescriptor* oneof_descriptor;
+ const EnumDescriptor* enum_descriptor;
+ const EnumValueDescriptor* enum_value_descriptor;
+ const ServiceDescriptor* service_descriptor;
+ const MethodDescriptor* method_descriptor;
+ const FileDescriptor* package_file_descriptor;
+ };
+
inline Symbol() : type(NULL_SYMBOL) { descriptor = nullptr; }
- inline bool IsNull() const { return type == NULL_SYMBOL; }
- inline bool IsType() const { return type == MESSAGE || type == ENUM; }
- inline bool IsAggregate() const {
- return type == MESSAGE || type == PACKAGE || type == ENUM ||
- type == SERVICE;
- }
-
-#define CONSTRUCTOR(TYPE, TYPE_CONSTANT, FIELD) \
- inline explicit Symbol(const TYPE* value) { \
- type = TYPE_CONSTANT; \
- this->FIELD = value; \
- }
-
- CONSTRUCTOR(Descriptor, MESSAGE, descriptor)
- CONSTRUCTOR(FieldDescriptor, FIELD, field_descriptor)
- CONSTRUCTOR(OneofDescriptor, ONEOF, oneof_descriptor)
- CONSTRUCTOR(EnumDescriptor, ENUM, enum_descriptor)
- CONSTRUCTOR(EnumValueDescriptor, ENUM_VALUE, enum_value_descriptor)
- CONSTRUCTOR(ServiceDescriptor, SERVICE, service_descriptor)
- CONSTRUCTOR(MethodDescriptor, METHOD, method_descriptor)
- CONSTRUCTOR(FileDescriptor, PACKAGE, package_file_descriptor)
-#undef CONSTRUCTOR
-
- const FileDescriptor* GetFile() const {
- switch (type) {
- case NULL_SYMBOL:
+ inline bool IsNull() const { return type == NULL_SYMBOL; }
+ inline bool IsType() const { return type == MESSAGE || type == ENUM; }
+ inline bool IsAggregate() const {
+ return type == MESSAGE || type == PACKAGE || type == ENUM ||
+ type == SERVICE;
+ }
+
+#define CONSTRUCTOR(TYPE, TYPE_CONSTANT, FIELD) \
+ inline explicit Symbol(const TYPE* value) { \
+ type = TYPE_CONSTANT; \
+ this->FIELD = value; \
+ }
+
+ CONSTRUCTOR(Descriptor, MESSAGE, descriptor)
+ CONSTRUCTOR(FieldDescriptor, FIELD, field_descriptor)
+ CONSTRUCTOR(OneofDescriptor, ONEOF, oneof_descriptor)
+ CONSTRUCTOR(EnumDescriptor, ENUM, enum_descriptor)
+ CONSTRUCTOR(EnumValueDescriptor, ENUM_VALUE, enum_value_descriptor)
+ CONSTRUCTOR(ServiceDescriptor, SERVICE, service_descriptor)
+ CONSTRUCTOR(MethodDescriptor, METHOD, method_descriptor)
+ CONSTRUCTOR(FileDescriptor, PACKAGE, package_file_descriptor)
+#undef CONSTRUCTOR
+
+ const FileDescriptor* GetFile() const {
+ switch (type) {
+ case NULL_SYMBOL:
return nullptr;
- case MESSAGE:
- return descriptor->file();
- case FIELD:
- return field_descriptor->file();
- case ONEOF:
- return oneof_descriptor->containing_type()->file();
- case ENUM:
- return enum_descriptor->file();
- case ENUM_VALUE:
- return enum_value_descriptor->type()->file();
- case SERVICE:
- return service_descriptor->file();
- case METHOD:
- return method_descriptor->service()->file();
- case PACKAGE:
- return package_file_descriptor;
- }
+ case MESSAGE:
+ return descriptor->file();
+ case FIELD:
+ return field_descriptor->file();
+ case ONEOF:
+ return oneof_descriptor->containing_type()->file();
+ case ENUM:
+ return enum_descriptor->file();
+ case ENUM_VALUE:
+ return enum_value_descriptor->type()->file();
+ case SERVICE:
+ return service_descriptor->file();
+ case METHOD:
+ return method_descriptor->service()->file();
+ case PACKAGE:
+ return package_file_descriptor;
+ }
return nullptr;
- }
-};
-
+ }
+};
+
const FieldDescriptor::CppType
FieldDescriptor::kTypeToCppTypeMap[MAX_TYPE + 1] = {
static_cast<CppType>(0), // 0 is reserved for errors
@@ -241,15 +241,15 @@ const int FieldDescriptor::kLastReservedNumber;
namespace {
-// Note: I distrust ctype.h due to locales.
-char ToUpper(char ch) {
- return (ch >= 'a' && ch <= 'z') ? (ch - 'a' + 'A') : ch;
-}
-
-char ToLower(char ch) {
- return (ch >= 'A' && ch <= 'Z') ? (ch - 'A' + 'a') : ch;
-}
-
+// Note: I distrust ctype.h due to locales.
+char ToUpper(char ch) {
+ return (ch >= 'a' && ch <= 'z') ? (ch - 'a' + 'A') : ch;
+}
+
+char ToLower(char ch) {
+ return (ch >= 'A' && ch <= 'Z') ? (ch - 'A' + 'a') : ch;
+}
+
TProtoStringType ToCamelCase(const TProtoStringType& input, bool lower_first) {
bool capitalize_next = !lower_first;
TProtoStringType result;
@@ -267,7 +267,7 @@ TProtoStringType ToCamelCase(const TProtoStringType& input, bool lower_first) {
}
// Lower-case the first letter.
- if (lower_first && !result.empty()) {
+ if (lower_first && !result.empty()) {
result[0] = ToLower(result[0]);
}
@@ -275,108 +275,108 @@ TProtoStringType ToCamelCase(const TProtoStringType& input, bool lower_first) {
}
TProtoStringType ToJsonName(const TProtoStringType& input) {
- bool capitalize_next = false;
+ bool capitalize_next = false;
TProtoStringType result;
- result.reserve(input.size());
-
+ result.reserve(input.size());
+
for (char character : input) {
if (character == '_') {
- capitalize_next = true;
- } else if (capitalize_next) {
+ capitalize_next = true;
+ } else if (capitalize_next) {
result.push_back(ToUpper(character));
- capitalize_next = false;
- } else {
+ capitalize_next = false;
+ } else {
result.push_back(character);
- }
- }
-
- return result;
-}
-
+ }
+ }
+
+ return result;
+}
+
TProtoStringType EnumValueToPascalCase(const TProtoStringType& input) {
- bool next_upper = true;
+ bool next_upper = true;
TProtoStringType result;
- result.reserve(input.size());
-
+ result.reserve(input.size());
+
for (char character : input) {
if (character == '_') {
- next_upper = true;
- } else {
- if (next_upper) {
+ next_upper = true;
+ } else {
+ if (next_upper) {
result.push_back(ToUpper(character));
- } else {
+ } else {
result.push_back(ToLower(character));
- }
- next_upper = false;
- }
- }
-
- return result;
-}
-
-// Class to remove an enum prefix from enum values.
-class PrefixRemover {
- public:
- PrefixRemover(StringPiece prefix) {
- // Strip underscores and lower-case the prefix.
+ }
+ next_upper = false;
+ }
+ }
+
+ return result;
+}
+
+// Class to remove an enum prefix from enum values.
+class PrefixRemover {
+ public:
+ PrefixRemover(StringPiece prefix) {
+ // Strip underscores and lower-case the prefix.
for (char character : prefix) {
if (character != '_') {
prefix_ += ascii_tolower(character);
- }
- }
- }
-
- // Tries to remove the enum prefix from this enum value.
- // If this is not possible, returns the input verbatim.
+ }
+ }
+ }
+
+ // Tries to remove the enum prefix from this enum value.
+ // If this is not possible, returns the input verbatim.
TProtoStringType MaybeRemove(StringPiece str) {
- // We can't just lowercase and strip str and look for a prefix.
- // We need to properly recognize the difference between:
- //
- // enum Foo {
- // FOO_BAR_BAZ = 0;
- // FOO_BARBAZ = 1;
- // }
- //
- // This is acceptable (though perhaps not advisable) because even when
- // we PascalCase, these two will still be distinct (BarBaz vs. Barbaz).
- size_t i, j;
-
- // Skip past prefix_ in str if we can.
- for (i = 0, j = 0; i < str.size() && j < prefix_.size(); i++) {
- if (str[i] == '_') {
- continue;
- }
-
- if (ascii_tolower(str[i]) != prefix_[j++]) {
+ // We can't just lowercase and strip str and look for a prefix.
+ // We need to properly recognize the difference between:
+ //
+ // enum Foo {
+ // FOO_BAR_BAZ = 0;
+ // FOO_BARBAZ = 1;
+ // }
+ //
+ // This is acceptable (though perhaps not advisable) because even when
+ // we PascalCase, these two will still be distinct (BarBaz vs. Barbaz).
+ size_t i, j;
+
+ // Skip past prefix_ in str if we can.
+ for (i = 0, j = 0; i < str.size() && j < prefix_.size(); i++) {
+ if (str[i] == '_') {
+ continue;
+ }
+
+ if (ascii_tolower(str[i]) != prefix_[j++]) {
return TProtoStringType(str);
- }
- }
-
- // If we didn't make it through the prefix, we've failed to strip the
- // prefix.
- if (j < prefix_.size()) {
+ }
+ }
+
+ // If we didn't make it through the prefix, we've failed to strip the
+ // prefix.
+ if (j < prefix_.size()) {
return TProtoStringType(str);
- }
-
- // Skip underscores between prefix and further characters.
- while (i < str.size() && str[i] == '_') {
- i++;
- }
-
- // Enum label can't be the empty string.
- if (i == str.size()) {
+ }
+
+ // Skip underscores between prefix and further characters.
+ while (i < str.size() && str[i] == '_') {
+ i++;
+ }
+
+ // Enum label can't be the empty string.
+ if (i == str.size()) {
return TProtoStringType(str);
- }
-
- // We successfully stripped the prefix.
- str.remove_prefix(i);
+ }
+
+ // We successfully stripped the prefix.
+ str.remove_prefix(i);
return TProtoStringType(str);
- }
-
- private:
+ }
+
+ private:
TProtoStringType prefix_;
-};
-
+};
+
// A DescriptorPool contains a bunch of hash-maps to implement the
// various Find*By*() methods. Since hashtable lookups are O(1), it's
// most efficient to construct a fixed set of large hash-maps used by
@@ -471,7 +471,7 @@ std::set<TProtoStringType>* NewAllowedProto3Extendee() {
auto allowed_proto3_extendees = new std::set<TProtoStringType>;
const char* kOptionNames[] = {
"FileOptions", "MessageOptions", "FieldOptions", "EnumOptions",
- "EnumValueOptions", "ServiceOptions", "MethodOptions", "OneofOptions"};
+ "EnumValueOptions", "ServiceOptions", "MethodOptions", "OneofOptions"};
for (const char* option_name : kOptionNames) {
// descriptor.proto has a different package name in opensource. We allow
// both so the opensource protocol compiler can also compile internal
@@ -625,9 +625,9 @@ class DescriptorPool::Tables {
TProtoStringType* AllocateEmptyString();
// Allocate a internal::call_once which will be destroyed when the pool is
- // destroyed.
+ // destroyed.
internal::once_flag* AllocateOnceDynamic();
-
+
// Allocate a protocol message object. Some older versions of GCC have
// trouble understanding explicit template instantiations in some cases, so
// in those cases we have to pass a dummy pointer of the right type as the
@@ -653,20 +653,20 @@ class DescriptorPool::Tables {
struct CheckPoint {
explicit CheckPoint(const Tables* tables)
- : strings_before_checkpoint(tables->strings_.size()),
- messages_before_checkpoint(tables->messages_.size()),
- once_dynamics_before_checkpoint(tables->once_dynamics_.size()),
- file_tables_before_checkpoint(tables->file_tables_.size()),
- allocations_before_checkpoint(tables->allocations_.size()),
- pending_symbols_before_checkpoint(
- tables->symbols_after_checkpoint_.size()),
- pending_files_before_checkpoint(
- tables->files_after_checkpoint_.size()),
- pending_extensions_before_checkpoint(
- tables->extensions_after_checkpoint_.size()) {}
+ : strings_before_checkpoint(tables->strings_.size()),
+ messages_before_checkpoint(tables->messages_.size()),
+ once_dynamics_before_checkpoint(tables->once_dynamics_.size()),
+ file_tables_before_checkpoint(tables->file_tables_.size()),
+ allocations_before_checkpoint(tables->allocations_.size()),
+ pending_symbols_before_checkpoint(
+ tables->symbols_after_checkpoint_.size()),
+ pending_files_before_checkpoint(
+ tables->files_after_checkpoint_.size()),
+ pending_extensions_before_checkpoint(
+ tables->extensions_after_checkpoint_.size()) {}
int strings_before_checkpoint;
int messages_before_checkpoint;
- int once_dynamics_before_checkpoint;
+ int once_dynamics_before_checkpoint;
int file_tables_before_checkpoint;
int allocations_before_checkpoint;
int pending_symbols_before_checkpoint;
@@ -862,7 +862,7 @@ void DescriptorPool::Tables::RollbackToLastCheckpoint() {
strings_.resize(checkpoint.strings_before_checkpoint);
messages_.resize(checkpoint.messages_before_checkpoint);
- once_dynamics_.resize(checkpoint.once_dynamics_before_checkpoint);
+ once_dynamics_.resize(checkpoint.once_dynamics_before_checkpoint);
file_tables_.resize(checkpoint.file_tables_before_checkpoint);
allocations_.resize(checkpoint.allocations_before_checkpoint);
checkpoints_.pop_back();
@@ -1063,8 +1063,8 @@ inline const FieldDescriptor* DescriptorPool::Tables::FindExtension(
}
inline void DescriptorPool::Tables::FindAllExtensions(
- const Descriptor* extendee,
- std::vector<const FieldDescriptor*>* out) const {
+ const Descriptor* extendee,
+ std::vector<const FieldDescriptor*>* out) const {
ExtensionsGroupedByDescriptorMap::const_iterator it =
extensions_.lower_bound(std::make_pair(extendee, 0));
for (; it != extensions_.end() && it->first.first == extendee; ++it) {
@@ -1176,9 +1176,9 @@ TProtoStringType* DescriptorPool::Tables::AllocateString(StringPiece value) {
TProtoStringType* DescriptorPool::Tables::AllocateEmptyString() {
TProtoStringType* result = new TProtoStringType();
strings_.emplace_back(result);
- return result;
-}
-
+ return result;
+}
+
internal::once_flag* DescriptorPool::Tables::AllocateOnceDynamic() {
internal::once_flag* result = new internal::once_flag();
once_dynamics_.emplace_back(result);
@@ -1542,8 +1542,8 @@ const FieldDescriptor* DescriptorPool::FindExtensionByPrintableName(
}
void DescriptorPool::FindAllExtensions(
- const Descriptor* extendee,
- std::vector<const FieldDescriptor*>* out) const {
+ const Descriptor* extendee,
+ std::vector<const FieldDescriptor*>* out) const {
MutexLockMaybe lock(mutex_);
if (fallback_database_ != nullptr) {
tables_->known_bad_symbols_.clear();
@@ -2299,55 +2299,55 @@ bool RetrieveOptionsAssumingRightPool(
return !option_entries->empty();
}
-// Used by each of the option formatters.
-bool RetrieveOptions(int depth, const Message& options,
- const DescriptorPool* pool,
+// Used by each of the option formatters.
+bool RetrieveOptions(int depth, const Message& options,
+ const DescriptorPool* pool,
std::vector<TProtoStringType>* option_entries) {
- // When printing custom options for a descriptor, we must use an options
- // message built on top of the same DescriptorPool where the descriptor
- // is coming from. This is to ensure we are interpreting custom options
- // against the right pool.
- if (options.GetDescriptor()->file()->pool() == pool) {
- return RetrieveOptionsAssumingRightPool(depth, options, option_entries);
- } else {
- const Descriptor* option_descriptor =
- pool->FindMessageTypeByName(options.GetDescriptor()->full_name());
+ // When printing custom options for a descriptor, we must use an options
+ // message built on top of the same DescriptorPool where the descriptor
+ // is coming from. This is to ensure we are interpreting custom options
+ // against the right pool.
+ if (options.GetDescriptor()->file()->pool() == pool) {
+ return RetrieveOptionsAssumingRightPool(depth, options, option_entries);
+ } else {
+ const Descriptor* option_descriptor =
+ pool->FindMessageTypeByName(options.GetDescriptor()->full_name());
if (option_descriptor == nullptr) {
// descriptor.proto is not in the pool. This means no custom options are
// used so we are safe to proceed with the compiled options message type.
- return RetrieveOptionsAssumingRightPool(depth, options, option_entries);
+ return RetrieveOptionsAssumingRightPool(depth, options, option_entries);
}
- DynamicMessageFactory factory;
+ DynamicMessageFactory factory;
std::unique_ptr<Message> dynamic_options(
- factory.GetPrototype(option_descriptor)->New());
- if (dynamic_options->ParseFromString(options.SerializeAsString())) {
- return RetrieveOptionsAssumingRightPool(depth, *dynamic_options,
- option_entries);
- } else {
- GOOGLE_LOG(ERROR) << "Found invalid proto option data for: "
- << options.GetDescriptor()->full_name();
- return RetrieveOptionsAssumingRightPool(depth, options, option_entries);
- }
+ factory.GetPrototype(option_descriptor)->New());
+ if (dynamic_options->ParseFromString(options.SerializeAsString())) {
+ return RetrieveOptionsAssumingRightPool(depth, *dynamic_options,
+ option_entries);
+ } else {
+ GOOGLE_LOG(ERROR) << "Found invalid proto option data for: "
+ << options.GetDescriptor()->full_name();
+ return RetrieveOptionsAssumingRightPool(depth, options, option_entries);
+ }
}
}
// Formats options that all appear together in brackets. Does not include
// brackets.
-bool FormatBracketedOptions(int depth, const Message& options,
+bool FormatBracketedOptions(int depth, const Message& options,
const DescriptorPool* pool, TProtoStringType* output) {
std::vector<TProtoStringType> all_options;
- if (RetrieveOptions(depth, options, pool, &all_options)) {
+ if (RetrieveOptions(depth, options, pool, &all_options)) {
output->append(Join(all_options, ", "));
}
return !all_options.empty();
}
// Formats options one per line
-bool FormatLineOptions(int depth, const Message& options,
+bool FormatLineOptions(int depth, const Message& options,
const DescriptorPool* pool, TProtoStringType* output) {
TProtoStringType prefix(depth * 2, ' ');
std::vector<TProtoStringType> all_options;
- if (RetrieveOptions(depth, options, pool, &all_options)) {
+ if (RetrieveOptions(depth, options, pool, &all_options)) {
for (const TProtoStringType& option : all_options) {
strings::SubstituteAndAppend(output, "$0option $1;\n", prefix, option);
}
@@ -2690,7 +2690,7 @@ void FieldDescriptor::DebugString(
if (is_map() || real_containing_oneof() ||
(is_optional() && !has_optional_keyword())) {
label.clear();
- }
+ }
SourceLocationCommentPrinter comment_printer(this, prefix,
debug_string_options);
@@ -2706,21 +2706,21 @@ void FieldDescriptor::DebugString(
strings::SubstituteAndAppend(contents, " [default = $0",
DefaultValueAsString(true));
}
- if (has_json_name_) {
- if (!bracketed) {
- bracketed = true;
+ if (has_json_name_) {
+ if (!bracketed) {
+ bracketed = true;
contents->append(" [");
- } else {
- contents->append(", ");
- }
- contents->append("json_name = \"");
- contents->append(CEscape(json_name()));
- contents->append("\"");
- }
+ } else {
+ contents->append(", ");
+ }
+ contents->append("json_name = \"");
+ contents->append(CEscape(json_name()));
+ contents->append("\"");
+ }
TProtoStringType formatted_options;
- if (FormatBracketedOptions(depth, options(), file()->pool(),
- &formatted_options)) {
+ if (FormatBracketedOptions(depth, options(), file()->pool(),
+ &formatted_options)) {
contents->append(bracketed ? ", " : " [");
bracketed = true;
contents->append(formatted_options);
@@ -2764,15 +2764,15 @@ void OneofDescriptor::DebugString(
SourceLocationCommentPrinter comment_printer(this, prefix,
debug_string_options);
comment_printer.AddPreComment(contents);
- strings::SubstituteAndAppend(contents, "$0oneof $1 {", prefix, name());
+ strings::SubstituteAndAppend(contents, "$0oneof $1 {", prefix, name());
- FormatLineOptions(depth, options(), containing_type()->file()->pool(),
- contents);
+ FormatLineOptions(depth, options(), containing_type()->file()->pool(),
+ contents);
if (debug_string_options.elide_oneof_body) {
contents->append(" ... }\n");
} else {
- contents->append("\n");
+ contents->append("\n");
for (int i = 0; i < field_count(); i++) {
field(i)->DebugString(depth, contents, debug_string_options);
}
@@ -2865,8 +2865,8 @@ void EnumValueDescriptor::DebugString(
strings::SubstituteAndAppend(contents, "$0$1 = $2", prefix, name(), number());
TProtoStringType formatted_options;
- if (FormatBracketedOptions(depth, options(), type()->file()->pool(),
- &formatted_options)) {
+ if (FormatBracketedOptions(depth, options(), type()->file()->pool(),
+ &formatted_options)) {
strings::SubstituteAndAppend(contents, " [$0]", formatted_options);
}
contents->append(";\n");
@@ -2934,8 +2934,8 @@ void MethodDescriptor::DebugString(
client_streaming() ? "stream " : "", server_streaming() ? "stream " : "");
TProtoStringType formatted_options;
- if (FormatLineOptions(depth, options(), service()->file()->pool(),
- &formatted_options)) {
+ if (FormatLineOptions(depth, options(), service()->file()->pool(),
+ &formatted_options)) {
strings::SubstituteAndAppend(contents, " {\n$0$1}\n", formatted_options,
prefix);
} else {
@@ -3211,7 +3211,7 @@ class DescriptorBuilder {
// This implements the body of FindSymbolNotEnforcingDeps().
Symbol FindSymbolNotEnforcingDepsHelper(const DescriptorPool* pool,
const TProtoStringType& name,
- bool build_it = true);
+ bool build_it = true);
// Like FindSymbol(), but looks up the name relative to some other symbol
// name. This first searches siblings of relative_to, then siblings of its
@@ -3229,17 +3229,17 @@ class DescriptorBuilder {
// check that it receives the type of symbol it was expecting.
enum ResolveMode { LOOKUP_ALL, LOOKUP_TYPES };
Symbol LookupSymbol(const TProtoStringType& name, const TProtoStringType& relative_to,
- DescriptorPool::PlaceholderType placeholder_type =
- DescriptorPool::PLACEHOLDER_MESSAGE,
- ResolveMode resolve_mode = LOOKUP_ALL,
- bool build_it = true);
+ DescriptorPool::PlaceholderType placeholder_type =
+ DescriptorPool::PLACEHOLDER_MESSAGE,
+ ResolveMode resolve_mode = LOOKUP_ALL,
+ bool build_it = true);
// Like LookupSymbol() but will not return a placeholder even if
// AllowUnknownDependencies() has been used.
Symbol LookupSymbolNoPlaceholder(const TProtoStringType& name,
const TProtoStringType& relative_to,
- ResolveMode resolve_mode = LOOKUP_ALL,
- bool build_it = true);
+ ResolveMode resolve_mode = LOOKUP_ALL,
+ bool build_it = true);
// Calls tables_->AddSymbol() and records an error if it fails. Returns
// true if successful or false if failed, though most callers can ignore
@@ -3319,8 +3319,8 @@ class DescriptorBuilder {
EnumDescriptor::ReservedRange* result);
void BuildOneof(const OneofDescriptorProto& proto, Descriptor* parent,
OneofDescriptor* result);
- void CheckEnumValueUniqueness(const EnumDescriptorProto& proto,
- const EnumDescriptor* result);
+ void CheckEnumValueUniqueness(const EnumDescriptorProto& proto,
+ const EnumDescriptor* result);
void BuildEnum(const EnumDescriptorProto& proto, const Descriptor* parent,
EnumDescriptor* result);
void BuildEnumValue(const EnumValueDescriptorProto& proto,
@@ -3343,8 +3343,8 @@ class DescriptorBuilder {
void CrossLinkMessage(Descriptor* message, const DescriptorProto& proto);
void CrossLinkField(FieldDescriptor* field,
const FieldDescriptorProto& proto);
- void CrossLinkExtensionRange(Descriptor::ExtensionRange* range,
- const DescriptorProto::ExtensionRange& proto);
+ void CrossLinkExtensionRange(Descriptor::ExtensionRange* range,
+ const DescriptorProto::ExtensionRange& proto);
void CrossLinkEnum(EnumDescriptor* enum_type,
const EnumDescriptorProto& proto);
void CrossLinkEnumValue(EnumValueDescriptor* enum_value,
@@ -3399,10 +3399,10 @@ class DescriptorBuilder {
// in unknown_fields to check if field innermost_field is set on the
// innermost message. Returns false and sets an error if so.
bool ExamineIfOptionIsSet(
- std::vector<const FieldDescriptor*>::const_iterator
- intermediate_fields_iter,
- std::vector<const FieldDescriptor*>::const_iterator
- intermediate_fields_end,
+ std::vector<const FieldDescriptor*>::const_iterator
+ intermediate_fields_iter,
+ std::vector<const FieldDescriptor*>::const_iterator
+ intermediate_fields_end,
const FieldDescriptor* innermost_field,
const TProtoStringType& debug_msg_name,
const UnknownFieldSet& unknown_fields);
@@ -3545,8 +3545,8 @@ class DescriptorBuilder {
void DetectMapConflicts(const Descriptor* message,
const DescriptorProto& proto);
- void ValidateJSType(FieldDescriptor* field,
- const FieldDescriptorProto& proto);
+ void ValidateJSType(FieldDescriptor* field,
+ const FieldDescriptorProto& proto);
};
const FileDescriptor* DescriptorPool::BuildFile(
@@ -3671,8 +3671,8 @@ void DescriptorBuilder::AddWarning(
bool DescriptorBuilder::IsInPackage(const FileDescriptor* file,
const TProtoStringType& package_name) {
return HasPrefixString(file->package(), package_name) &&
- (file->package().size() == package_name.size() ||
- file->package()[package_name.size()] == '.');
+ (file->package().size() == package_name.size() ||
+ file->package()[package_name.size()] == '.');
}
void DescriptorBuilder::RecordPublicDependencies(const FileDescriptor* file) {
@@ -3695,14 +3695,14 @@ Symbol DescriptorBuilder::FindSymbolNotEnforcingDepsHelper(
}
if (result.IsNull()) {
- // With lazily_build_dependencies_, a symbol lookup at cross link time is
- // not guaranteed to be successful. In most cases, build_it will be false,
- // which intentionally prevents us from building an import until it's
- // actually needed. In some cases, like registering an extension, we want
- // to build the file containing the symbol, and build_it will be set.
- // Also, build_it will be true when !lazily_build_dependencies_, to provide
- // better error reporting of missing dependencies.
- if (build_it && pool->TryFindSymbolInFallbackDatabase(name)) {
+ // With lazily_build_dependencies_, a symbol lookup at cross link time is
+ // not guaranteed to be successful. In most cases, build_it will be false,
+ // which intentionally prevents us from building an import until it's
+ // actually needed. In some cases, like registering an extension, we want
+ // to build the file containing the symbol, and build_it will be set.
+ // Also, build_it will be true when !lazily_build_dependencies_, to provide
+ // better error reporting of missing dependencies.
+ if (build_it && pool->TryFindSymbolInFallbackDatabase(name)) {
result = pool->tables_->FindSymbol(name);
}
}
@@ -3711,7 +3711,7 @@ Symbol DescriptorBuilder::FindSymbolNotEnforcingDepsHelper(
}
Symbol DescriptorBuilder::FindSymbolNotEnforcingDeps(const TProtoStringType& name,
- bool build_it) {
+ bool build_it) {
Symbol result = FindSymbolNotEnforcingDepsHelper(pool_, name, build_it);
// Only find symbols which were defined in this file or one of its
// dependencies.
@@ -3723,12 +3723,12 @@ Symbol DescriptorBuilder::FindSymbolNotEnforcingDeps(const TProtoStringType& nam
}
Symbol DescriptorBuilder::FindSymbol(const TProtoStringType& name, bool build_it) {
- Symbol result = FindSymbolNotEnforcingDeps(name, build_it);
+ Symbol result = FindSymbolNotEnforcingDeps(name, build_it);
if (result.IsNull()) return result;
if (!pool_->enforce_dependencies_) {
- // Hack for CompilerUpgrader, and also used for lazily_build_dependencies_
+ // Hack for CompilerUpgrader, and also used for lazily_build_dependencies_
return result;
}
@@ -3748,8 +3748,8 @@ Symbol DescriptorBuilder::FindSymbol(const TProtoStringType& name, bool build_it
// dependency also defines the same package. We can't really rule out this
// symbol unless none of the dependencies define it.
if (IsInPackage(file_, name)) return result;
- for (std::set<const FileDescriptor*>::const_iterator it =
- dependencies_.begin();
+ for (std::set<const FileDescriptor*>::const_iterator it =
+ dependencies_.begin();
it != dependencies_.end(); ++it) {
// Note: A dependency may be nullptr if it was not found or had errors.
if (*it != nullptr && IsInPackage(*it, name)) return result;
@@ -3767,9 +3767,9 @@ Symbol DescriptorBuilder::LookupSymbolNoPlaceholder(
possible_undeclared_dependency_ = nullptr;
undefine_resolved_name_.clear();
- if (!name.empty() && name[0] == '.') {
+ if (!name.empty() && name[0] == '.') {
// Fully-qualified name.
- return FindSymbol(name.substr(1), build_it);
+ return FindSymbol(name.substr(1), build_it);
}
// If name is something like "Foo.Bar.baz", and symbols named "Foo" are
@@ -3797,7 +3797,7 @@ Symbol DescriptorBuilder::LookupSymbolNoPlaceholder(
// Chop off the last component of the scope.
TProtoStringType::size_type dot_pos = scope_to_try.find_last_of('.');
if (dot_pos == TProtoStringType::npos) {
- return FindSymbol(name, build_it);
+ return FindSymbol(name, build_it);
} else {
scope_to_try.erase(dot_pos);
}
@@ -3806,7 +3806,7 @@ Symbol DescriptorBuilder::LookupSymbolNoPlaceholder(
TProtoStringType::size_type old_size = scope_to_try.size();
scope_to_try.append(1, '.');
scope_to_try.append(first_part_of_name);
- Symbol result = FindSymbol(scope_to_try, build_it);
+ Symbol result = FindSymbol(scope_to_try, build_it);
if (!result.IsNull()) {
if (first_part_of_name.size() < name.size()) {
// name is a compound symbol, of which we only found the first part.
@@ -3814,7 +3814,7 @@ Symbol DescriptorBuilder::LookupSymbolNoPlaceholder(
if (result.IsAggregate()) {
scope_to_try.append(name, first_part_of_name.size(),
name.size() - first_part_of_name.size());
- result = FindSymbol(scope_to_try, build_it);
+ result = FindSymbol(scope_to_try, build_it);
if (result.IsNull()) {
undefine_resolved_name_ = scope_to_try;
}
@@ -3838,49 +3838,49 @@ Symbol DescriptorBuilder::LookupSymbolNoPlaceholder(
Symbol DescriptorBuilder::LookupSymbol(
const TProtoStringType& name, const TProtoStringType& relative_to,
- DescriptorPool::PlaceholderType placeholder_type, ResolveMode resolve_mode,
- bool build_it) {
- Symbol result =
- LookupSymbolNoPlaceholder(name, relative_to, resolve_mode, build_it);
+ DescriptorPool::PlaceholderType placeholder_type, ResolveMode resolve_mode,
+ bool build_it) {
+ Symbol result =
+ LookupSymbolNoPlaceholder(name, relative_to, resolve_mode, build_it);
if (result.IsNull() && pool_->allow_unknown_) {
// Not found, but AllowUnknownDependencies() is enabled. Return a
// placeholder instead.
- result = pool_->NewPlaceholderWithMutexHeld(name, placeholder_type);
+ result = pool_->NewPlaceholderWithMutexHeld(name, placeholder_type);
}
return result;
}
static bool ValidateQualifiedName(StringPiece name) {
- bool last_was_period = false;
-
+ bool last_was_period = false;
+
for (char character : name) {
- // I don't trust isalnum() due to locales. :(
+ // I don't trust isalnum() due to locales. :(
if (('a' <= character && character <= 'z') ||
('A' <= character && character <= 'Z') ||
('0' <= character && character <= '9') || (character == '_')) {
- last_was_period = false;
+ last_was_period = false;
} else if (character == '.') {
- if (last_was_period) return false;
- last_was_period = true;
- } else {
- return false;
- }
- }
-
- return !name.empty() && !last_was_period;
-}
-
+ if (last_was_period) return false;
+ last_was_period = true;
+ } else {
+ return false;
+ }
+ }
+
+ return !name.empty() && !last_was_period;
+}
+
Symbol DescriptorPool::NewPlaceholder(StringPiece name,
- PlaceholderType placeholder_type) const {
- MutexLockMaybe lock(mutex_);
- return NewPlaceholderWithMutexHeld(name, placeholder_type);
-}
-
-Symbol DescriptorPool::NewPlaceholderWithMutexHeld(
+ PlaceholderType placeholder_type) const {
+ MutexLockMaybe lock(mutex_);
+ return NewPlaceholderWithMutexHeld(name, placeholder_type);
+}
+
+Symbol DescriptorPool::NewPlaceholderWithMutexHeld(
StringPiece name, PlaceholderType placeholder_type) const {
- if (mutex_) {
- mutex_->AssertHeld();
- }
+ if (mutex_) {
+ mutex_->AssertHeld();
+ }
// Compute names.
const TProtoStringType* placeholder_full_name;
const TProtoStringType* placeholder_name;
@@ -3906,7 +3906,7 @@ Symbol DescriptorPool::NewPlaceholderWithMutexHeld(
}
// Create the placeholders.
- FileDescriptor* placeholder_file = NewPlaceholderFileWithMutexHeld(
+ FileDescriptor* placeholder_file = NewPlaceholderFileWithMutexHeld(
*placeholder_full_name + ".placeholder.proto");
placeholder_file->package_ = placeholder_package;
@@ -3976,27 +3976,27 @@ Symbol DescriptorPool::NewPlaceholderWithMutexHeld(
FileDescriptor* DescriptorPool::NewPlaceholderFile(
StringPiece name) const {
- MutexLockMaybe lock(mutex_);
- return NewPlaceholderFileWithMutexHeld(name);
-}
-
-FileDescriptor* DescriptorPool::NewPlaceholderFileWithMutexHeld(
+ MutexLockMaybe lock(mutex_);
+ return NewPlaceholderFileWithMutexHeld(name);
+}
+
+FileDescriptor* DescriptorPool::NewPlaceholderFileWithMutexHeld(
StringPiece name) const {
- if (mutex_) {
- mutex_->AssertHeld();
- }
+ if (mutex_) {
+ mutex_->AssertHeld();
+ }
FileDescriptor* placeholder = tables_->Allocate<FileDescriptor>();
memset(static_cast<void*>(placeholder), 0, sizeof(*placeholder));
placeholder->name_ = tables_->AllocateString(name);
placeholder->package_ = &internal::GetEmptyString();
- placeholder->pool_ = this;
+ placeholder->pool_ = this;
placeholder->options_ = &FileOptions::default_instance();
placeholder->tables_ = &FileDescriptorTables::GetEmptyInstance();
placeholder->source_code_info_ = &SourceCodeInfo::default_instance();
placeholder->is_placeholder_ = true;
placeholder->syntax_ = FileDescriptor::SYNTAX_UNKNOWN;
- placeholder->finished_building_ = true;
+ placeholder->finished_building_ = true;
// All other fields are zero or nullptr.
return placeholder;
@@ -4016,14 +4016,14 @@ bool DescriptorBuilder::AddSymbol(const TProtoStringType& full_name,
}
if (tables_->AddSymbol(full_name, symbol)) {
if (!file_tables_->AddAliasUnderParent(parent, name, symbol)) {
- // This is only possible if there was already an error adding something of
- // the same name.
- if (!had_errors_) {
+ // This is only possible if there was already an error adding something of
+ // the same name.
+ if (!had_errors_) {
GOOGLE_LOG(DFATAL) << "\"" << full_name
<< "\" not previously defined in "
- "symbols_by_name_, but was defined in "
- "symbols_by_parent_; this shouldn't be possible.";
- }
+ "symbols_by_name_, but was defined in "
+ "symbols_by_parent_; this shouldn't be possible.";
+ }
return false;
}
return true;
@@ -4289,22 +4289,22 @@ const FileDescriptor* DescriptorBuilder::BuildFile(
}
}
- // If we have a fallback_database_, and we aren't doing lazy import building,
- // attempt to load all dependencies now, before checkpointing tables_. This
- // avoids confusion with recursive checkpoints.
- if (!pool_->lazily_build_dependencies_) {
+ // If we have a fallback_database_, and we aren't doing lazy import building,
+ // attempt to load all dependencies now, before checkpointing tables_. This
+ // avoids confusion with recursive checkpoints.
+ if (!pool_->lazily_build_dependencies_) {
if (pool_->fallback_database_ != nullptr) {
- tables_->pending_files_.push_back(proto.name());
- for (int i = 0; i < proto.dependency_size(); i++) {
+ tables_->pending_files_.push_back(proto.name());
+ for (int i = 0; i < proto.dependency_size(); i++) {
if (tables_->FindFile(proto.dependency(i)) == nullptr &&
(pool_->underlay_ == nullptr ||
pool_->underlay_->FindFileByName(proto.dependency(i)) ==
nullptr)) {
- // We don't care what this returns since we'll find out below anyway.
- pool_->TryFindFileInFallbackDatabase(proto.dependency(i));
- }
+ // We don't care what this returns since we'll find out below anyway.
+ pool_->TryFindFileInFallbackDatabase(proto.dependency(i));
+ }
}
- tables_->pending_files_.pop_back();
+ tables_->pending_files_.pop_back();
}
}
@@ -4330,7 +4330,7 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl(
file_ = result;
result->is_placeholder_ = false;
- result->finished_building_ = false;
+ result->finished_building_ = false;
SourceCodeInfo* info = nullptr;
if (proto.has_source_code_info()) {
info = tables_->AllocateMessage<SourceCodeInfo>();
@@ -4394,19 +4394,19 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl(
std::set<TProtoStringType> seen_dependencies;
result->dependency_count_ = proto.dependency_size();
result->dependencies_ =
- tables_->AllocateArray<const FileDescriptor*>(proto.dependency_size());
- if (pool_->lazily_build_dependencies_) {
- result->dependencies_once_ = tables_->AllocateOnceDynamic();
- result->dependencies_names_ =
+ tables_->AllocateArray<const FileDescriptor*>(proto.dependency_size());
+ if (pool_->lazily_build_dependencies_) {
+ result->dependencies_once_ = tables_->AllocateOnceDynamic();
+ result->dependencies_names_ =
tables_->AllocateArray<const TProtoStringType*>(proto.dependency_size());
- if (proto.dependency_size() > 0) {
- memset(result->dependencies_names_, 0,
- sizeof(*result->dependencies_names_) * proto.dependency_size());
- }
- } else {
+ if (proto.dependency_size() > 0) {
+ memset(result->dependencies_names_, 0,
+ sizeof(*result->dependencies_names_) * proto.dependency_size());
+ }
+ } else {
result->dependencies_once_ = nullptr;
result->dependencies_names_ = nullptr;
- }
+ }
unused_dependency_.clear();
std::set<int> weak_deps;
for (int i = 0; i < proto.weak_dependency_size(); ++i) {
@@ -4422,13 +4422,13 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl(
dependency = pool_->underlay_->FindFileByName(proto.dependency(i));
}
- if (dependency == result) {
- // Recursive import. dependency/result is not fully initialized, and it's
- // dangerous to try to do anything with it. The recursive import error
- // will be detected and reported in DescriptorBuilder::BuildFile().
+ if (dependency == result) {
+ // Recursive import. dependency/result is not fully initialized, and it's
+ // dangerous to try to do anything with it. The recursive import error
+ // will be detected and reported in DescriptorBuilder::BuildFile().
return nullptr;
- }
-
+ }
+
if (dependency == nullptr) {
if (!pool_->lazily_build_dependencies_) {
if (pool_->allow_unknown_ ||
@@ -4436,8 +4436,8 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl(
dependency =
pool_->NewPlaceholderFileWithMutexHeld(proto.dependency(i));
} else {
- AddImportError(proto, i);
- }
+ AddImportError(proto, i);
+ }
}
} else {
// Add to unused_dependency_ to track unused imported files.
@@ -4451,10 +4451,10 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl(
}
result->dependencies_[i] = dependency;
- if (pool_->lazily_build_dependencies_ && !dependency) {
- result->dependencies_names_[i] =
- tables_->AllocateString(proto.dependency(i));
- }
+ if (pool_->lazily_build_dependencies_ && !dependency) {
+ result->dependencies_names_[i] =
+ tables_->AllocateString(proto.dependency(i));
+ }
}
// Check public dependencies.
@@ -4467,12 +4467,12 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl(
if (index >= 0 && index < proto.dependency_size()) {
result->public_dependencies_[public_dependency_count++] = index;
// Do not track unused imported files for public import.
- // Calling dependency(i) builds that file when doing lazy imports,
- // need to avoid doing this. Unused dependency detection isn't done
- // when building lazily, anyways.
- if (!pool_->lazily_build_dependencies_) {
- unused_dependency_.erase(result->dependency(index));
- }
+ // Calling dependency(i) builds that file when doing lazy imports,
+ // need to avoid doing this. Unused dependency detection isn't done
+ // when building lazily, anyways.
+ if (!pool_->lazily_build_dependencies_) {
+ unused_dependency_.erase(result->dependency(index));
+ }
} else {
AddError(proto.name(), proto, DescriptorPool::ErrorCollector::OTHER,
"Invalid public dependency index.");
@@ -4482,13 +4482,13 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl(
// Build dependency set
dependencies_.clear();
- // We don't/can't do proper dependency error checking when
- // lazily_build_dependencies_, and calling dependency(i) will force
- // a dependency to be built, which we don't want.
- if (!pool_->lazily_build_dependencies_) {
- for (int i = 0; i < result->dependency_count(); i++) {
- RecordPublicDependencies(result->dependency(i));
- }
+ // We don't/can't do proper dependency error checking when
+ // lazily_build_dependencies_, and calling dependency(i) will force
+ // a dependency to be built, which we don't want.
+ if (!pool_->lazily_build_dependencies_) {
+ for (int i = 0; i < result->dependency_count(); i++) {
+ RecordPublicDependencies(result->dependency(i));
+ }
}
// Check weak dependencies.
@@ -4539,9 +4539,9 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl(
}
}
- // Validate options. See comments at InternalSetLazilyBuildDependencies about
- // error checking and lazy import building.
- if (!had_errors_ && !pool_->lazily_build_dependencies_) {
+ // Validate options. See comments at InternalSetLazilyBuildDependencies about
+ // error checking and lazy import building.
+ if (!had_errors_ && !pool_->lazily_build_dependencies_) {
ValidateFileOptions(result, proto);
}
@@ -4554,7 +4554,7 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl(
}
- // Again, see comments at InternalSetLazilyBuildDependencies about error
+ // Again, see comments at InternalSetLazilyBuildDependencies about error
// checking. Also, don't log unused dependencies if there were previous
// errors, since the results might be inaccurate.
if (!had_errors_ && !unused_dependency_.empty() &&
@@ -4698,7 +4698,7 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto,
for (int j = 0; j < result->reserved_range_count(); j++) {
const Descriptor::ReservedRange* range2 = result->reserved_range(j);
if (range1->end > range2->start && range2->end > range1->start) {
- AddError(result->full_name(), proto.extension_range(i),
+ AddError(result->full_name(), proto.extension_range(i),
DescriptorPool::ErrorCollector::NUMBER,
strings::Substitute("Extension range $0 to $1 overlaps with "
"reserved range $2 to $3.",
@@ -4709,7 +4709,7 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto,
for (int j = i + 1; j < result->extension_range_count(); j++) {
const Descriptor::ExtensionRange* range2 = result->extension_range(j);
if (range1->end > range2->start && range2->end > range1->start) {
- AddError(result->full_name(), proto.extension_range(i),
+ AddError(result->full_name(), proto.extension_range(i),
DescriptorPool::ErrorCollector::NUMBER,
strings::Substitute("Extension range $0 to $1 overlaps with "
"already-defined range $2 to $3.",
@@ -4767,7 +4767,7 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto,
result->json_name_ = tables_->AllocateString(proto.json_name());
} else {
result->has_json_name_ = false;
- result->json_name_ = tables_->AllocateString(ToJsonName(proto.name()));
+ result->json_name_ = tables_->AllocateString(ToJsonName(proto.name()));
}
// Some compilers do not allow static_cast directly between two enum types,
@@ -4830,14 +4830,14 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto,
break;
case FieldDescriptor::CPPTYPE_FLOAT:
if (proto.default_value() == "inf") {
- result->default_value_float_ =
- std::numeric_limits<float>::infinity();
+ result->default_value_float_ =
+ std::numeric_limits<float>::infinity();
} else if (proto.default_value() == "-inf") {
- result->default_value_float_ =
- -std::numeric_limits<float>::infinity();
+ result->default_value_float_ =
+ -std::numeric_limits<float>::infinity();
} else if (proto.default_value() == "nan") {
- result->default_value_float_ =
- std::numeric_limits<float>::quiet_NaN();
+ result->default_value_float_ =
+ std::numeric_limits<float>::quiet_NaN();
} else {
result->default_value_float_ = io::SafeDoubleToFloat(
io::NoLocaleStrtod(proto.default_value().c_str(), &end_pos));
@@ -4845,14 +4845,14 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto,
break;
case FieldDescriptor::CPPTYPE_DOUBLE:
if (proto.default_value() == "inf") {
- result->default_value_double_ =
- std::numeric_limits<double>::infinity();
+ result->default_value_double_ =
+ std::numeric_limits<double>::infinity();
} else if (proto.default_value() == "-inf") {
- result->default_value_double_ =
- -std::numeric_limits<double>::infinity();
+ result->default_value_double_ =
+ -std::numeric_limits<double>::infinity();
} else if (proto.default_value() == "nan") {
- result->default_value_double_ =
- std::numeric_limits<double>::quiet_NaN();
+ result->default_value_double_ =
+ std::numeric_limits<double>::quiet_NaN();
} else {
result->default_value_double_ =
io::NoLocaleStrtod(proto.default_value().c_str(), &end_pos);
@@ -5039,7 +5039,7 @@ void DescriptorBuilder::BuildExtensionRange(
AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
"Extension range end number must be greater than start number.");
}
-
+
result->options_ = nullptr; // Set to default_instance later if necessary.
if (proto.has_options()) {
std::vector<int> options_path;
@@ -5051,10 +5051,10 @@ void DescriptorBuilder::BuildExtensionRange(
}
options_path.push_back(index);
options_path.push_back(DescriptorProto_ExtensionRange::kOptionsFieldNumber);
- AllocateOptionsImpl(parent->full_name(), parent->full_name(),
+ AllocateOptionsImpl(parent->full_name(), parent->full_name(),
proto.options(), result, options_path,
"google.protobuf.ExtensionRangeOptions");
- }
+ }
}
void DescriptorBuilder::BuildReservedRange(
@@ -5107,52 +5107,52 @@ void DescriptorBuilder::BuildOneof(const OneofDescriptorProto& proto,
AddSymbol(result->full_name(), parent, result->name(), proto, Symbol(result));
}
-void DescriptorBuilder::CheckEnumValueUniqueness(
- const EnumDescriptorProto& proto, const EnumDescriptor* result) {
-
- // Check that enum labels are still unique when we remove the enum prefix from
- // values that have it.
- //
- // This will fail for something like:
- //
- // enum MyEnum {
- // MY_ENUM_FOO = 0;
- // FOO = 1;
- // }
- //
- // By enforcing this reasonable constraint, we allow code generators to strip
- // the prefix and/or PascalCase it without creating conflicts. This can lead
- // to much nicer language-specific enums like:
- //
- // enum NameType {
- // FirstName = 1,
- // LastName = 2,
- // }
- //
- // Instead of:
- //
- // enum NameType {
- // NAME_TYPE_FIRST_NAME = 1,
- // NAME_TYPE_LAST_NAME = 2,
- // }
- PrefixRemover remover(result->name());
+void DescriptorBuilder::CheckEnumValueUniqueness(
+ const EnumDescriptorProto& proto, const EnumDescriptor* result) {
+
+ // Check that enum labels are still unique when we remove the enum prefix from
+ // values that have it.
+ //
+ // This will fail for something like:
+ //
+ // enum MyEnum {
+ // MY_ENUM_FOO = 0;
+ // FOO = 1;
+ // }
+ //
+ // By enforcing this reasonable constraint, we allow code generators to strip
+ // the prefix and/or PascalCase it without creating conflicts. This can lead
+ // to much nicer language-specific enums like:
+ //
+ // enum NameType {
+ // FirstName = 1,
+ // LastName = 2,
+ // }
+ //
+ // Instead of:
+ //
+ // enum NameType {
+ // NAME_TYPE_FIRST_NAME = 1,
+ // NAME_TYPE_LAST_NAME = 2,
+ // }
+ PrefixRemover remover(result->name());
std::map<TProtoStringType, const EnumValueDescriptor*> values;
- for (int i = 0; i < result->value_count(); i++) {
+ for (int i = 0; i < result->value_count(); i++) {
const EnumValueDescriptor* value = result->value(i);
TProtoStringType stripped =
- EnumValueToPascalCase(remover.MaybeRemove(value->name()));
+ EnumValueToPascalCase(remover.MaybeRemove(value->name()));
std::pair<std::map<TProtoStringType, const EnumValueDescriptor*>::iterator, bool>
- insert_result = values.insert(std::make_pair(stripped, value));
- bool inserted = insert_result.second;
-
- // We don't throw the error if the two conflicting symbols are identical, or
- // if they map to the same number. In the former case, the normal symbol
- // duplication error will fire so we don't need to (and its error message
- // will make more sense). We allow the latter case so users can create
- // aliases which add or remove the prefix (code generators that do prefix
- // stripping should de-dup the labels in this case).
- if (!inserted && insert_result.first->second->name() != value->name() &&
- insert_result.first->second->number() != value->number()) {
+ insert_result = values.insert(std::make_pair(stripped, value));
+ bool inserted = insert_result.second;
+
+ // We don't throw the error if the two conflicting symbols are identical, or
+ // if they map to the same number. In the former case, the normal symbol
+ // duplication error will fire so we don't need to (and its error message
+ // will make more sense). We allow the latter case so users can create
+ // aliases which add or remove the prefix (code generators that do prefix
+ // stripping should de-dup the labels in this case).
+ if (!inserted && insert_result.first->second->name() != value->name() &&
+ insert_result.first->second->number() != value->number()) {
TProtoStringType error_message =
"Enum name " + value->name() + " has the same name as " +
values[stripped]->name() +
@@ -5160,19 +5160,19 @@ void DescriptorBuilder::CheckEnumValueUniqueness(
"This is error-prone and can lead to undefined behavior. "
"Please avoid doing this. If you are using allow_alias, please "
"assign the same numeric value to both enums.";
- // There are proto2 enums out there with conflicting names, so to preserve
- // compatibility we issue only a warning for proto2.
- if (result->file()->syntax() == FileDescriptor::SYNTAX_PROTO2) {
- AddWarning(value->full_name(), proto.value(i),
- DescriptorPool::ErrorCollector::NAME, error_message);
- } else {
- AddError(value->full_name(), proto.value(i),
- DescriptorPool::ErrorCollector::NAME, error_message);
- }
- }
- }
-}
-
+ // There are proto2 enums out there with conflicting names, so to preserve
+ // compatibility we issue only a warning for proto2.
+ if (result->file()->syntax() == FileDescriptor::SYNTAX_PROTO2) {
+ AddWarning(value->full_name(), proto.value(i),
+ DescriptorPool::ErrorCollector::NAME, error_message);
+ } else {
+ AddError(value->full_name(), proto.value(i),
+ DescriptorPool::ErrorCollector::NAME, error_message);
+ }
+ }
+ }
+}
+
void DescriptorBuilder::BuildEnum(const EnumDescriptorProto& proto,
const Descriptor* parent,
EnumDescriptor* result) {
@@ -5208,8 +5208,8 @@ void DescriptorBuilder::BuildEnum(const EnumDescriptorProto& proto,
tables_->AllocateString(proto.reserved_name(i));
}
- CheckEnumValueUniqueness(proto, result);
-
+ CheckEnumValueUniqueness(proto, result);
+
// Copy options.
result->options_ = nullptr; // Set to default_instance later if necessary.
if (proto.has_options()) {
@@ -5377,8 +5377,8 @@ void DescriptorBuilder::BuildMethod(const MethodDescriptorProto& proto,
ValidateSymbolName(proto.name(), *full_name, proto);
// These will be filled in when cross-linking.
- result->input_type_.Init();
- result->output_type_.Init();
+ result->input_type_.Init();
+ result->output_type_.Init();
// Copy options.
result->options_ = nullptr; // Set to default_instance later if necessary.
@@ -5443,11 +5443,11 @@ void DescriptorBuilder::CrossLinkMessage(Descriptor* message,
CrossLinkField(&message->extensions_[i], proto.extension(i));
}
- for (int i = 0; i < message->extension_range_count(); i++) {
- CrossLinkExtensionRange(&message->extension_ranges_[i],
- proto.extension_range(i));
- }
-
+ for (int i = 0; i < message->extension_range_count(); i++) {
+ CrossLinkExtensionRange(&message->extension_ranges_[i],
+ proto.extension_range(i));
+ }
+
// Set up field array for each oneof.
// First count the number of fields per oneof.
@@ -5544,27 +5544,27 @@ void DescriptorBuilder::CrossLinkMessage(Descriptor* message,
}
}
-void DescriptorBuilder::CrossLinkExtensionRange(
- Descriptor::ExtensionRange* range,
- const DescriptorProto::ExtensionRange& proto) {
+void DescriptorBuilder::CrossLinkExtensionRange(
+ Descriptor::ExtensionRange* range,
+ const DescriptorProto::ExtensionRange& proto) {
if (range->options_ == nullptr) {
- range->options_ = &ExtensionRangeOptions::default_instance();
- }
-}
-
+ range->options_ = &ExtensionRangeOptions::default_instance();
+ }
+}
+
void DescriptorBuilder::CrossLinkField(FieldDescriptor* field,
const FieldDescriptorProto& proto) {
if (field->options_ == nullptr) {
field->options_ = &FieldOptions::default_instance();
}
- // Add the field to the lowercase-name and camelcase-name tables.
- file_tables_->AddFieldByStylizedNames(field);
-
+ // Add the field to the lowercase-name and camelcase-name tables.
+ file_tables_->AddFieldByStylizedNames(field);
+
if (proto.has_extendee()) {
- Symbol extendee =
- LookupSymbol(proto.extendee(), field->full_name(),
- DescriptorPool::PLACEHOLDER_EXTENDABLE_MESSAGE);
+ Symbol extendee =
+ LookupSymbol(proto.extendee(), field->full_name(),
+ DescriptorPool::PLACEHOLDER_EXTENDABLE_MESSAGE);
if (extendee.IsNull()) {
AddNotDefinedError(field->full_name(), proto,
DescriptorPool::ErrorCollector::EXTENDEE,
@@ -5627,33 +5627,33 @@ void DescriptorBuilder::CrossLinkField(FieldDescriptor* field,
bool is_lazy = pool_->lazily_build_dependencies_ && !is_weak;
Symbol type =
- LookupSymbol(proto.type_name(), field->full_name(),
- expecting_enum ? DescriptorPool::PLACEHOLDER_ENUM
- : DescriptorPool::PLACEHOLDER_MESSAGE,
+ LookupSymbol(proto.type_name(), field->full_name(),
+ expecting_enum ? DescriptorPool::PLACEHOLDER_ENUM
+ : DescriptorPool::PLACEHOLDER_MESSAGE,
LOOKUP_TYPES, !is_lazy);
if (type.IsNull()) {
if (is_lazy) {
- // Save the symbol names for later for lookup, and allocate the once
- // object needed for the accessors.
+ // Save the symbol names for later for lookup, and allocate the once
+ // object needed for the accessors.
TProtoStringType name = proto.type_name();
- field->type_once_ = tables_->AllocateOnceDynamic();
- field->type_name_ = tables_->AllocateString(name);
- if (proto.has_default_value()) {
- field->default_value_enum_name_ =
- tables_->AllocateString(proto.default_value());
- }
- // AddFieldByNumber and AddExtension are done later in this function,
- // and can/must be done if the field type was not found. The related
- // error checking is not necessary when in lazily_build_dependencies_
- // mode, and can't be done without building the type's descriptor,
- // which we don't want to do.
- file_tables_->AddFieldByNumber(field);
- if (field->is_extension()) {
- tables_->AddExtension(field);
- }
- return;
- } else {
+ field->type_once_ = tables_->AllocateOnceDynamic();
+ field->type_name_ = tables_->AllocateString(name);
+ if (proto.has_default_value()) {
+ field->default_value_enum_name_ =
+ tables_->AllocateString(proto.default_value());
+ }
+ // AddFieldByNumber and AddExtension are done later in this function,
+ // and can/must be done if the field type was not found. The related
+ // error checking is not necessary when in lazily_build_dependencies_
+ // mode, and can't be done without building the type's descriptor,
+ // which we don't want to do.
+ file_tables_->AddFieldByNumber(field);
+ if (field->is_extension()) {
+ tables_->AddExtension(field);
+ }
+ return;
+ } else {
// If the type is a weak type, we change the type to a google.protobuf.Empty
// field.
if (is_weak) {
@@ -5665,7 +5665,7 @@ void DescriptorBuilder::CrossLinkField(FieldDescriptor* field,
proto.type_name());
return;
}
- }
+ }
}
if (!proto.has_type()) {
@@ -5760,10 +5760,10 @@ void DescriptorBuilder::CrossLinkField(FieldDescriptor* field,
// Add the field to the fields-by-number table.
// Note: We have to do this *after* cross-linking because extensions do not
- // know their containing type until now. If we're in
- // lazily_build_dependencies_ mode, we're guaranteed there's no errors, so no
- // risk to calling containing_type() or other accessors that will build
- // dependencies.
+ // know their containing type until now. If we're in
+ // lazily_build_dependencies_ mode, we're guaranteed there's no errors, so no
+ // risk to calling containing_type() or other accessors that will build
+ // dependencies.
if (!file_tables_->AddFieldByNumber(field)) {
const FieldDescriptor* conflicting_field = file_tables_->FindFieldByNumber(
field->containing_type(), field->number());
@@ -5847,44 +5847,44 @@ void DescriptorBuilder::CrossLinkMethod(MethodDescriptor* method,
method->options_ = &MethodOptions::default_instance();
}
- Symbol input_type =
- LookupSymbol(proto.input_type(), method->full_name(),
- DescriptorPool::PLACEHOLDER_MESSAGE, LOOKUP_ALL,
- !pool_->lazily_build_dependencies_);
+ Symbol input_type =
+ LookupSymbol(proto.input_type(), method->full_name(),
+ DescriptorPool::PLACEHOLDER_MESSAGE, LOOKUP_ALL,
+ !pool_->lazily_build_dependencies_);
if (input_type.IsNull()) {
- if (!pool_->lazily_build_dependencies_) {
- AddNotDefinedError(method->full_name(), proto,
- DescriptorPool::ErrorCollector::INPUT_TYPE,
- proto.input_type());
- } else {
- method->input_type_.SetLazy(proto.input_type(), file_);
- }
+ if (!pool_->lazily_build_dependencies_) {
+ AddNotDefinedError(method->full_name(), proto,
+ DescriptorPool::ErrorCollector::INPUT_TYPE,
+ proto.input_type());
+ } else {
+ method->input_type_.SetLazy(proto.input_type(), file_);
+ }
} else if (input_type.type != Symbol::MESSAGE) {
AddError(method->full_name(), proto,
DescriptorPool::ErrorCollector::INPUT_TYPE,
"\"" + proto.input_type() + "\" is not a message type.");
} else {
- method->input_type_.Set(input_type.descriptor);
+ method->input_type_.Set(input_type.descriptor);
}
- Symbol output_type =
- LookupSymbol(proto.output_type(), method->full_name(),
- DescriptorPool::PLACEHOLDER_MESSAGE, LOOKUP_ALL,
- !pool_->lazily_build_dependencies_);
+ Symbol output_type =
+ LookupSymbol(proto.output_type(), method->full_name(),
+ DescriptorPool::PLACEHOLDER_MESSAGE, LOOKUP_ALL,
+ !pool_->lazily_build_dependencies_);
if (output_type.IsNull()) {
- if (!pool_->lazily_build_dependencies_) {
- AddNotDefinedError(method->full_name(), proto,
- DescriptorPool::ErrorCollector::OUTPUT_TYPE,
- proto.output_type());
- } else {
- method->output_type_.SetLazy(proto.output_type(), file_);
- }
+ if (!pool_->lazily_build_dependencies_) {
+ AddNotDefinedError(method->full_name(), proto,
+ DescriptorPool::ErrorCollector::OUTPUT_TYPE,
+ proto.output_type());
+ } else {
+ method->output_type_.SetLazy(proto.output_type(), file_);
+ }
} else if (output_type.type != Symbol::MESSAGE) {
AddError(method->full_name(), proto,
DescriptorPool::ErrorCollector::OUTPUT_TYPE,
"\"" + proto.output_type() + "\" is not a message type.");
} else {
- method->output_type_.Set(output_type.descriptor);
+ method->output_type_.Set(output_type.descriptor);
}
}
@@ -6074,12 +6074,12 @@ void DescriptorBuilder::ValidateMessageOptions(Descriptor* message,
}
}
-
+
void DescriptorBuilder::ValidateFieldOptions(
FieldDescriptor* field, const FieldDescriptorProto& proto) {
- if (pool_->lazily_build_dependencies_ && (!field || !field->message_type())) {
- return;
- }
+ if (pool_->lazily_build_dependencies_ && (!field || !field->message_type())) {
+ return;
+ }
// Only message type fields may be lazy.
if (field->options().lazy()) {
if (field->type() != FieldDescriptor::TYPE_MESSAGE) {
@@ -6133,8 +6133,8 @@ void DescriptorBuilder::ValidateFieldOptions(
}
}
- ValidateJSType(field, proto);
-
+ ValidateJSType(field, proto);
+
// json_name option is not allowed on extension fields. Note that the
// json_name field in FieldDescriptorProto is always populated by protoc
// when it sends descriptor data to plugins (calculated from field name if
@@ -6339,41 +6339,41 @@ void DescriptorBuilder::DetectMapConflicts(const Descriptor* message,
}
}
-void DescriptorBuilder::ValidateJSType(FieldDescriptor* field,
- const FieldDescriptorProto& proto) {
- FieldOptions::JSType jstype = field->options().jstype();
- // The default is always acceptable.
- if (jstype == FieldOptions::JS_NORMAL) {
- return;
- }
-
- switch (field->type()) {
- // Integral 64-bit types may be represented as JavaScript numbers or
- // strings.
- case FieldDescriptor::TYPE_UINT64:
- case FieldDescriptor::TYPE_INT64:
- case FieldDescriptor::TYPE_SINT64:
- case FieldDescriptor::TYPE_FIXED64:
- case FieldDescriptor::TYPE_SFIXED64:
- if (jstype == FieldOptions::JS_STRING ||
- jstype == FieldOptions::JS_NUMBER) {
- return;
- }
- AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
- "Illegal jstype for int64, uint64, sint64, fixed64 "
- "or sfixed64 field: " +
+void DescriptorBuilder::ValidateJSType(FieldDescriptor* field,
+ const FieldDescriptorProto& proto) {
+ FieldOptions::JSType jstype = field->options().jstype();
+ // The default is always acceptable.
+ if (jstype == FieldOptions::JS_NORMAL) {
+ return;
+ }
+
+ switch (field->type()) {
+ // Integral 64-bit types may be represented as JavaScript numbers or
+ // strings.
+ case FieldDescriptor::TYPE_UINT64:
+ case FieldDescriptor::TYPE_INT64:
+ case FieldDescriptor::TYPE_SINT64:
+ case FieldDescriptor::TYPE_FIXED64:
+ case FieldDescriptor::TYPE_SFIXED64:
+ if (jstype == FieldOptions::JS_STRING ||
+ jstype == FieldOptions::JS_NUMBER) {
+ return;
+ }
+ AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
+ "Illegal jstype for int64, uint64, sint64, fixed64 "
+ "or sfixed64 field: " +
FieldOptions_JSType_descriptor()->value(jstype)->name());
- break;
-
- // No other types permit a jstype option.
- default:
- AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
- "jstype is only allowed on int64, uint64, sint64, fixed64 "
- "or sfixed64 fields.");
- break;
- }
-}
-
+ break;
+
+ // No other types permit a jstype option.
+ default:
+ AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
+ "jstype is only allowed on int64, uint64, sint64, fixed64 "
+ "or sfixed64 fields.");
+ break;
+ }
+}
+
#undef VALIDATE_OPTIONS_FROM_ARRAY
// -------------------------------------------------------------------
@@ -6784,8 +6784,8 @@ void DescriptorBuilder::OptionInterpreter::AddWithoutInterpreting(
}
bool DescriptorBuilder::OptionInterpreter::ExamineIfOptionIsSet(
- std::vector<const FieldDescriptor*>::const_iterator
- intermediate_fields_iter,
+ std::vector<const FieldDescriptor*>::const_iterator
+ intermediate_fields_iter,
std::vector<const FieldDescriptor*>::const_iterator intermediate_fields_end,
const FieldDescriptor* innermost_field, const TProtoStringType& debug_msg_name,
const UnknownFieldSet& unknown_fields) {
@@ -7285,86 +7285,86 @@ void DescriptorBuilder::LogUnusedDependency(const FileDescriptorProto& proto,
}
Symbol DescriptorPool::CrossLinkOnDemandHelper(StringPiece name,
- bool expecting_enum) const {
+ bool expecting_enum) const {
auto lookup_name = TProtoStringType(name);
- if (!lookup_name.empty() && lookup_name[0] == '.') {
- lookup_name = lookup_name.substr(1);
- }
- Symbol result = tables_->FindByNameHelper(this, lookup_name);
- return result;
-}
-
-// Handle the lazy import building for a message field whose type wasn't built
-// at cross link time. If that was the case, we saved the name of the type to
-// be looked up when the accessor for the type was called. Set type_,
-// enum_type_, message_type_, and default_value_enum_ appropriately.
-void FieldDescriptor::InternalTypeOnceInit() const {
- GOOGLE_CHECK(file()->finished_building_ == true);
- if (type_name_) {
- Symbol result = file()->pool()->CrossLinkOnDemandHelper(
- *type_name_, type_ == FieldDescriptor::TYPE_ENUM);
- if (result.type == Symbol::MESSAGE) {
- type_ = FieldDescriptor::TYPE_MESSAGE;
- message_type_ = result.descriptor;
- } else if (result.type == Symbol::ENUM) {
- type_ = FieldDescriptor::TYPE_ENUM;
- enum_type_ = result.enum_descriptor;
- }
- }
- if (enum_type_ && !default_value_enum_) {
- if (default_value_enum_name_) {
- // Have to build the full name now instead of at CrossLink time,
- // because enum_type_ may not be known at the time.
+ if (!lookup_name.empty() && lookup_name[0] == '.') {
+ lookup_name = lookup_name.substr(1);
+ }
+ Symbol result = tables_->FindByNameHelper(this, lookup_name);
+ return result;
+}
+
+// Handle the lazy import building for a message field whose type wasn't built
+// at cross link time. If that was the case, we saved the name of the type to
+// be looked up when the accessor for the type was called. Set type_,
+// enum_type_, message_type_, and default_value_enum_ appropriately.
+void FieldDescriptor::InternalTypeOnceInit() const {
+ GOOGLE_CHECK(file()->finished_building_ == true);
+ if (type_name_) {
+ Symbol result = file()->pool()->CrossLinkOnDemandHelper(
+ *type_name_, type_ == FieldDescriptor::TYPE_ENUM);
+ if (result.type == Symbol::MESSAGE) {
+ type_ = FieldDescriptor::TYPE_MESSAGE;
+ message_type_ = result.descriptor;
+ } else if (result.type == Symbol::ENUM) {
+ type_ = FieldDescriptor::TYPE_ENUM;
+ enum_type_ = result.enum_descriptor;
+ }
+ }
+ if (enum_type_ && !default_value_enum_) {
+ if (default_value_enum_name_) {
+ // Have to build the full name now instead of at CrossLink time,
+ // because enum_type_ may not be known at the time.
TProtoStringType name = enum_type_->full_name();
- // Enum values reside in the same scope as the enum type.
+ // Enum values reside in the same scope as the enum type.
TProtoStringType::size_type last_dot = name.find_last_of('.');
if (last_dot != TProtoStringType::npos) {
- name = name.substr(0, last_dot) + "." + *default_value_enum_name_;
- } else {
- name = *default_value_enum_name_;
- }
- Symbol result = file()->pool()->CrossLinkOnDemandHelper(name, true);
- if (result.type == Symbol::ENUM_VALUE) {
- default_value_enum_ = result.enum_value_descriptor;
- }
- }
- if (!default_value_enum_) {
- // We use the first defined value as the default
- // if a default is not explicitly defined.
- GOOGLE_CHECK(enum_type_->value_count());
- default_value_enum_ = enum_type_->value(0);
- }
- }
-}
-
-void FieldDescriptor::TypeOnceInit(const FieldDescriptor* to_init) {
- to_init->InternalTypeOnceInit();
-}
-
-// message_type(), enum_type(), default_value_enum(), and type()
+ name = name.substr(0, last_dot) + "." + *default_value_enum_name_;
+ } else {
+ name = *default_value_enum_name_;
+ }
+ Symbol result = file()->pool()->CrossLinkOnDemandHelper(name, true);
+ if (result.type == Symbol::ENUM_VALUE) {
+ default_value_enum_ = result.enum_value_descriptor;
+ }
+ }
+ if (!default_value_enum_) {
+ // We use the first defined value as the default
+ // if a default is not explicitly defined.
+ GOOGLE_CHECK(enum_type_->value_count());
+ default_value_enum_ = enum_type_->value(0);
+ }
+ }
+}
+
+void FieldDescriptor::TypeOnceInit(const FieldDescriptor* to_init) {
+ to_init->InternalTypeOnceInit();
+}
+
+// message_type(), enum_type(), default_value_enum(), and type()
// all share the same internal::call_once init path to do lazy
-// import building and cross linking of a field of a message.
-const Descriptor* FieldDescriptor::message_type() const {
- if (type_once_) {
+// import building and cross linking of a field of a message.
+const Descriptor* FieldDescriptor::message_type() const {
+ if (type_once_) {
internal::call_once(*type_once_, FieldDescriptor::TypeOnceInit, this);
- }
- return message_type_;
-}
-
-const EnumDescriptor* FieldDescriptor::enum_type() const {
- if (type_once_) {
+ }
+ return message_type_;
+}
+
+const EnumDescriptor* FieldDescriptor::enum_type() const {
+ if (type_once_) {
internal::call_once(*type_once_, FieldDescriptor::TypeOnceInit, this);
- }
- return enum_type_;
-}
-
-const EnumValueDescriptor* FieldDescriptor::default_value_enum() const {
- if (type_once_) {
+ }
+ return enum_type_;
+}
+
+const EnumValueDescriptor* FieldDescriptor::default_value_enum() const {
+ if (type_once_) {
internal::call_once(*type_once_, FieldDescriptor::TypeOnceInit, this);
- }
- return default_value_enum_;
-}
-
+ }
+ return default_value_enum_;
+}
+
const TProtoStringType& FieldDescriptor::PrintableNameForExtension() const {
const bool is_message_set_extension =
is_extension() &&
@@ -7372,82 +7372,82 @@ const TProtoStringType& FieldDescriptor::PrintableNameForExtension() const {
type() == FieldDescriptor::TYPE_MESSAGE && is_optional() &&
extension_scope() == message_type();
return is_message_set_extension ? message_type()->full_name() : full_name();
-}
-
-void FileDescriptor::InternalDependenciesOnceInit() const {
- GOOGLE_CHECK(finished_building_ == true);
- for (int i = 0; i < dependency_count(); i++) {
- if (dependencies_names_[i]) {
- dependencies_[i] = pool_->FindFileByName(*dependencies_names_[i]);
- }
- }
-}
-
-void FileDescriptor::DependenciesOnceInit(const FileDescriptor* to_init) {
- to_init->InternalDependenciesOnceInit();
-}
-
-const FileDescriptor* FileDescriptor::dependency(int index) const {
- if (dependencies_once_) {
+}
+
+void FileDescriptor::InternalDependenciesOnceInit() const {
+ GOOGLE_CHECK(finished_building_ == true);
+ for (int i = 0; i < dependency_count(); i++) {
+ if (dependencies_names_[i]) {
+ dependencies_[i] = pool_->FindFileByName(*dependencies_names_[i]);
+ }
+ }
+}
+
+void FileDescriptor::DependenciesOnceInit(const FileDescriptor* to_init) {
+ to_init->InternalDependenciesOnceInit();
+}
+
+const FileDescriptor* FileDescriptor::dependency(int index) const {
+ if (dependencies_once_) {
// Do once init for all indices, as it's unlikely only a single index would
// be called, and saves on internal::call_once allocations.
internal::call_once(*dependencies_once_,
FileDescriptor::DependenciesOnceInit, this);
- }
- return dependencies_[index];
-}
-
-const Descriptor* MethodDescriptor::input_type() const {
- return input_type_.Get();
-}
-
-const Descriptor* MethodDescriptor::output_type() const {
- return output_type_.Get();
-}
-
-
-namespace internal {
-void LazyDescriptor::Set(const Descriptor* descriptor) {
- GOOGLE_CHECK(!name_);
- GOOGLE_CHECK(!once_);
- GOOGLE_CHECK(!file_);
- descriptor_ = descriptor;
-}
-
+ }
+ return dependencies_[index];
+}
+
+const Descriptor* MethodDescriptor::input_type() const {
+ return input_type_.Get();
+}
+
+const Descriptor* MethodDescriptor::output_type() const {
+ return output_type_.Get();
+}
+
+
+namespace internal {
+void LazyDescriptor::Set(const Descriptor* descriptor) {
+ GOOGLE_CHECK(!name_);
+ GOOGLE_CHECK(!once_);
+ GOOGLE_CHECK(!file_);
+ descriptor_ = descriptor;
+}
+
void LazyDescriptor::SetLazy(StringPiece name,
const FileDescriptor* file) {
- // verify Init() has been called and Set hasn't been called yet.
- GOOGLE_CHECK(!descriptor_);
- GOOGLE_CHECK(!file_);
- GOOGLE_CHECK(!name_);
- GOOGLE_CHECK(!once_);
- GOOGLE_CHECK(file && file->pool_);
- GOOGLE_CHECK(file->pool_->lazily_build_dependencies_);
- GOOGLE_CHECK(!file->finished_building_);
- file_ = file;
- name_ = file->pool_->tables_->AllocateString(name);
- once_ = file->pool_->tables_->AllocateOnceDynamic();
-}
-
-void LazyDescriptor::Once() {
- if (once_) {
+ // verify Init() has been called and Set hasn't been called yet.
+ GOOGLE_CHECK(!descriptor_);
+ GOOGLE_CHECK(!file_);
+ GOOGLE_CHECK(!name_);
+ GOOGLE_CHECK(!once_);
+ GOOGLE_CHECK(file && file->pool_);
+ GOOGLE_CHECK(file->pool_->lazily_build_dependencies_);
+ GOOGLE_CHECK(!file->finished_building_);
+ file_ = file;
+ name_ = file->pool_->tables_->AllocateString(name);
+ once_ = file->pool_->tables_->AllocateOnceDynamic();
+}
+
+void LazyDescriptor::Once() {
+ if (once_) {
internal::call_once(*once_, LazyDescriptor::OnceStatic, this);
- }
-}
-
-void LazyDescriptor::OnceStatic(LazyDescriptor* lazy) { lazy->OnceInternal(); }
-
-void LazyDescriptor::OnceInternal() {
- GOOGLE_CHECK(file_->finished_building_);
- if (!descriptor_ && name_) {
- Symbol result = file_->pool_->CrossLinkOnDemandHelper(*name_, false);
- if (!result.IsNull() && result.type == Symbol::MESSAGE) {
- descriptor_ = result.descriptor;
- }
- }
-}
-} // namespace internal
-
+ }
+}
+
+void LazyDescriptor::OnceStatic(LazyDescriptor* lazy) { lazy->OnceInternal(); }
+
+void LazyDescriptor::OnceInternal() {
+ GOOGLE_CHECK(file_->finished_building_);
+ if (!descriptor_ && name_) {
+ Symbol result = file_->pool_->CrossLinkOnDemandHelper(*name_, false);
+ if (!result.IsNull() && result.type == Symbol::MESSAGE) {
+ descriptor_ = result.descriptor;
+ }
+ }
+}
+} // namespace internal
+
} // namespace protobuf
} // namespace google
diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor.h b/contrib/libs/protobuf/src/google/protobuf/descriptor.h
index 1e38716845..3e2ddfe663 100644
--- a/contrib/libs/protobuf/src/google/protobuf/descriptor.h
+++ b/contrib/libs/protobuf/src/google/protobuf/descriptor.h
@@ -107,7 +107,7 @@ class FieldOptions;
class OneofOptions;
class EnumOptions;
class EnumValueOptions;
-class ExtensionRangeOptions;
+class ExtensionRangeOptions;
class ServiceOptions;
class MethodOptions;
class FileOptions;
@@ -121,7 +121,7 @@ class Reflection;
// Defined in descriptor.cc
class DescriptorBuilder;
class FileDescriptorTables;
-struct Symbol;
+struct Symbol;
// Defined in unknown_field_set.h.
class UnknownField;
@@ -177,55 +177,55 @@ struct DebugStringOptions {
}
};
-// A class to handle the simplest cases of a lazily linked descriptor
-// for a message type that isn't built at the time of cross linking,
-// which is needed when a pool has lazily_build_dependencies_ set.
-// Must be instantiated as mutable in a descriptor.
-namespace internal {
+// A class to handle the simplest cases of a lazily linked descriptor
+// for a message type that isn't built at the time of cross linking,
+// which is needed when a pool has lazily_build_dependencies_ set.
+// Must be instantiated as mutable in a descriptor.
+namespace internal {
class PROTOBUF_EXPORT LazyDescriptor {
- public:
- // Init function to be called at init time of a descriptor containing
- // a LazyDescriptor.
- void Init() {
+ public:
+ // Init function to be called at init time of a descriptor containing
+ // a LazyDescriptor.
+ void Init() {
descriptor_ = nullptr;
name_ = nullptr;
once_ = nullptr;
file_ = nullptr;
- }
-
- // Sets the value of the descriptor if it is known during the descriptor
- // building process. Not thread safe, should only be called during the
- // descriptor build process. Should not be called after SetLazy has been
- // called.
- void Set(const Descriptor* descriptor);
-
- // Sets the information needed to lazily cross link the descriptor at a later
- // time, SetLazy is not thread safe, should be called only once at descriptor
- // build time if the symbol wasn't found and building of the file containing
- // that type is delayed because lazily_build_dependencies_ is set on the pool.
- // Should not be called after Set() has been called.
+ }
+
+ // Sets the value of the descriptor if it is known during the descriptor
+ // building process. Not thread safe, should only be called during the
+ // descriptor build process. Should not be called after SetLazy has been
+ // called.
+ void Set(const Descriptor* descriptor);
+
+ // Sets the information needed to lazily cross link the descriptor at a later
+ // time, SetLazy is not thread safe, should be called only once at descriptor
+ // build time if the symbol wasn't found and building of the file containing
+ // that type is delayed because lazily_build_dependencies_ is set on the pool.
+ // Should not be called after Set() has been called.
void SetLazy(StringPiece name, const FileDescriptor* file);
-
- // Returns the current value of the descriptor, thread-safe. If SetLazy(...)
- // has been called, will do a one-time cross link of the type specified,
- // building the descriptor file that contains the type if necessary.
- inline const Descriptor* Get() {
- Once();
- return descriptor_;
- }
-
- private:
- static void OnceStatic(LazyDescriptor* lazy);
- void OnceInternal();
- void Once();
-
- const Descriptor* descriptor_;
+
+ // Returns the current value of the descriptor, thread-safe. If SetLazy(...)
+ // has been called, will do a one-time cross link of the type specified,
+ // building the descriptor file that contains the type if necessary.
+ inline const Descriptor* Get() {
+ Once();
+ return descriptor_;
+ }
+
+ private:
+ static void OnceStatic(LazyDescriptor* lazy);
+ void OnceInternal();
+ void Once();
+
+ const Descriptor* descriptor_;
const TProtoStringType* name_;
internal::once_flag* once_;
- const FileDescriptor* file_;
-};
-} // namespace internal
-
+ const FileDescriptor* file_;
+};
+} // namespace internal
+
// Describes a type of protocol message, or a particular group within a
// message. To obtain the Descriptor for a given message object, call
// Message::GetDescriptor(). Generated message classes also have a
@@ -385,15 +385,15 @@ class PROTOBUF_EXPORT Descriptor {
struct ExtensionRange {
typedef DescriptorProto_ExtensionRange Proto;
- typedef ExtensionRangeOptions OptionsType;
-
+ typedef ExtensionRangeOptions OptionsType;
+
// See Descriptor::CopyTo().
void CopyTo(DescriptorProto_ExtensionRange* proto) const;
int start; // inclusive
int end; // exclusive
-
- const ExtensionRangeOptions* options_;
+
+ const ExtensionRangeOptions* options_;
};
// The number of extension ranges in this message type.
@@ -530,14 +530,14 @@ class PROTOBUF_EXPORT Descriptor {
const Descriptor* containing_type_;
const MessageOptions* options_;
- // These arrays are separated from their sizes to minimize padding on 64-bit.
- FieldDescriptor* fields_;
- OneofDescriptor* oneof_decls_;
- Descriptor* nested_types_;
- EnumDescriptor* enum_types_;
- ExtensionRange* extension_ranges_;
- FieldDescriptor* extensions_;
- ReservedRange* reserved_ranges_;
+ // These arrays are separated from their sizes to minimize padding on 64-bit.
+ FieldDescriptor* fields_;
+ OneofDescriptor* oneof_decls_;
+ Descriptor* nested_types_;
+ EnumDescriptor* enum_types_;
+ ExtensionRange* extension_ranges_;
+ FieldDescriptor* extensions_;
+ ReservedRange* reserved_ranges_;
const TProtoStringType** reserved_names_;
int field_count_;
@@ -549,14 +549,14 @@ class PROTOBUF_EXPORT Descriptor {
int extension_count_;
int reserved_range_count_;
int reserved_name_count_;
-
- // True if this is a placeholder for an unknown type.
- bool is_placeholder_;
- // True if this is a placeholder and the type name wasn't fully-qualified.
- bool is_unqualified_placeholder_;
+
+ // True if this is a placeholder for an unknown type.
+ bool is_placeholder_;
+ // True if this is a placeholder and the type name wasn't fully-qualified.
+ bool is_unqualified_placeholder_;
// Well known type. Stored as char to conserve space.
char well_known_type_;
-
+
// IMPORTANT: If you add a new field, make sure to search for all instances
// of Allocate<Descriptor>() and AllocateArray<Descriptor>() in descriptor.cc
// and update them to initialize the field.
@@ -564,7 +564,7 @@ class PROTOBUF_EXPORT Descriptor {
// Must be constructed using DescriptorPool.
Descriptor() {}
friend class DescriptorBuilder;
- friend class DescriptorPool;
+ friend class DescriptorPool;
friend class EnumDescriptor;
friend class FieldDescriptor;
friend class OneofDescriptor;
@@ -573,7 +573,7 @@ class PROTOBUF_EXPORT Descriptor {
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Descriptor);
};
-
+
// Describes a single field of a message. To get the descriptor for a given
// field, first get the Descriptor for the message in which it is defined,
// then call Descriptor::FindFieldByName(). To get a FieldDescriptor for
@@ -721,10 +721,10 @@ class PROTOBUF_EXPORT FieldDescriptor {
// Does this field have an explicitly-declared default value?
bool has_default_value() const;
- // Whether the user has specified the json_name field option in the .proto
- // file.
- bool has_json_name() const;
-
+ // Whether the user has specified the json_name field option in the .proto
+ // file.
+ bool has_json_name() const;
+
// Get the field default value if cpp_type() == CPPTYPE_INT32. If no
// explicit default was defined, the default is 0.
int32 default_value_int32() const;
@@ -869,27 +869,27 @@ class PROTOBUF_EXPORT FieldDescriptor {
const TProtoStringType* lowercase_name_;
const TProtoStringType* camelcase_name_;
// If has_json_name_ is true, it's the value specified by the user.
- // Otherwise, it has the same value as camelcase_name_.
+ // Otherwise, it has the same value as camelcase_name_.
const TProtoStringType* json_name_;
const FileDescriptor* file_;
internal::once_flag* type_once_;
- static void TypeOnceInit(const FieldDescriptor* to_init);
- void InternalTypeOnceInit() const;
- mutable Type type_;
+ static void TypeOnceInit(const FieldDescriptor* to_init);
+ void InternalTypeOnceInit() const;
+ mutable Type type_;
Label label_;
- bool has_default_value_;
+ bool has_default_value_;
bool proto3_optional_;
- // Whether the user has specified the json_name field option in the .proto
- // file.
- bool has_json_name_;
+ // Whether the user has specified the json_name field option in the .proto
+ // file.
+ bool has_json_name_;
bool is_extension_;
- int number_;
+ int number_;
int index_in_oneof_;
const Descriptor* containing_type_;
const OneofDescriptor* containing_oneof_;
const Descriptor* extension_scope_;
- mutable const Descriptor* message_type_;
- mutable const EnumDescriptor* enum_type_;
+ mutable const Descriptor* message_type_;
+ mutable const EnumDescriptor* enum_type_;
const FieldOptions* options_;
const TProtoStringType* type_name_;
const TProtoStringType* default_value_enum_name_;
@@ -906,7 +906,7 @@ class PROTOBUF_EXPORT FieldDescriptor {
double default_value_double_;
bool default_value_bool_;
- mutable const EnumValueDescriptor* default_value_enum_;
+ mutable const EnumValueDescriptor* default_value_enum_;
const TProtoStringType* default_value_string_;
mutable std::atomic<const Message*> default_generated_instance_;
};
@@ -928,7 +928,7 @@ class PROTOBUF_EXPORT FieldDescriptor {
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldDescriptor);
};
-
+
// Describes a oneof defined in a message type.
class PROTOBUF_EXPORT OneofDescriptor {
public:
@@ -945,7 +945,7 @@ class PROTOBUF_EXPORT OneofDescriptor {
bool is_synthetic() const;
// The .proto file in which this oneof was defined. Never nullptr.
- const FileDescriptor* file() const;
+ const FileDescriptor* file() const;
// The Descriptor for the message containing this oneof.
const Descriptor* containing_type() const;
@@ -1156,7 +1156,7 @@ class PROTOBUF_EXPORT EnumDescriptor {
friend class FieldDescriptor;
friend class EnumValueDescriptor;
friend class FileDescriptor;
- friend class DescriptorPool;
+ friend class DescriptorPool;
friend class Reflection;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumDescriptor);
};
@@ -1182,7 +1182,7 @@ class PROTOBUF_EXPORT EnumValueDescriptor {
const TProtoStringType& full_name() const;
// The .proto file in which this value was defined. Never nullptr.
- const FileDescriptor* file() const;
+ const FileDescriptor* file() const;
// The type of this value. Never nullptr.
const EnumDescriptor* type() const;
@@ -1236,7 +1236,7 @@ class PROTOBUF_EXPORT EnumValueDescriptor {
EnumValueDescriptor() {}
friend class DescriptorBuilder;
friend class EnumDescriptor;
- friend class DescriptorPool;
+ friend class DescriptorPool;
friend class FileDescriptorTables;
friend class Reflection;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumValueDescriptor);
@@ -1307,7 +1307,7 @@ class PROTOBUF_EXPORT ServiceDescriptor {
const TProtoStringType* full_name_;
const FileDescriptor* file_;
const ServiceOptions* options_;
- MethodDescriptor* methods_;
+ MethodDescriptor* methods_;
int method_count_;
// IMPORTANT: If you add a new field, make sure to search for all instances
// of Allocate<ServiceDescriptor>() and AllocateArray<ServiceDescriptor>() in
@@ -1321,7 +1321,7 @@ class PROTOBUF_EXPORT ServiceDescriptor {
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceDescriptor);
};
-
+
// Describes an individual service method. To obtain a MethodDescriptor given
// a service, first get its ServiceDescriptor, then call
// ServiceDescriptor::FindMethodByName(). Use DescriptorPool to construct your
@@ -1338,7 +1338,7 @@ class PROTOBUF_EXPORT MethodDescriptor {
int index() const;
// The .proto file in which this method was defined. Never nullptr.
- const FileDescriptor* file() const;
+ const FileDescriptor* file() const;
// Gets the service to which this method belongs. Never nullptr.
const ServiceDescriptor* service() const;
@@ -1392,8 +1392,8 @@ class PROTOBUF_EXPORT MethodDescriptor {
const TProtoStringType* name_;
const TProtoStringType* full_name_;
const ServiceDescriptor* service_;
- mutable internal::LazyDescriptor input_type_;
- mutable internal::LazyDescriptor output_type_;
+ mutable internal::LazyDescriptor input_type_;
+ mutable internal::LazyDescriptor output_type_;
const MethodOptions* options_;
bool client_streaming_;
bool server_streaming_;
@@ -1555,11 +1555,11 @@ class PROTOBUF_EXPORT FileDescriptor {
const TProtoStringType* package_;
const DescriptorPool* pool_;
internal::once_flag* dependencies_once_;
- static void DependenciesOnceInit(const FileDescriptor* to_init);
- void InternalDependenciesOnceInit() const;
-
+ static void DependenciesOnceInit(const FileDescriptor* to_init);
+ void InternalDependenciesOnceInit() const;
+
// These are arranged to minimize padding on 64-bit.
- int dependency_count_;
+ int dependency_count_;
int public_dependency_count_;
int weak_dependency_count_;
int message_type_count_;
@@ -1568,35 +1568,35 @@ class PROTOBUF_EXPORT FileDescriptor {
int extension_count_;
Syntax syntax_;
bool is_placeholder_;
-
- // Indicates the FileDescriptor is completed building. Used to verify
- // that type accessor functions that can possibly build a dependent file
- // aren't called during the process of building the file.
- bool finished_building_;
-
- mutable const FileDescriptor** dependencies_;
+
+ // Indicates the FileDescriptor is completed building. Used to verify
+ // that type accessor functions that can possibly build a dependent file
+ // aren't called during the process of building the file.
+ bool finished_building_;
+
+ mutable const FileDescriptor** dependencies_;
const TProtoStringType** dependencies_names_;
- int* public_dependencies_;
- int* weak_dependencies_;
- Descriptor* message_types_;
- EnumDescriptor* enum_types_;
- ServiceDescriptor* services_;
+ int* public_dependencies_;
+ int* weak_dependencies_;
+ Descriptor* message_types_;
+ EnumDescriptor* enum_types_;
+ ServiceDescriptor* services_;
FieldDescriptor* extensions_;
const FileOptions* options_;
const FileDescriptorTables* tables_;
const SourceCodeInfo* source_code_info_;
-
+
// IMPORTANT: If you add a new field, make sure to search for all instances
// of Allocate<FileDescriptor>() and AllocateArray<FileDescriptor>() in
// descriptor.cc and update them to initialize the field.
FileDescriptor() {}
friend class DescriptorBuilder;
- friend class DescriptorPool;
+ friend class DescriptorPool;
friend class Descriptor;
friend class FieldDescriptor;
- friend class internal::LazyDescriptor;
+ friend class internal::LazyDescriptor;
friend class OneofDescriptor;
friend class EnumDescriptor;
friend class EnumValueDescriptor;
@@ -1605,7 +1605,7 @@ class PROTOBUF_EXPORT FileDescriptor {
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileDescriptor);
};
-
+
// ===================================================================
// Used to construct descriptors.
@@ -1838,10 +1838,10 @@ class PROTOBUF_EXPORT DescriptorPool {
static void InternalAddGeneratedFile(const void* encoded_file_descriptor,
int size);
- // Disallow [enforce_utf8 = false] in .proto files.
- void DisallowEnforceUtf8() { disallow_enforce_utf8_ = true; }
+ // Disallow [enforce_utf8 = false] in .proto files.
+ void DisallowEnforceUtf8() { disallow_enforce_utf8_ = true; }
+
-
// For internal use only: Gets a non-const pointer to the generated pool.
// This is called at static-initialization time only, so thread-safety is
// not a concern. If both an underlay and a fallback database are present,
@@ -1858,21 +1858,21 @@ class PROTOBUF_EXPORT DescriptorPool {
// which it did not officially declare as dependencies.
void InternalDontEnforceDependencies();
- // For internal use only: Enables lazy building of dependencies of a file.
- // Delay the building of dependencies of a file descriptor until absolutely
- // necessary, like when message_type() is called on a field that is defined
- // in that dependency's file. This will cause functional issues if a proto
+ // For internal use only: Enables lazy building of dependencies of a file.
+ // Delay the building of dependencies of a file descriptor until absolutely
+ // necessary, like when message_type() is called on a field that is defined
+ // in that dependency's file. This will cause functional issues if a proto
// or one of its dependencies has errors. Should only be enabled for the
- // generated_pool_ (because no descriptor build errors are guaranteed by
- // the compilation generation process), testing, or if a lack of descriptor
- // build errors can be guaranteed for a pool.
- void InternalSetLazilyBuildDependencies() {
- lazily_build_dependencies_ = true;
- // This needs to be set when lazily building dependencies, as it breaks
- // dependency checking.
- InternalDontEnforceDependencies();
- }
-
+ // generated_pool_ (because no descriptor build errors are guaranteed by
+ // the compilation generation process), testing, or if a lack of descriptor
+ // build errors can be guaranteed for a pool.
+ void InternalSetLazilyBuildDependencies() {
+ lazily_build_dependencies_ = true;
+ // This needs to be set when lazily building dependencies, as it breaks
+ // dependency checking.
+ InternalDontEnforceDependencies();
+ }
+
// For internal use only.
void internal_set_underlay(const DescriptorPool* underlay) {
underlay_ = underlay;
@@ -1891,13 +1891,13 @@ class PROTOBUF_EXPORT DescriptorPool {
private:
friend class Descriptor;
- friend class internal::LazyDescriptor;
+ friend class internal::LazyDescriptor;
friend class FieldDescriptor;
friend class EnumDescriptor;
friend class ServiceDescriptor;
- friend class MethodDescriptor;
+ friend class MethodDescriptor;
friend class FileDescriptor;
- friend class StreamDescriptor;
+ friend class StreamDescriptor;
friend class DescriptorBuilder;
friend class FileDescriptorTables;
@@ -1927,29 +1927,29 @@ class PROTOBUF_EXPORT DescriptorPool {
const FileDescriptor* BuildFileFromDatabase(
const FileDescriptorProto& proto) const;
- // Helper for when lazily_build_dependencies_ is set, can look up a symbol
- // after the file's descriptor is built, and can build the file where that
- // symbol is defined if necessary. Will create a placeholder if the type
- // doesn't exist in the fallback database, or the file doesn't build
- // successfully.
+ // Helper for when lazily_build_dependencies_ is set, can look up a symbol
+ // after the file's descriptor is built, and can build the file where that
+ // symbol is defined if necessary. Will create a placeholder if the type
+ // doesn't exist in the fallback database, or the file doesn't build
+ // successfully.
Symbol CrossLinkOnDemandHelper(StringPiece name,
bool expecting_enum) const;
-
- // Create a placeholder FileDescriptor of the specified name
+
+ // Create a placeholder FileDescriptor of the specified name
FileDescriptor* NewPlaceholderFile(StringPiece name) const;
FileDescriptor* NewPlaceholderFileWithMutexHeld(StringPiece name) const;
-
- enum PlaceholderType {
- PLACEHOLDER_MESSAGE,
- PLACEHOLDER_ENUM,
- PLACEHOLDER_EXTENDABLE_MESSAGE
- };
- // Create a placeholder Descriptor of the specified name
+
+ enum PlaceholderType {
+ PLACEHOLDER_MESSAGE,
+ PLACEHOLDER_ENUM,
+ PLACEHOLDER_EXTENDABLE_MESSAGE
+ };
+ // Create a placeholder Descriptor of the specified name
Symbol NewPlaceholder(StringPiece name,
- PlaceholderType placeholder_type) const;
+ PlaceholderType placeholder_type) const;
Symbol NewPlaceholderWithMutexHeld(StringPiece name,
- PlaceholderType placeholder_type) const;
-
+ PlaceholderType placeholder_type) const;
+
// If fallback_database_ is nullptr, this is nullptr. Otherwise, this is a
// mutex which must be locked while accessing tables_.
internal::WrappedMutex* mutex_;
@@ -1965,10 +1965,10 @@ class PROTOBUF_EXPORT DescriptorPool {
std::unique_ptr<Tables> tables_;
bool enforce_dependencies_;
- bool lazily_build_dependencies_;
+ bool lazily_build_dependencies_;
bool allow_unknown_;
bool enforce_weak_;
- bool disallow_enforce_utf8_;
+ bool disallow_enforce_utf8_;
// Set of files to track for unused imports. The bool value when true means
// unused imports are treated as errors (and as warnings when false).
@@ -1977,7 +1977,7 @@ class PROTOBUF_EXPORT DescriptorPool {
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DescriptorPool);
};
-
+
// inline methods ====================================================
// These macros makes this repetitive code more readable.
@@ -2041,7 +2041,7 @@ PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, index_in_oneof, int)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, extension_scope, const Descriptor*)
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FieldDescriptor, FieldOptions)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, has_default_value, bool)
-PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, has_json_name, bool)
+PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, has_json_name, bool)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_int32, int32)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_int64, int64)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_uint32, uint32)
@@ -2213,7 +2213,7 @@ inline bool FieldDescriptor::has_presence() const {
// in the parent's array of children.
inline int FieldDescriptor::index() const {
if (!is_extension_) {
- return static_cast<int>(this - containing_type()->fields_);
+ return static_cast<int>(this - containing_type()->fields_);
} else if (extension_scope_ != nullptr) {
return static_cast<int>(this - extension_scope_->extensions_);
} else {
@@ -2229,10 +2229,10 @@ inline int Descriptor::index() const {
}
}
-inline const FileDescriptor* OneofDescriptor::file() const {
- return containing_type()->file();
-}
-
+inline const FileDescriptor* OneofDescriptor::file() const {
+ return containing_type()->file();
+}
+
inline int OneofDescriptor::index() const {
return static_cast<int>(this - containing_type_->oneof_decls_);
}
@@ -2249,10 +2249,10 @@ inline int EnumDescriptor::index() const {
}
}
-inline const FileDescriptor* EnumValueDescriptor::file() const {
- return type()->file();
-}
-
+inline const FileDescriptor* EnumValueDescriptor::file() const {
+ return type()->file();
+}
+
inline int EnumValueDescriptor::index() const {
return static_cast<int>(this - type_->values_);
}
@@ -2261,24 +2261,24 @@ inline int ServiceDescriptor::index() const {
return static_cast<int>(this - file_->services_);
}
-inline const FileDescriptor* MethodDescriptor::file() const {
- return service()->file();
-}
-
+inline const FileDescriptor* MethodDescriptor::file() const {
+ return service()->file();
+}
+
inline int MethodDescriptor::index() const {
return static_cast<int>(this - service_->methods_);
}
inline const char* FieldDescriptor::type_name() const {
- return kTypeToName[type()];
+ return kTypeToName[type()];
}
inline FieldDescriptor::CppType FieldDescriptor::cpp_type() const {
- return kTypeToCppTypeMap[type()];
+ return kTypeToCppTypeMap[type()];
}
inline const char* FieldDescriptor::cpp_type_name() const {
- return kCppTypeToName[kTypeToCppTypeMap[type()]];
+ return kCppTypeToName[kTypeToCppTypeMap[type()]];
}
inline FieldDescriptor::CppType FieldDescriptor::TypeToCppType(Type type) {
@@ -2302,11 +2302,11 @@ inline bool FieldDescriptor::IsTypePackable(Type field_type) {
inline const FileDescriptor* FileDescriptor::public_dependency(
int index) const {
- return dependency(public_dependencies_[index]);
+ return dependency(public_dependencies_[index]);
}
inline const FileDescriptor* FileDescriptor::weak_dependency(int index) const {
- return dependency(weak_dependencies_[index]);
+ return dependency(weak_dependencies_[index]);
}
inline FileDescriptor::Syntax FileDescriptor::syntax() const { return syntax_; }
diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.cc b/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.cc
index 12c247c4c9..2e91b7c1ab 100644
--- a/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.cc
@@ -245,7 +245,7 @@ constexpr FileOptions::FileOptions(
, php_generic_services_(false)
, deprecated_(false)
, optimize_for_(1)
-
+
, cc_enable_arenas_(true){}
struct FileOptionsDefaultTypeInternal {
constexpr FileOptionsDefaultTypeInternal()
@@ -254,7 +254,7 @@ struct FileOptionsDefaultTypeInternal {
union {
FileOptions _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FileOptionsDefaultTypeInternal _FileOptions_default_instance_;
constexpr MessageOptions::MessageOptions(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
@@ -276,7 +276,7 @@ constexpr FieldOptions::FieldOptions(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: uninterpreted_option_()
, ctype_(0)
-
+
, packed_(false)
, lazy_(false)
, deprecated_(false)
@@ -290,7 +290,7 @@ struct FieldOptionsDefaultTypeInternal {
union {
FieldOptions _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FieldOptionsDefaultTypeInternal _FieldOptions_default_instance_;
constexpr OneofOptions::OneofOptions(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
@@ -302,7 +302,7 @@ struct OneofOptionsDefaultTypeInternal {
union {
OneofOptions _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OneofOptionsDefaultTypeInternal _OneofOptions_default_instance_;
constexpr EnumOptions::EnumOptions(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
@@ -452,19 +452,19 @@ PROTOBUF_NAMESPACE_CLOSE
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[27];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[6];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fdescriptor_2eproto = nullptr;
-
+
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorSet, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorSet, file_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, package_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, dependency_),
@@ -477,43 +477,43 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, options_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, source_code_info_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, syntax_),
- 0,
- 1,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- 3,
- 4,
- 2,
+ 0,
+ 1,
+ ~0u,
+ ~0u,
+ ~0u,
+ ~0u,
+ ~0u,
+ ~0u,
+ ~0u,
+ 3,
+ 4,
+ 2,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, start_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, end_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, options_),
- 1,
- 2,
- 0,
+ 1,
+ 2,
+ 0,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, start_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, end_),
- 0,
- 1,
+ 0,
+ 1,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, field_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, extension_),
@@ -524,27 +524,27 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, options_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, reserved_range_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, reserved_name_),
- 0,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- 1,
- ~0u,
- ~0u,
+ 0,
+ ~0u,
+ ~0u,
+ ~0u,
+ ~0u,
+ ~0u,
+ ~0u,
+ 1,
+ ~0u,
+ ~0u,
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, _internal_metadata_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, _extensions_),
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, uninterpreted_option_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, number_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, label_),
@@ -556,34 +556,34 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, json_name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, options_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, proto3_optional_),
- 0,
- 6,
- 9,
+ 0,
+ 6,
+ 9,
10,
- 2,
- 1,
- 3,
- 7,
- 4,
- 5,
+ 2,
+ 1,
+ 3,
+ 7,
+ 4,
+ 5,
8,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, options_),
- 0,
- 1,
+ 0,
+ 1,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, start_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, end_),
- 0,
+ 0,
1,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, _internal_metadata_),
@@ -596,54 +596,54 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, reserved_range_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, reserved_name_),
0,
- ~0u,
- 1,
+ ~0u,
+ 1,
~0u,
~0u,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, number_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, options_),
- 0,
- 2,
- 1,
+ 0,
+ 2,
+ 1,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, method_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, options_),
- 0,
- ~0u,
- 1,
+ 0,
+ ~0u,
+ 1,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, input_type_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, output_type_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, options_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, client_streaming_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, server_streaming_),
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
+ 0,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, _internal_metadata_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, _extensions_),
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, java_package_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, java_outer_classname_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, java_multiple_files_),
@@ -665,47 +665,47 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, php_metadata_namespace_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, ruby_package_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, uninterpreted_option_),
- 0,
- 1,
- 10,
- 11,
+ 0,
+ 1,
+ 10,
+ 11,
12,
18,
2,
- 13,
- 14,
- 15,
- 16,
+ 13,
+ 14,
+ 15,
+ 16,
17,
19,
- 3,
- 4,
- 5,
- 6,
- 7,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
8,
9,
- ~0u,
+ ~0u,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, _internal_metadata_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, _extensions_),
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, message_set_wire_format_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, no_standard_descriptor_accessor_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, deprecated_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, map_entry_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, uninterpreted_option_),
- 0,
- 1,
- 2,
- 3,
- ~0u,
+ 0,
+ 1,
+ 2,
+ 3,
+ ~0u,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, _internal_metadata_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, _extensions_),
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, ctype_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, packed_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, jstype_),
@@ -713,73 +713,73 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, deprecated_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, weak_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, uninterpreted_option_),
- 0,
- 1,
- 5,
- 2,
- 3,
- 4,
- ~0u,
+ 0,
+ 1,
+ 5,
+ 2,
+ 3,
+ 4,
+ ~0u,
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofOptions, _internal_metadata_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofOptions, _extensions_),
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofOptions, uninterpreted_option_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, _internal_metadata_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, _extensions_),
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, allow_alias_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, deprecated_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, uninterpreted_option_),
- 0,
- 1,
- ~0u,
+ 0,
+ 1,
+ ~0u,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueOptions, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueOptions, _internal_metadata_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueOptions, _extensions_),
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueOptions, deprecated_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueOptions, uninterpreted_option_),
- 0,
- ~0u,
+ 0,
+ ~0u,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceOptions, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceOptions, _internal_metadata_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceOptions, _extensions_),
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceOptions, deprecated_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceOptions, uninterpreted_option_),
- 0,
- ~0u,
+ 0,
+ ~0u,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodOptions, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodOptions, _internal_metadata_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodOptions, _extensions_),
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodOptions, deprecated_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodOptions, idempotency_level_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodOptions, uninterpreted_option_),
- 0,
- 1,
- ~0u,
+ 0,
+ 1,
+ ~0u,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, name_part_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, is_extension_),
- 0,
- 1,
+ 0,
+ 1,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, identifier_value_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, positive_int_value_),
@@ -787,54 +787,54 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, double_value_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, string_value_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, aggregate_value_),
- ~0u,
- 0,
- 3,
- 4,
- 5,
- 1,
- 2,
+ ~0u,
+ 0,
+ 3,
+ 4,
+ 5,
+ 1,
+ 2,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, path_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, span_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, leading_comments_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, trailing_comments_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, leading_detached_comments_),
- ~0u,
- ~0u,
- 0,
- 1,
- ~0u,
+ ~0u,
+ ~0u,
+ 0,
+ 1,
+ ~0u,
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo, location_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, path_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, source_file_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, begin_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, end_),
- ~0u,
- 0,
- 1,
- 2,
+ ~0u,
+ 0,
+ 1,
+ 2,
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo, annotation_),
-};
+};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::FileDescriptorSet)},
{ 6, 23, sizeof(PROTOBUF_NAMESPACE_ID::FileDescriptorProto)},
@@ -863,7 +863,7 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB
{ 355, -1, sizeof(PROTOBUF_NAMESPACE_ID::SourceCodeInfo)},
{ 361, 370, sizeof(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation)},
{ 374, -1, sizeof(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo)},
-};
+};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_FileDescriptorSet_default_instance_),
@@ -893,8 +893,8 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] =
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_SourceCodeInfo_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_GeneratedCodeInfo_Annotation_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_GeneratedCodeInfo_default_instance_),
-};
-
+};
+
const char descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n google/protobuf/descriptor.proto\022\017goog"
"le.protobuf\"G\n\021FileDescriptorSet\0222\n\004file"
@@ -1058,8 +1058,8 @@ const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto;
-}
-
+}
+
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fdescriptor_2eproto(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
PROTOBUF_NAMESPACE_OPEN
@@ -1067,32 +1067,32 @@ const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldDescriptorProto_Type_descrip
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[0];
}
-bool FieldDescriptorProto_Type_IsValid(int value) {
- switch (value) {
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- return true;
- default:
- return false;
- }
-}
-
+bool FieldDescriptorProto_Type_IsValid(int value) {
+ switch (value) {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 18:
+ return true;
+ default:
+ return false;
+ }
+}
+
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_DOUBLE;
constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FLOAT;
@@ -1119,18 +1119,18 @@ constexpr int FieldDescriptorProto::Type_ARRAYSIZE;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldDescriptorProto_Label_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[1];
-}
-bool FieldDescriptorProto_Label_IsValid(int value) {
- switch (value) {
- case 1:
- case 2:
- case 3:
- return true;
- default:
- return false;
- }
-}
-
+}
+bool FieldDescriptorProto_Label_IsValid(int value) {
+ switch (value) {
+ case 1:
+ case 2:
+ case 3:
+ return true;
+ default:
+ return false;
+ }
+}
+
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr FieldDescriptorProto_Label FieldDescriptorProto::LABEL_OPTIONAL;
constexpr FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REQUIRED;
@@ -1142,18 +1142,18 @@ constexpr int FieldDescriptorProto::Label_ARRAYSIZE;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FileOptions_OptimizeMode_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[2];
-}
-bool FileOptions_OptimizeMode_IsValid(int value) {
- switch (value) {
- case 1:
- case 2:
- case 3:
- return true;
- default:
- return false;
- }
-}
-
+}
+bool FileOptions_OptimizeMode_IsValid(int value) {
+ switch (value) {
+ case 1:
+ case 2:
+ case 3:
+ return true;
+ default:
+ return false;
+ }
+}
+
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr FileOptions_OptimizeMode FileOptions::SPEED;
constexpr FileOptions_OptimizeMode FileOptions::CODE_SIZE;
@@ -1165,18 +1165,18 @@ constexpr int FileOptions::OptimizeMode_ARRAYSIZE;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldOptions_CType_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[3];
-}
-bool FieldOptions_CType_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- case 2:
- return true;
- default:
- return false;
- }
-}
-
+}
+bool FieldOptions_CType_IsValid(int value) {
+ switch (value) {
+ case 0:
+ case 1:
+ case 2:
+ return true;
+ default:
+ return false;
+ }
+}
+
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr FieldOptions_CType FieldOptions::STRING;
constexpr FieldOptions_CType FieldOptions::CORD;
@@ -1188,18 +1188,18 @@ constexpr int FieldOptions::CType_ARRAYSIZE;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldOptions_JSType_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[4];
-}
-bool FieldOptions_JSType_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- case 2:
- return true;
- default:
- return false;
- }
-}
-
+}
+bool FieldOptions_JSType_IsValid(int value) {
+ switch (value) {
+ case 0:
+ case 1:
+ case 2:
+ return true;
+ default:
+ return false;
+ }
+}
+
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr FieldOptions_JSType FieldOptions::JS_NORMAL;
constexpr FieldOptions_JSType FieldOptions::JS_STRING;
@@ -1211,18 +1211,18 @@ constexpr int FieldOptions::JSType_ARRAYSIZE;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MethodOptions_IdempotencyLevel_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[5];
-}
-bool MethodOptions_IdempotencyLevel_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- case 2:
- return true;
- default:
- return false;
- }
-}
-
+}
+bool MethodOptions_IdempotencyLevel_IsValid(int value) {
+ switch (value) {
+ case 0:
+ case 1:
+ case 2:
+ return true;
+ default:
+ return false;
+ }
+}
+
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr MethodOptions_IdempotencyLevel MethodOptions::IDEMPOTENCY_UNKNOWN;
constexpr MethodOptions_IdempotencyLevel MethodOptions::NO_SIDE_EFFECTS;
@@ -1231,7 +1231,7 @@ constexpr MethodOptions_IdempotencyLevel MethodOptions::IdempotencyLevel_MIN;
constexpr MethodOptions_IdempotencyLevel MethodOptions::IdempotencyLevel_MAX;
constexpr int MethodOptions::IdempotencyLevel_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
-
+
// ===================================================================
class FileDescriptorSet::_Internal {
@@ -1250,7 +1250,7 @@ FileDescriptorSet::FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- file_(from.file_) {
+ file_(from.file_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorSet)
}
@@ -1282,9 +1282,9 @@ void FileDescriptorSet::SetCachedSize(int size) const {
void FileDescriptorSet::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FileDescriptorSet)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
file_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1334,10 +1334,10 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorSet)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
// repeated .google.protobuf.FileDescriptorProto file = 1;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_file_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -1352,9 +1352,9 @@ failure:
return target;
}
-size_t FileDescriptorSet::ByteSizeLong() const {
+size_t FileDescriptorSet::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileDescriptorSet)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -1363,9 +1363,9 @@ size_t FileDescriptorSet::ByteSizeLong() const {
// repeated .google.protobuf.FileDescriptorProto file = 1;
total_size += 1UL * this->_internal_file_size();
for (const auto& msg : this->file_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
+ }
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
@@ -1391,10 +1391,10 @@ void FileDescriptorSet::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void FileDescriptorSet::MergeFrom(const FileDescriptorSet& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorSet)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
file_.MergeFrom(from.file_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -1403,7 +1403,7 @@ void FileDescriptorSet::CopyFrom(const FileDescriptorSet& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FileDescriptorSet)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool FileDescriptorSet::IsInitialized() const {
@@ -1412,9 +1412,9 @@ bool FileDescriptorSet::IsInitialized() const {
}
void FileDescriptorSet::InternalSwap(FileDescriptorSet* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- file_.InternalSwap(&other->file_);
+ file_.InternalSwap(&other->file_);
}
::PROTOBUF_NAMESPACE_ID::Metadata FileDescriptorSet::GetMetadata() const {
@@ -1473,40 +1473,40 @@ FileDescriptorProto::FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- dependency_(from.dependency_),
- message_type_(from.message_type_),
- enum_type_(from.enum_type_),
- service_(from.service_),
- extension_(from.extension_),
- public_dependency_(from.public_dependency_),
- weak_dependency_(from.weak_dependency_) {
+ _has_bits_(from._has_bits_),
+ dependency_(from.dependency_),
+ message_type_(from.message_type_),
+ enum_type_(from.enum_type_),
+ service_(from.service_),
+ extension_(from.extension_),
+ public_dependency_(from.public_dependency_),
+ weak_dependency_(from.weak_dependency_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_package()) {
package_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_package(),
GetArenaForAllocation());
- }
+ }
syntax_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_syntax()) {
syntax_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_syntax(),
GetArenaForAllocation());
- }
+ }
if (from._internal_has_options()) {
options_ = new PROTOBUF_NAMESPACE_ID::FileOptions(*from.options_);
- } else {
+ } else {
options_ = nullptr;
- }
+ }
if (from._internal_has_source_code_info()) {
source_code_info_ = new PROTOBUF_NAMESPACE_ID::SourceCodeInfo(*from.source_code_info_);
- } else {
+ } else {
source_code_info_ = nullptr;
- }
+ }
// @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorProto)
}
@@ -1532,8 +1532,8 @@ inline void FileDescriptorProto::SharedDtor() {
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
package_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
syntax_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete options_;
- if (this != internal_default_instance()) delete source_code_info_;
+ if (this != internal_default_instance()) delete options_;
+ if (this != internal_default_instance()) delete source_code_info_;
}
void FileDescriptorProto::ArenaDtor(void* object) {
@@ -1549,37 +1549,37 @@ void FileDescriptorProto::SetCachedSize(int size) const {
void FileDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FileDescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- dependency_.Clear();
- message_type_.Clear();
- enum_type_.Clear();
- service_.Clear();
- extension_.Clear();
- public_dependency_.Clear();
- weak_dependency_.Clear();
- cached_has_bits = _has_bits_[0];
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ dependency_.Clear();
+ message_type_.Clear();
+ enum_type_.Clear();
+ service_.Clear();
+ extension_.Clear();
+ public_dependency_.Clear();
+ weak_dependency_.Clear();
+ cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
name_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
package_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
syntax_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000008u) {
+ }
+ if (cached_has_bits & 0x00000008u) {
GOOGLE_DCHECK(options_ != nullptr);
options_->Clear();
}
- if (cached_has_bits & 0x00000010u) {
+ if (cached_has_bits & 0x00000010u) {
GOOGLE_DCHECK(source_code_info_ != nullptr);
source_code_info_->Clear();
}
}
- _has_bits_.Clear();
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1759,11 +1759,11 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional string name = 1;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -1773,7 +1773,7 @@ failure:
}
// optional string package = 2;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_package().data(), static_cast<int>(this->_internal_package().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -1793,7 +1793,7 @@ failure:
}
// repeated .google.protobuf.DescriptorProto message_type = 4;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_message_type_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -1801,7 +1801,7 @@ failure:
}
// repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_enum_type_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -1809,7 +1809,7 @@ failure:
}
// repeated .google.protobuf.ServiceDescriptorProto service = 6;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_service_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -1817,7 +1817,7 @@ failure:
}
// repeated .google.protobuf.FieldDescriptorProto extension = 7;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_extension_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -1825,7 +1825,7 @@ failure:
}
// optional .google.protobuf.FileOptions options = 8;
- if (cached_has_bits & 0x00000008u) {
+ if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
@@ -1833,7 +1833,7 @@ failure:
}
// optional .google.protobuf.SourceCodeInfo source_code_info = 9;
- if (cached_has_bits & 0x00000010u) {
+ if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
@@ -1853,7 +1853,7 @@ failure:
}
// optional string syntax = 12;
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_syntax().data(), static_cast<int>(this->_internal_syntax().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -1870,16 +1870,16 @@ failure:
return target;
}
-size_t FileDescriptorProto::ByteSizeLong() const {
+size_t FileDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileDescriptorProto)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated string dependency = 3;
- total_size += 1 *
+ total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(dependency_.size());
for (int i = 0, n = dependency_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
@@ -1914,61 +1914,61 @@ size_t FileDescriptorProto::ByteSizeLong() const {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- // repeated int32 public_dependency = 10;
- {
+ // repeated int32 public_dependency = 10;
+ {
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- Int32Size(this->public_dependency_);
- total_size += 1 *
+ Int32Size(this->public_dependency_);
+ total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_public_dependency_size());
- total_size += data_size;
- }
-
- // repeated int32 weak_dependency = 11;
- {
+ total_size += data_size;
+ }
+
+ // repeated int32 weak_dependency = 11;
+ {
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- Int32Size(this->weak_dependency_);
- total_size += 1 *
+ Int32Size(this->weak_dependency_);
+ total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_weak_dependency_size());
- total_size += data_size;
- }
-
+ total_size += data_size;
+ }
+
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
- // optional string name = 1;
+ // optional string name = 1;
if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
- }
-
- // optional string package = 2;
+ }
+
+ // optional string package = 2;
if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_package());
- }
-
- // optional string syntax = 12;
+ }
+
+ // optional string syntax = 12;
if (cached_has_bits & 0x00000004u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_syntax());
- }
-
- // optional .google.protobuf.FileOptions options = 8;
+ }
+
+ // optional .google.protobuf.FileOptions options = 8;
if (cached_has_bits & 0x00000008u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*options_);
- }
-
- // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
+ }
+
+ // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
if (cached_has_bits & 0x00000010u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*source_code_info_);
- }
-
+ }
+
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
@@ -1994,32 +1994,32 @@ void FileDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- dependency_.MergeFrom(from.dependency_);
+ (void) cached_has_bits;
+
+ dependency_.MergeFrom(from.dependency_);
message_type_.MergeFrom(from.message_type_);
enum_type_.MergeFrom(from.enum_type_);
service_.MergeFrom(from.service_);
extension_.MergeFrom(from.extension_);
- public_dependency_.MergeFrom(from.public_dependency_);
- weak_dependency_.MergeFrom(from.weak_dependency_);
- cached_has_bits = from._has_bits_[0];
+ public_dependency_.MergeFrom(from.public_dependency_);
+ weak_dependency_.MergeFrom(from.weak_dependency_);
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
_internal_set_name(from._internal_name());
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
_internal_set_package(from._internal_package());
}
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
_internal_set_syntax(from._internal_syntax());
- }
- if (cached_has_bits & 0x00000008u) {
+ }
+ if (cached_has_bits & 0x00000008u) {
_internal_mutable_options()->PROTOBUF_NAMESPACE_ID::FileOptions::MergeFrom(from._internal_options());
}
- if (cached_has_bits & 0x00000010u) {
+ if (cached_has_bits & 0x00000010u) {
_internal_mutable_source_code_info()->PROTOBUF_NAMESPACE_ID::SourceCodeInfo::MergeFrom(from._internal_source_code_info());
}
}
@@ -2030,7 +2030,7 @@ void FileDescriptorProto::CopyFrom(const FileDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FileDescriptorProto)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool FileDescriptorProto::IsInitialized() const {
@@ -2045,16 +2045,16 @@ bool FileDescriptorProto::IsInitialized() const {
}
void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
- dependency_.InternalSwap(&other->dependency_);
- message_type_.InternalSwap(&other->message_type_);
- enum_type_.InternalSwap(&other->enum_type_);
- service_.InternalSwap(&other->service_);
- extension_.InternalSwap(&other->extension_);
- public_dependency_.InternalSwap(&other->public_dependency_);
- weak_dependency_.InternalSwap(&other->weak_dependency_);
+ dependency_.InternalSwap(&other->dependency_);
+ message_type_.InternalSwap(&other->message_type_);
+ enum_type_.InternalSwap(&other->enum_type_);
+ service_.InternalSwap(&other->service_);
+ extension_.InternalSwap(&other->extension_);
+ public_dependency_.InternalSwap(&other->public_dependency_);
+ weak_dependency_.InternalSwap(&other->weak_dependency_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, GetArenaForAllocation(),
@@ -2120,12 +2120,12 @@ DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorP
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_options()) {
options_ = new PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions(*from.options_);
- } else {
+ } else {
options_ = nullptr;
- }
- ::memcpy(&start_, &from.start_,
- static_cast<size_t>(reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
+ }
+ ::memcpy(&start_, &from.start_,
+ static_cast<size_t>(reinterpret_cast<char*>(&end_) -
+ reinterpret_cast<char*>(&start_)) + sizeof(end_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ExtensionRange)
}
@@ -2145,7 +2145,7 @@ DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() {
inline void DescriptorProto_ExtensionRange::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- if (this != internal_default_instance()) delete options_;
+ if (this != internal_default_instance()) delete options_;
}
void DescriptorProto_ExtensionRange::ArenaDtor(void* object) {
@@ -2161,20 +2161,20 @@ void DescriptorProto_ExtensionRange::SetCachedSize(int size) const {
void DescriptorProto_ExtensionRange::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto.ExtensionRange)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(options_ != nullptr);
options_->Clear();
- }
+ }
if (cached_has_bits & 0x00000006u) {
- ::memset(&start_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
- }
- _has_bits_.Clear();
+ ::memset(&start_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&end_) -
+ reinterpret_cast<char*>(&start_)) + sizeof(end_));
+ }
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -2201,7 +2201,7 @@ const char* DescriptorProto_ExtensionRange::_InternalParse(const char* ptr, ::PR
CHK_(ptr);
} else goto handle_unusual;
continue;
- // optional .google.protobuf.ExtensionRangeOptions options = 3;
+ // optional .google.protobuf.ExtensionRangeOptions options = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_options(), ptr);
@@ -2236,29 +2236,29 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ExtensionRange)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional int32 start = 1;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_start(), target);
}
// optional int32 end = 2;
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_end(), target);
}
- // optional .google.protobuf.ExtensionRangeOptions options = 3;
- if (cached_has_bits & 0x00000001u) {
+ // optional .google.protobuf.ExtensionRangeOptions options = 3;
+ if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
3, _Internal::options(this), target, stream);
- }
-
+ }
+
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
@@ -2267,9 +2267,9 @@ failure:
return target;
}
-size_t DescriptorProto_ExtensionRange::ByteSizeLong() const {
+size_t DescriptorProto_ExtensionRange::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto.ExtensionRange)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -2277,13 +2277,13 @@ size_t DescriptorProto_ExtensionRange::ByteSizeLong() const {
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
- // optional .google.protobuf.ExtensionRangeOptions options = 3;
+ // optional .google.protobuf.ExtensionRangeOptions options = 3;
if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*options_);
- }
-
+ }
+
// optional int32 start = 1;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
@@ -2323,22 +2323,22 @@ void DescriptorProto_ExtensionRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*
void DescriptorProto_ExtensionRange::MergeFrom(const DescriptorProto_ExtensionRange& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto.ExtensionRange)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = from._has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
_internal_mutable_options()->PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions::MergeFrom(from._internal_options());
- }
- if (cached_has_bits & 0x00000002u) {
- start_ = from.start_;
}
- if (cached_has_bits & 0x00000004u) {
- end_ = from.end_;
+ if (cached_has_bits & 0x00000002u) {
+ start_ = from.start_;
}
- _has_bits_[0] |= cached_has_bits;
+ if (cached_has_bits & 0x00000004u) {
+ end_ = from.end_;
+ }
+ _has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -2347,20 +2347,20 @@ void DescriptorProto_ExtensionRange::CopyFrom(const DescriptorProto_ExtensionRan
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.DescriptorProto.ExtensionRange)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool DescriptorProto_ExtensionRange::IsInitialized() const {
if (_internal_has_options()) {
if (!options_->IsInitialized()) return false;
- }
+ }
return true;
}
void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
+ swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(DescriptorProto_ExtensionRange, end_)
+ sizeof(DescriptorProto_ExtensionRange::end_)
@@ -2382,12 +2382,12 @@ class DescriptorProto_ReservedRange::_Internal {
using HasBits = decltype(std::declval<DescriptorProto_ReservedRange>()._has_bits_);
static void set_has_start(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
- }
+ }
static void set_has_end(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
- }
+ }
};
-
+
DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
@@ -2401,9 +2401,9 @@ DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorPro
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- ::memcpy(&start_, &from.start_,
- static_cast<size_t>(reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
+ ::memcpy(&start_, &from.start_,
+ static_cast<size_t>(reinterpret_cast<char*>(&end_) -
+ reinterpret_cast<char*>(&start_)) + sizeof(end_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ReservedRange)
}
@@ -2438,16 +2438,16 @@ void DescriptorProto_ReservedRange::SetCachedSize(int size) const {
void DescriptorProto_ReservedRange::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto.ReservedRange)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- ::memset(&start_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
- }
- _has_bits_.Clear();
+ ::memset(&start_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&end_) -
+ reinterpret_cast<char*>(&start_)) + sizeof(end_));
+ }
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -2502,17 +2502,17 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ReservedRange)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional int32 start = 1;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_start(), target);
}
// optional int32 end = 2;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_end(), target);
}
@@ -2525,9 +2525,9 @@ failure:
return target;
}
-size_t DescriptorProto_ReservedRange::ByteSizeLong() const {
+size_t DescriptorProto_ReservedRange::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto.ReservedRange)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -2574,19 +2574,19 @@ void DescriptorProto_ReservedRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*t
void DescriptorProto_ReservedRange::MergeFrom(const DescriptorProto_ReservedRange& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto.ReservedRange)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = from._has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
- start_ = from.start_;
+ if (cached_has_bits & 0x00000001u) {
+ start_ = from.start_;
}
- if (cached_has_bits & 0x00000002u) {
- end_ = from.end_;
+ if (cached_has_bits & 0x00000002u) {
+ end_ = from.end_;
}
- _has_bits_[0] |= cached_has_bits;
+ _has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -2595,7 +2595,7 @@ void DescriptorProto_ReservedRange::CopyFrom(const DescriptorProto_ReservedRange
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.DescriptorProto.ReservedRange)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool DescriptorProto_ReservedRange::IsInitialized() const {
@@ -2603,9 +2603,9 @@ bool DescriptorProto_ReservedRange::IsInitialized() const {
}
void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
+ swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(DescriptorProto_ReservedRange, end_)
+ sizeof(DescriptorProto_ReservedRange::end_)
@@ -2620,8 +2620,8 @@ void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange*
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[3]);
}
-// ===================================================================
-
+// ===================================================================
+
class DescriptorProto::_Internal {
public:
using HasBits = decltype(std::declval<DescriptorProto>()._has_bits_);
@@ -2657,26 +2657,26 @@ DescriptorProto::DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
DescriptorProto::DescriptorProto(const DescriptorProto& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- field_(from.field_),
- nested_type_(from.nested_type_),
- enum_type_(from.enum_type_),
- extension_range_(from.extension_range_),
- extension_(from.extension_),
- oneof_decl_(from.oneof_decl_),
- reserved_range_(from.reserved_range_),
- reserved_name_(from.reserved_name_) {
+ _has_bits_(from._has_bits_),
+ field_(from.field_),
+ nested_type_(from.nested_type_),
+ enum_type_(from.enum_type_),
+ extension_range_(from.extension_range_),
+ extension_(from.extension_),
+ oneof_decl_(from.oneof_decl_),
+ reserved_range_(from.reserved_range_),
+ reserved_name_(from.reserved_name_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
if (from._internal_has_options()) {
options_ = new PROTOBUF_NAMESPACE_ID::MessageOptions(*from.options_);
- } else {
+ } else {
options_ = nullptr;
- }
+ }
// @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto)
}
@@ -2695,7 +2695,7 @@ DescriptorProto::~DescriptorProto() {
inline void DescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete options_;
+ if (this != internal_default_instance()) delete options_;
}
void DescriptorProto::ArenaDtor(void* object) {
@@ -2711,28 +2711,28 @@ void DescriptorProto::SetCachedSize(int size) const {
void DescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
field_.Clear();
nested_type_.Clear();
enum_type_.Clear();
extension_range_.Clear();
- extension_.Clear();
+ extension_.Clear();
oneof_decl_.Clear();
reserved_range_.Clear();
reserved_name_.Clear();
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
name_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000002u) {
+ }
+ if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(options_ != nullptr);
options_->Clear();
- }
- }
- _has_bits_.Clear();
+ }
+ }
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -2889,11 +2889,11 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional string name = 1;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -2903,7 +2903,7 @@ failure:
}
// repeated .google.protobuf.FieldDescriptorProto field = 2;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_field_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -2911,7 +2911,7 @@ failure:
}
// repeated .google.protobuf.DescriptorProto nested_type = 3;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_nested_type_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -2919,7 +2919,7 @@ failure:
}
// repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_enum_type_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -2927,7 +2927,7 @@ failure:
}
// repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_extension_range_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -2935,7 +2935,7 @@ failure:
}
// repeated .google.protobuf.FieldDescriptorProto extension = 6;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_extension_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -2943,7 +2943,7 @@ failure:
}
// optional .google.protobuf.MessageOptions options = 7;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
@@ -2951,7 +2951,7 @@ failure:
}
// repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_oneof_decl_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -2959,7 +2959,7 @@ failure:
}
// repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_reserved_range_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -2984,9 +2984,9 @@ failure:
return target;
}
-size_t DescriptorProto::ByteSizeLong() const {
+size_t DescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -2995,7 +2995,7 @@ size_t DescriptorProto::ByteSizeLong() const {
// repeated .google.protobuf.FieldDescriptorProto field = 2;
total_size += 1UL * this->_internal_field_size();
for (const auto& msg : this->field_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
@@ -3020,13 +3020,13 @@ size_t DescriptorProto::ByteSizeLong() const {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- // repeated .google.protobuf.FieldDescriptorProto extension = 6;
+ // repeated .google.protobuf.FieldDescriptorProto extension = 6;
total_size += 1UL * this->_internal_extension_size();
for (const auto& msg : this->extension_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
-
+ }
+
// repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
total_size += 1UL * this->_internal_oneof_decl_size();
for (const auto& msg : this->oneof_decl_) {
@@ -3042,7 +3042,7 @@ size_t DescriptorProto::ByteSizeLong() const {
}
// repeated string reserved_name = 10;
- total_size += 1 *
+ total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(reserved_name_.size());
for (int i = 0, n = reserved_name_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
@@ -3051,20 +3051,20 @@ size_t DescriptorProto::ByteSizeLong() const {
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- // optional string name = 1;
+ // optional string name = 1;
if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
- }
-
- // optional .google.protobuf.MessageOptions options = 7;
+ }
+
+ // optional .google.protobuf.MessageOptions options = 7;
if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*options_);
- }
-
+ }
+
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
@@ -3090,24 +3090,24 @@ void DescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void DescriptorProto::MergeFrom(const DescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
field_.MergeFrom(from.field_);
nested_type_.MergeFrom(from.nested_type_);
enum_type_.MergeFrom(from.enum_type_);
extension_range_.MergeFrom(from.extension_range_);
- extension_.MergeFrom(from.extension_);
+ extension_.MergeFrom(from.extension_);
oneof_decl_.MergeFrom(from.oneof_decl_);
reserved_range_.MergeFrom(from.reserved_range_);
- reserved_name_.MergeFrom(from.reserved_name_);
- cached_has_bits = from._has_bits_[0];
+ reserved_name_.MergeFrom(from.reserved_name_);
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
_internal_set_name(from._internal_name());
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
_internal_mutable_options()->PROTOBUF_NAMESPACE_ID::MessageOptions::MergeFrom(from._internal_options());
}
}
@@ -3118,7 +3118,7 @@ void DescriptorProto::CopyFrom(const DescriptorProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.DescriptorProto)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool DescriptorProto::IsInitialized() const {
@@ -3135,23 +3135,23 @@ bool DescriptorProto::IsInitialized() const {
}
void DescriptorProto::InternalSwap(DescriptorProto* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
- field_.InternalSwap(&other->field_);
- nested_type_.InternalSwap(&other->nested_type_);
- enum_type_.InternalSwap(&other->enum_type_);
- extension_range_.InternalSwap(&other->extension_range_);
- extension_.InternalSwap(&other->extension_);
- oneof_decl_.InternalSwap(&other->oneof_decl_);
- reserved_range_.InternalSwap(&other->reserved_range_);
- reserved_name_.InternalSwap(&other->reserved_name_);
+ field_.InternalSwap(&other->field_);
+ nested_type_.InternalSwap(&other->nested_type_);
+ enum_type_.InternalSwap(&other->enum_type_);
+ extension_range_.InternalSwap(&other->extension_range_);
+ extension_.InternalSwap(&other->extension_);
+ oneof_decl_.InternalSwap(&other->oneof_decl_);
+ reserved_range_.InternalSwap(&other->reserved_range_);
+ reserved_name_.InternalSwap(&other->reserved_name_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, GetArenaForAllocation(),
&other->name_, other->GetArenaForAllocation()
);
- swap(options_, other->options_);
+ swap(options_, other->options_);
}
::PROTOBUF_NAMESPACE_ID::Metadata DescriptorProto::GetMetadata() const {
@@ -3165,68 +3165,68 @@ void DescriptorProto::InternalSwap(DescriptorProto* other) {
class ExtensionRangeOptions::_Internal {
public:
};
-
+
ExtensionRangeOptions::ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
_extensions_(arena),
uninterpreted_option_(arena) {
- SharedCtor();
+ SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:google.protobuf.ExtensionRangeOptions)
-}
-ExtensionRangeOptions::ExtensionRangeOptions(const ExtensionRangeOptions& from)
+}
+ExtensionRangeOptions::ExtensionRangeOptions(const ExtensionRangeOptions& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- uninterpreted_option_(from.uninterpreted_option_) {
+ uninterpreted_option_(from.uninterpreted_option_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(from._extensions_);
- // @@protoc_insertion_point(copy_constructor:google.protobuf.ExtensionRangeOptions)
-}
-
-void ExtensionRangeOptions::SharedCtor() {
-}
-
-ExtensionRangeOptions::~ExtensionRangeOptions() {
- // @@protoc_insertion_point(destructor:google.protobuf.ExtensionRangeOptions)
+ _extensions_.MergeFrom(from._extensions_);
+ // @@protoc_insertion_point(copy_constructor:google.protobuf.ExtensionRangeOptions)
+}
+
+void ExtensionRangeOptions::SharedCtor() {
+}
+
+ExtensionRangeOptions::~ExtensionRangeOptions() {
+ // @@protoc_insertion_point(destructor:google.protobuf.ExtensionRangeOptions)
if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
+ SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
-}
-
+}
+
inline void ExtensionRangeOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
-}
-
+}
+
void ExtensionRangeOptions::ArenaDtor(void* object) {
ExtensionRangeOptions* _this = reinterpret_cast< ExtensionRangeOptions* >(object);
(void)_this;
-}
+}
void ExtensionRangeOptions::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
-}
+}
void ExtensionRangeOptions::SetCachedSize(int size) const {
_cached_size_.Set(size);
-}
-
-void ExtensionRangeOptions::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.ExtensionRangeOptions)
+}
+
+void ExtensionRangeOptions::Clear() {
+// @@protoc_insertion_point(message_clear_start:google.protobuf.ExtensionRangeOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- _extensions_.Clear();
- uninterpreted_option_.Clear();
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ _extensions_.Clear();
+ uninterpreted_option_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
-}
-
+}
+
const char* ExtensionRangeOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
case 999:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
ptr -= 2;
@@ -3238,19 +3238,19 @@ const char* ExtensionRangeOptions::_InternalParse(const char* ptr, ::PROTOBUF_NA
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<7994>(ptr));
} else goto handle_unusual;
continue;
- default: {
- handle_unusual:
+ default: {
+ handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
- goto success;
- }
+ goto success;
+ }
if ((8000u <= tag)) {
ptr = _extensions_.ParseField(tag, ptr,
internal_default_instance(), &_internal_metadata_, ctx);
CHK_(ptr != nullptr);
continue;
- }
+ }
ptr = UnknownFieldParse(tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
@@ -3259,46 +3259,46 @@ const char* ExtensionRangeOptions::_InternalParse(const char* ptr, ::PROTOBUF_NA
}
} // switch
} // while
-success:
+success:
return ptr;
-failure:
+failure:
ptr = nullptr;
goto success;
#undef CHK_
-}
-
+}
+
::PROTOBUF_NAMESPACE_ID::uint8* ExtensionRangeOptions::_InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ExtensionRangeOptions)
+ // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ExtensionRangeOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- for (unsigned int i = 0,
+ (void) cached_has_bits;
+
+ // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_uninterpreted_option_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(999, this->_internal_uninterpreted_option(i), target, stream);
- }
-
- // Extension range [1000, 536870912)
+ }
+
+ // Extension range [1000, 536870912)
target = _extensions_._InternalSerialize(
1000, 536870912, target, stream);
-
+
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ExtensionRangeOptions)
- return target;
-}
-
-size_t ExtensionRangeOptions::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.ExtensionRangeOptions)
- size_t total_size = 0;
-
- total_size += _extensions_.ByteSize();
-
+ }
+ // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ExtensionRangeOptions)
+ return target;
+}
+
+size_t ExtensionRangeOptions::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:google.protobuf.ExtensionRangeOptions)
+ size_t total_size = 0;
+
+ total_size += _extensions_.ByteSize();
+
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -3306,19 +3306,19 @@ size_t ExtensionRangeOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
for (const auto& msg : this->uninterpreted_option_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
+ }
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
_internal_metadata_, total_size, &_cached_size_);
- }
+ }
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
- return total_size;
-}
-
+ return total_size;
+}
+
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ExtensionRangeOptions::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ExtensionRangeOptions::MergeImpl
@@ -3329,51 +3329,51 @@ void ExtensionRangeOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
const ::PROTOBUF_NAMESPACE_ID::Message&from) {
static_cast<ExtensionRangeOptions *>(to)->MergeFrom(
static_cast<const ExtensionRangeOptions &>(from));
-}
-
+}
+
-void ExtensionRangeOptions::MergeFrom(const ExtensionRangeOptions& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ExtensionRangeOptions)
- GOOGLE_DCHECK_NE(&from, this);
+void ExtensionRangeOptions::MergeFrom(const ExtensionRangeOptions& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ExtensionRangeOptions)
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
+ (void) cached_has_bits;
+
+ uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
_extensions_.MergeFrom(from._extensions_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
-}
-
-void ExtensionRangeOptions::CopyFrom(const ExtensionRangeOptions& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.ExtensionRangeOptions)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool ExtensionRangeOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
- return false;
- }
-
+}
+
+void ExtensionRangeOptions::CopyFrom(const ExtensionRangeOptions& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.ExtensionRangeOptions)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool ExtensionRangeOptions::IsInitialized() const {
+ if (!_extensions_.IsInitialized()) {
+ return false;
+ }
+
if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false;
- return true;
-}
-
-void ExtensionRangeOptions::InternalSwap(ExtensionRangeOptions* other) {
- using std::swap;
+ return true;
+}
+
+void ExtensionRangeOptions::InternalSwap(ExtensionRangeOptions* other) {
+ using std::swap;
_extensions_.InternalSwap(&other->_extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
-}
-
+ uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+}
+
::PROTOBUF_NAMESPACE_ID::Metadata ExtensionRangeOptions::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[5]);
-}
-
-// ===================================================================
-
+}
+
+// ===================================================================
+
class FieldDescriptorProto::_Internal {
public:
using HasBits = decltype(std::declval<FieldDescriptorProto>()._has_bits_);
@@ -3434,35 +3434,35 @@ FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from)
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
extendee_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_extendee()) {
extendee_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_extendee(),
GetArenaForAllocation());
- }
+ }
type_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_type_name()) {
type_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_type_name(),
GetArenaForAllocation());
- }
+ }
default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_default_value()) {
default_value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_default_value(),
GetArenaForAllocation());
- }
+ }
json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_json_name()) {
json_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_json_name(),
GetArenaForAllocation());
- }
+ }
if (from._internal_has_options()) {
options_ = new PROTOBUF_NAMESPACE_ID::FieldOptions(*from.options_);
- } else {
+ } else {
options_ = nullptr;
- }
- ::memcpy(&number_, &from.number_,
- static_cast<size_t>(reinterpret_cast<char*>(&type_) -
- reinterpret_cast<char*>(&number_)) + sizeof(type_));
+ }
+ ::memcpy(&number_, &from.number_,
+ static_cast<size_t>(reinterpret_cast<char*>(&type_) -
+ reinterpret_cast<char*>(&number_)) + sizeof(type_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.FieldDescriptorProto)
}
@@ -3494,7 +3494,7 @@ inline void FieldDescriptorProto::SharedDtor() {
type_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
default_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
json_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete options_;
+ if (this != internal_default_instance()) delete options_;
}
void FieldDescriptorProto::ArenaDtor(void* object) {
@@ -3510,42 +3510,42 @@ void FieldDescriptorProto::SetCachedSize(int size) const {
void FieldDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FieldDescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
name_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
extendee_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000004u) {
+ }
+ if (cached_has_bits & 0x00000004u) {
type_name_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000008u) {
+ if (cached_has_bits & 0x00000008u) {
default_value_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000010u) {
+ if (cached_has_bits & 0x00000010u) {
json_name_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000020u) {
+ if (cached_has_bits & 0x00000020u) {
GOOGLE_DCHECK(options_ != nullptr);
options_->Clear();
}
}
if (cached_has_bits & 0x000000c0u) {
- ::memset(&number_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&oneof_index_) -
- reinterpret_cast<char*>(&number_)) + sizeof(oneof_index_));
- }
+ ::memset(&number_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&oneof_index_) -
+ reinterpret_cast<char*>(&number_)) + sizeof(oneof_index_));
+ }
if (cached_has_bits & 0x00000700u) {
proto3_optional_ = false;
- label_ = 1;
- type_ = 1;
- }
- _has_bits_.Clear();
+ label_ = 1;
+ type_ = 1;
+ }
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -3694,11 +3694,11 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldDescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional string name = 1;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -3708,7 +3708,7 @@ failure:
}
// optional string extendee = 2;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_extendee().data(), static_cast<int>(this->_internal_extendee().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -3718,7 +3718,7 @@ failure:
}
// optional int32 number = 3;
- if (cached_has_bits & 0x00000040u) {
+ if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_number(), target);
}
@@ -3738,7 +3738,7 @@ failure:
}
// optional string type_name = 6;
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_type_name().data(), static_cast<int>(this->_internal_type_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -3748,7 +3748,7 @@ failure:
}
// optional string default_value = 7;
- if (cached_has_bits & 0x00000008u) {
+ if (cached_has_bits & 0x00000008u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_default_value().data(), static_cast<int>(this->_internal_default_value().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -3758,7 +3758,7 @@ failure:
}
// optional .google.protobuf.FieldOptions options = 8;
- if (cached_has_bits & 0x00000020u) {
+ if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
@@ -3766,13 +3766,13 @@ failure:
}
// optional int32 oneof_index = 9;
- if (cached_has_bits & 0x00000080u) {
+ if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(9, this->_internal_oneof_index(), target);
}
// optional string json_name = 10;
- if (cached_has_bits & 0x00000010u) {
+ if (cached_has_bits & 0x00000010u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_json_name().data(), static_cast<int>(this->_internal_json_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -3782,7 +3782,7 @@ failure:
}
// optional bool proto3_optional = 17;
- if (cached_has_bits & 0x00000100u) {
+ if (cached_has_bits & 0x00000100u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_proto3_optional(), target);
}
@@ -3795,9 +3795,9 @@ failure:
return target;
}
-size_t FieldDescriptorProto::ByteSizeLong() const {
+size_t FieldDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldDescriptorProto)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -3812,14 +3812,14 @@ size_t FieldDescriptorProto::ByteSizeLong() const {
this->_internal_name());
}
- // optional string extendee = 2;
+ // optional string extendee = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_extendee());
}
- // optional string type_name = 6;
+ // optional string type_name = 6;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
@@ -3833,27 +3833,27 @@ size_t FieldDescriptorProto::ByteSizeLong() const {
this->_internal_default_value());
}
- // optional string json_name = 10;
+ // optional string json_name = 10;
if (cached_has_bits & 0x00000010u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_json_name());
- }
-
- // optional .google.protobuf.FieldOptions options = 8;
+ }
+
+ // optional .google.protobuf.FieldOptions options = 8;
if (cached_has_bits & 0x00000020u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*options_);
- }
-
- // optional int32 number = 3;
+ }
+
+ // optional int32 number = 3;
if (cached_has_bits & 0x00000040u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_number());
- }
-
+ }
+
// optional int32 oneof_index = 9;
if (cached_has_bits & 0x00000080u) {
total_size += 1 +
@@ -3868,13 +3868,13 @@ size_t FieldDescriptorProto::ByteSizeLong() const {
total_size += 2 + 1;
}
- // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
+ // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
if (cached_has_bits & 0x00000200u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_label());
}
- // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
+ // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
if (cached_has_bits & 0x00000400u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type());
@@ -3905,49 +3905,49 @@ void FieldDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldDescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = from._has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
_internal_set_name(from._internal_name());
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
_internal_set_extendee(from._internal_extendee());
- }
- if (cached_has_bits & 0x00000004u) {
+ }
+ if (cached_has_bits & 0x00000004u) {
_internal_set_type_name(from._internal_type_name());
}
- if (cached_has_bits & 0x00000008u) {
+ if (cached_has_bits & 0x00000008u) {
_internal_set_default_value(from._internal_default_value());
}
- if (cached_has_bits & 0x00000010u) {
+ if (cached_has_bits & 0x00000010u) {
_internal_set_json_name(from._internal_json_name());
}
- if (cached_has_bits & 0x00000020u) {
+ if (cached_has_bits & 0x00000020u) {
_internal_mutable_options()->PROTOBUF_NAMESPACE_ID::FieldOptions::MergeFrom(from._internal_options());
}
- if (cached_has_bits & 0x00000040u) {
- number_ = from.number_;
- }
- if (cached_has_bits & 0x00000080u) {
- oneof_index_ = from.oneof_index_;
- }
- _has_bits_[0] |= cached_has_bits;
+ if (cached_has_bits & 0x00000040u) {
+ number_ = from.number_;
+ }
+ if (cached_has_bits & 0x00000080u) {
+ oneof_index_ = from.oneof_index_;
+ }
+ _has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0x00000700u) {
- if (cached_has_bits & 0x00000100u) {
+ if (cached_has_bits & 0x00000100u) {
proto3_optional_ = from.proto3_optional_;
}
if (cached_has_bits & 0x00000200u) {
- label_ = from.label_;
- }
+ label_ = from.label_;
+ }
if (cached_has_bits & 0x00000400u) {
- type_ = from.type_;
- }
- _has_bits_[0] |= cached_has_bits;
+ type_ = from.type_;
+ }
+ _has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -3956,7 +3956,7 @@ void FieldDescriptorProto::CopyFrom(const FieldDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FieldDescriptorProto)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool FieldDescriptorProto::IsInitialized() const {
@@ -3967,7 +3967,7 @@ bool FieldDescriptorProto::IsInitialized() const {
}
void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
@@ -4001,8 +4001,8 @@ void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) {
- PROTOBUF_FIELD_OFFSET(FieldDescriptorProto, options_)>(
reinterpret_cast<char*>(&options_),
reinterpret_cast<char*>(&other->options_));
- swap(label_, other->label_);
- swap(type_, other->type_);
+ swap(label_, other->label_);
+ swap(type_, other->type_);
}
::PROTOBUF_NAMESPACE_ID::Metadata FieldDescriptorProto::GetMetadata() const {
@@ -4046,12 +4046,12 @@ OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from)
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
if (from._internal_has_options()) {
options_ = new PROTOBUF_NAMESPACE_ID::OneofOptions(*from.options_);
- } else {
+ } else {
options_ = nullptr;
- }
+ }
// @@protoc_insertion_point(copy_constructor:google.protobuf.OneofDescriptorProto)
}
@@ -4070,7 +4070,7 @@ OneofDescriptorProto::~OneofDescriptorProto() {
inline void OneofDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete options_;
+ if (this != internal_default_instance()) delete options_;
}
void OneofDescriptorProto::ArenaDtor(void* object) {
@@ -4086,20 +4086,20 @@ void OneofDescriptorProto::SetCachedSize(int size) const {
void OneofDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.OneofDescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
name_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(options_ != nullptr);
options_->Clear();
}
}
- _has_bits_.Clear();
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -4156,11 +4156,11 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofDescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional string name = 1;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -4170,7 +4170,7 @@ failure:
}
// optional .google.protobuf.OneofOptions options = 2;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
@@ -4185,9 +4185,9 @@ failure:
return target;
}
-size_t OneofDescriptorProto::ByteSizeLong() const {
+size_t OneofDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.OneofDescriptorProto)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -4234,16 +4234,16 @@ void OneofDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void OneofDescriptorProto::MergeFrom(const OneofDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofDescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = from._has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
_internal_set_name(from._internal_name());
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
_internal_mutable_options()->PROTOBUF_NAMESPACE_ID::OneofOptions::MergeFrom(from._internal_options());
}
}
@@ -4254,7 +4254,7 @@ void OneofDescriptorProto::CopyFrom(const OneofDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.OneofDescriptorProto)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool OneofDescriptorProto::IsInitialized() const {
@@ -4265,7 +4265,7 @@ bool OneofDescriptorProto::IsInitialized() const {
}
void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
@@ -4273,7 +4273,7 @@ void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) {
&name_, GetArenaForAllocation(),
&other->name_, other->GetArenaForAllocation()
);
- swap(options_, other->options_);
+ swap(options_, other->options_);
}
::PROTOBUF_NAMESPACE_ID::Metadata OneofDescriptorProto::GetMetadata() const {
@@ -4337,7 +4337,7 @@ void EnumDescriptorProto_EnumReservedRange::ArenaDtor(void* object) {
(void)_this;
}
void EnumDescriptorProto_EnumReservedRange::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
-}
+}
void EnumDescriptorProto_EnumReservedRange::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
@@ -4559,7 +4559,7 @@ EnumDescriptorProto::EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
+ _has_bits_(from._has_bits_),
value_(from.value_),
reserved_range_(from.reserved_range_),
reserved_name_(from.reserved_name_) {
@@ -4568,12 +4568,12 @@ EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from)
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
if (from._internal_has_options()) {
options_ = new PROTOBUF_NAMESPACE_ID::EnumOptions(*from.options_);
- } else {
+ } else {
options_ = nullptr;
- }
+ }
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto)
}
@@ -4592,7 +4592,7 @@ EnumDescriptorProto::~EnumDescriptorProto() {
inline void EnumDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete options_;
+ if (this != internal_default_instance()) delete options_;
}
void EnumDescriptorProto::ArenaDtor(void* object) {
@@ -4608,23 +4608,23 @@ void EnumDescriptorProto::SetCachedSize(int size) const {
void EnumDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumDescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- value_.Clear();
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ value_.Clear();
reserved_range_.Clear();
reserved_name_.Clear();
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
name_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(options_ != nullptr);
options_->Clear();
}
}
- _has_bits_.Clear();
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -4721,11 +4721,11 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional string name = 1;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -4735,7 +4735,7 @@ failure:
}
// repeated .google.protobuf.EnumValueDescriptorProto value = 2;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_value_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -4743,7 +4743,7 @@ failure:
}
// optional .google.protobuf.EnumOptions options = 3;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
@@ -4751,7 +4751,7 @@ failure:
}
// repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_reserved_range_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -4776,9 +4776,9 @@ failure:
return target;
}
-size_t EnumDescriptorProto::ByteSizeLong() const {
+size_t EnumDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumDescriptorProto)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -4787,17 +4787,17 @@ size_t EnumDescriptorProto::ByteSizeLong() const {
// repeated .google.protobuf.EnumValueDescriptorProto value = 2;
total_size += 1UL * this->_internal_value_size();
for (const auto& msg : this->value_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
+ }
// repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
total_size += 1UL * this->_internal_reserved_range_size();
for (const auto& msg : this->reserved_range_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
-
+ }
+
// repeated string reserved_name = 5;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(reserved_name_.size());
@@ -4847,19 +4847,19 @@ void EnumDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumDescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
value_.MergeFrom(from.value_);
reserved_range_.MergeFrom(from.reserved_range_);
reserved_name_.MergeFrom(from.reserved_name_);
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
_internal_set_name(from._internal_name());
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
_internal_mutable_options()->PROTOBUF_NAMESPACE_ID::EnumOptions::MergeFrom(from._internal_options());
}
}
@@ -4870,7 +4870,7 @@ void EnumDescriptorProto::CopyFrom(const EnumDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.EnumDescriptorProto)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool EnumDescriptorProto::IsInitialized() const {
@@ -4882,10 +4882,10 @@ bool EnumDescriptorProto::IsInitialized() const {
}
void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
- value_.InternalSwap(&other->value_);
+ value_.InternalSwap(&other->value_);
reserved_range_.InternalSwap(&other->reserved_range_);
reserved_name_.InternalSwap(&other->reserved_name_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
@@ -4893,7 +4893,7 @@ void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) {
&name_, GetArenaForAllocation(),
&other->name_, other->GetArenaForAllocation()
);
- swap(options_, other->options_);
+ swap(options_, other->options_);
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumDescriptorProto::GetMetadata() const {
@@ -4940,13 +4940,13 @@ EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProt
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
if (from._internal_has_options()) {
options_ = new PROTOBUF_NAMESPACE_ID::EnumValueOptions(*from.options_);
- } else {
+ } else {
options_ = nullptr;
- }
- number_ = from.number_;
+ }
+ number_ = from.number_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueDescriptorProto)
}
@@ -4968,7 +4968,7 @@ EnumValueDescriptorProto::~EnumValueDescriptorProto() {
inline void EnumValueDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete options_;
+ if (this != internal_default_instance()) delete options_;
}
void EnumValueDescriptorProto::ArenaDtor(void* object) {
@@ -4984,21 +4984,21 @@ void EnumValueDescriptorProto::SetCachedSize(int size) const {
void EnumValueDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValueDescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
name_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(options_ != nullptr);
options_->Clear();
}
}
- number_ = 0;
- _has_bits_.Clear();
+ number_ = 0;
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -5063,11 +5063,11 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueDescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional string name = 1;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -5077,13 +5077,13 @@ failure:
}
// optional int32 number = 2;
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_number(), target);
}
// optional .google.protobuf.EnumValueOptions options = 3;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
@@ -5098,9 +5098,9 @@ failure:
return target;
}
-size_t EnumValueDescriptorProto::ByteSizeLong() const {
+size_t EnumValueDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValueDescriptorProto)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -5115,13 +5115,13 @@ size_t EnumValueDescriptorProto::ByteSizeLong() const {
this->_internal_name());
}
- // optional .google.protobuf.EnumValueOptions options = 3;
+ // optional .google.protobuf.EnumValueOptions options = 3;
if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*options_);
- }
-
+ }
+
// optional int32 number = 2;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
@@ -5154,22 +5154,22 @@ void EnumValueDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueDescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = from._has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
_internal_set_name(from._internal_name());
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
_internal_mutable_options()->PROTOBUF_NAMESPACE_ID::EnumValueOptions::MergeFrom(from._internal_options());
- }
- if (cached_has_bits & 0x00000004u) {
- number_ = from.number_;
}
- _has_bits_[0] |= cached_has_bits;
+ if (cached_has_bits & 0x00000004u) {
+ number_ = from.number_;
+ }
+ _has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -5178,7 +5178,7 @@ void EnumValueDescriptorProto::CopyFrom(const EnumValueDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.EnumValueDescriptorProto)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool EnumValueDescriptorProto::IsInitialized() const {
@@ -5189,9 +5189,9 @@ bool EnumValueDescriptorProto::IsInitialized() const {
}
void EnumValueDescriptorProto::InternalSwap(EnumValueDescriptorProto* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
+ swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, GetArenaForAllocation(),
@@ -5241,19 +5241,19 @@ ServiceDescriptorProto::ServiceDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* a
}
ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- method_(from.method_) {
+ _has_bits_(from._has_bits_),
+ method_(from.method_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
if (from._internal_has_options()) {
options_ = new PROTOBUF_NAMESPACE_ID::ServiceOptions(*from.options_);
- } else {
+ } else {
options_ = nullptr;
- }
+ }
// @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceDescriptorProto)
}
@@ -5272,7 +5272,7 @@ ServiceDescriptorProto::~ServiceDescriptorProto() {
inline void ServiceDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete options_;
+ if (this != internal_default_instance()) delete options_;
}
void ServiceDescriptorProto::ArenaDtor(void* object) {
@@ -5288,21 +5288,21 @@ void ServiceDescriptorProto::SetCachedSize(int size) const {
void ServiceDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ServiceDescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- method_.Clear();
- cached_has_bits = _has_bits_[0];
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ method_.Clear();
+ cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
name_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(options_ != nullptr);
options_->Clear();
}
}
- _has_bits_.Clear();
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -5371,11 +5371,11 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceDescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional string name = 1;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -5385,7 +5385,7 @@ failure:
}
// repeated .google.protobuf.MethodDescriptorProto method = 2;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_method_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -5393,7 +5393,7 @@ failure:
}
// optional .google.protobuf.ServiceOptions options = 3;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
@@ -5408,9 +5408,9 @@ failure:
return target;
}
-size_t ServiceDescriptorProto::ByteSizeLong() const {
+size_t ServiceDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.ServiceDescriptorProto)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -5419,10 +5419,10 @@ size_t ServiceDescriptorProto::ByteSizeLong() const {
// repeated .google.protobuf.MethodDescriptorProto method = 2;
total_size += 1UL * this->_internal_method_size();
for (const auto& msg : this->method_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
-
+ }
+
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional string name = 1;
@@ -5464,17 +5464,17 @@ void ServiceDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceDescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
method_.MergeFrom(from.method_);
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
_internal_set_name(from._internal_name());
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
_internal_mutable_options()->PROTOBUF_NAMESPACE_ID::ServiceOptions::MergeFrom(from._internal_options());
}
}
@@ -5485,7 +5485,7 @@ void ServiceDescriptorProto::CopyFrom(const ServiceDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.ServiceDescriptorProto)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool ServiceDescriptorProto::IsInitialized() const {
@@ -5497,16 +5497,16 @@ bool ServiceDescriptorProto::IsInitialized() const {
}
void ServiceDescriptorProto::InternalSwap(ServiceDescriptorProto* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
- method_.InternalSwap(&other->method_);
+ method_.InternalSwap(&other->method_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, GetArenaForAllocation(),
&other->name_, other->GetArenaForAllocation()
);
- swap(options_, other->options_);
+ swap(options_, other->options_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ServiceDescriptorProto::GetMetadata() const {
@@ -5562,25 +5562,25 @@ MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from)
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
input_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_input_type()) {
input_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_input_type(),
GetArenaForAllocation());
- }
+ }
output_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_output_type()) {
output_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_output_type(),
GetArenaForAllocation());
- }
+ }
if (from._internal_has_options()) {
options_ = new PROTOBUF_NAMESPACE_ID::MethodOptions(*from.options_);
- } else {
+ } else {
options_ = nullptr;
- }
- ::memcpy(&client_streaming_, &from.client_streaming_,
- static_cast<size_t>(reinterpret_cast<char*>(&server_streaming_) -
- reinterpret_cast<char*>(&client_streaming_)) + sizeof(server_streaming_));
+ }
+ ::memcpy(&client_streaming_, &from.client_streaming_,
+ static_cast<size_t>(reinterpret_cast<char*>(&server_streaming_) -
+ reinterpret_cast<char*>(&client_streaming_)) + sizeof(server_streaming_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.MethodDescriptorProto)
}
@@ -5606,7 +5606,7 @@ inline void MethodDescriptorProto::SharedDtor() {
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
input_type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
output_type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete options_;
+ if (this != internal_default_instance()) delete options_;
}
void MethodDescriptorProto::ArenaDtor(void* object) {
@@ -5622,21 +5622,21 @@ void MethodDescriptorProto::SetCachedSize(int size) const {
void MethodDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.MethodDescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
name_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
input_type_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
output_type_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000008u) {
+ if (cached_has_bits & 0x00000008u) {
GOOGLE_DCHECK(options_ != nullptr);
options_->Clear();
}
@@ -5644,7 +5644,7 @@ void MethodDescriptorProto::Clear() {
::memset(&client_streaming_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&server_streaming_) -
reinterpret_cast<char*>(&client_streaming_)) + sizeof(server_streaming_));
- _has_bits_.Clear();
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -5739,11 +5739,11 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodDescriptorProto)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional string name = 1;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -5753,7 +5753,7 @@ failure:
}
// optional string input_type = 2;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_input_type().data(), static_cast<int>(this->_internal_input_type().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -5763,7 +5763,7 @@ failure:
}
// optional string output_type = 3;
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_output_type().data(), static_cast<int>(this->_internal_output_type().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -5773,7 +5773,7 @@ failure:
}
// optional .google.protobuf.MethodOptions options = 4;
- if (cached_has_bits & 0x00000008u) {
+ if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
@@ -5781,13 +5781,13 @@ failure:
}
// optional bool client_streaming = 5 [default = false];
- if (cached_has_bits & 0x00000010u) {
+ if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_client_streaming(), target);
}
// optional bool server_streaming = 6 [default = false];
- if (cached_has_bits & 0x00000020u) {
+ if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_server_streaming(), target);
}
@@ -5800,9 +5800,9 @@ failure:
return target;
}
-size_t MethodDescriptorProto::ByteSizeLong() const {
+size_t MethodDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.MethodDescriptorProto)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -5873,31 +5873,31 @@ void MethodDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodDescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = from._has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
_internal_set_name(from._internal_name());
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
_internal_set_input_type(from._internal_input_type());
}
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
_internal_set_output_type(from._internal_output_type());
}
- if (cached_has_bits & 0x00000008u) {
+ if (cached_has_bits & 0x00000008u) {
_internal_mutable_options()->PROTOBUF_NAMESPACE_ID::MethodOptions::MergeFrom(from._internal_options());
}
- if (cached_has_bits & 0x00000010u) {
- client_streaming_ = from.client_streaming_;
+ if (cached_has_bits & 0x00000010u) {
+ client_streaming_ = from.client_streaming_;
}
- if (cached_has_bits & 0x00000020u) {
- server_streaming_ = from.server_streaming_;
+ if (cached_has_bits & 0x00000020u) {
+ server_streaming_ = from.server_streaming_;
}
- _has_bits_[0] |= cached_has_bits;
+ _has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -5906,7 +5906,7 @@ void MethodDescriptorProto::CopyFrom(const MethodDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.MethodDescriptorProto)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool MethodDescriptorProto::IsInitialized() const {
@@ -5917,9 +5917,9 @@ bool MethodDescriptorProto::IsInitialized() const {
}
void MethodDescriptorProto::InternalSwap(MethodDescriptorProto* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
+ swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, GetArenaForAllocation(),
@@ -6029,50 +6029,50 @@ FileOptions::FileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
FileOptions::FileOptions(const FileOptions& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- uninterpreted_option_(from.uninterpreted_option_) {
+ _has_bits_(from._has_bits_),
+ uninterpreted_option_(from.uninterpreted_option_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(from._extensions_);
+ _extensions_.MergeFrom(from._extensions_);
java_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_java_package()) {
java_package_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_java_package(),
GetArenaForAllocation());
- }
+ }
java_outer_classname_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_java_outer_classname()) {
java_outer_classname_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_java_outer_classname(),
GetArenaForAllocation());
- }
+ }
go_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_go_package()) {
go_package_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_go_package(),
GetArenaForAllocation());
- }
+ }
objc_class_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_objc_class_prefix()) {
objc_class_prefix_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_objc_class_prefix(),
GetArenaForAllocation());
- }
+ }
csharp_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_csharp_namespace()) {
csharp_namespace_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_csharp_namespace(),
GetArenaForAllocation());
- }
+ }
swift_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_swift_prefix()) {
swift_prefix_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_swift_prefix(),
GetArenaForAllocation());
- }
+ }
php_class_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_php_class_prefix()) {
php_class_prefix_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_php_class_prefix(),
GetArenaForAllocation());
- }
+ }
php_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_php_namespace()) {
php_namespace_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_php_namespace(),
GetArenaForAllocation());
- }
+ }
php_metadata_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_php_metadata_namespace()) {
php_metadata_namespace_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_php_metadata_namespace(),
@@ -6142,37 +6142,37 @@ void FileOptions::SetCachedSize(int size) const {
void FileOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FileOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
_extensions_.Clear();
- uninterpreted_option_.Clear();
- cached_has_bits = _has_bits_[0];
+ uninterpreted_option_.Clear();
+ cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
java_package_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
java_outer_classname_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
go_package_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000008u) {
+ if (cached_has_bits & 0x00000008u) {
objc_class_prefix_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000010u) {
+ if (cached_has_bits & 0x00000010u) {
csharp_namespace_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000020u) {
+ if (cached_has_bits & 0x00000020u) {
swift_prefix_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000040u) {
+ }
+ if (cached_has_bits & 0x00000040u) {
php_class_prefix_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000080u) {
+ }
+ if (cached_has_bits & 0x00000080u) {
php_namespace_.ClearNonDefaultToEmpty();
- }
+ }
}
if (cached_has_bits & 0x00000300u) {
if (cached_has_bits & 0x00000100u) {
@@ -6181,7 +6181,7 @@ void FileOptions::Clear() {
if (cached_has_bits & 0x00000200u) {
ruby_package_.ClearNonDefaultToEmpty();
}
- }
+ }
if (cached_has_bits & 0x0000fc00u) {
::memset(&java_multiple_files_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&py_generic_services_) -
@@ -6191,10 +6191,10 @@ void FileOptions::Clear() {
::memset(&php_generic_services_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&deprecated_) -
reinterpret_cast<char*>(&php_generic_services_)) + sizeof(deprecated_));
- optimize_for_ = 1;
+ optimize_for_ = 1;
cc_enable_arenas_ = true;
- }
- _has_bits_.Clear();
+ }
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -6282,7 +6282,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
CHK_(ptr);
} else goto handle_unusual;
continue;
- // optional bool java_generate_equals_and_hash = 20 [deprecated = true];
+ // optional bool java_generate_equals_and_hash = 20 [deprecated = true];
case 20:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) {
_Internal::set_has_java_generate_equals_and_hash(&has_bits);
@@ -6336,7 +6336,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
CHK_(ptr);
} else goto handle_unusual;
continue;
- // optional string swift_prefix = 39;
+ // optional string swift_prefix = 39;
case 39:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
auto str = _internal_mutable_swift_prefix();
@@ -6347,7 +6347,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
CHK_(ptr);
} else goto handle_unusual;
continue;
- // optional string php_class_prefix = 40;
+ // optional string php_class_prefix = 40;
case 40:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
auto str = _internal_mutable_php_class_prefix();
@@ -6358,7 +6358,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
CHK_(ptr);
} else goto handle_unusual;
continue;
- // optional string php_namespace = 41;
+ // optional string php_namespace = 41;
case 41:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) {
auto str = _internal_mutable_php_namespace();
@@ -6369,7 +6369,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
CHK_(ptr);
} else goto handle_unusual;
continue;
- // optional bool php_generic_services = 42 [default = false];
+ // optional bool php_generic_services = 42 [default = false];
case 42:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) {
_Internal::set_has_php_generic_services(&has_bits);
@@ -6445,11 +6445,11 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional string java_package = 1;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_java_package().data(), static_cast<int>(this->_internal_java_package().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -6459,7 +6459,7 @@ failure:
}
// optional string java_outer_classname = 8;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_java_outer_classname().data(), static_cast<int>(this->_internal_java_outer_classname().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -6482,7 +6482,7 @@ failure:
}
// optional string go_package = 11;
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_go_package().data(), static_cast<int>(this->_internal_go_package().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -6509,7 +6509,7 @@ failure:
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->_internal_py_generic_services(), target);
}
- // optional bool java_generate_equals_and_hash = 20 [deprecated = true];
+ // optional bool java_generate_equals_and_hash = 20 [deprecated = true];
if (cached_has_bits & 0x00000800u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(20, this->_internal_java_generate_equals_and_hash(), target);
@@ -6534,7 +6534,7 @@ failure:
}
// optional string objc_class_prefix = 36;
- if (cached_has_bits & 0x00000008u) {
+ if (cached_has_bits & 0x00000008u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_objc_class_prefix().data(), static_cast<int>(this->_internal_objc_class_prefix().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -6544,7 +6544,7 @@ failure:
}
// optional string csharp_namespace = 37;
- if (cached_has_bits & 0x00000010u) {
+ if (cached_has_bits & 0x00000010u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_csharp_namespace().data(), static_cast<int>(this->_internal_csharp_namespace().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -6553,37 +6553,37 @@ failure:
37, this->_internal_csharp_namespace(), target);
}
- // optional string swift_prefix = 39;
- if (cached_has_bits & 0x00000020u) {
+ // optional string swift_prefix = 39;
+ if (cached_has_bits & 0x00000020u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_swift_prefix().data(), static_cast<int>(this->_internal_swift_prefix().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "google.protobuf.FileOptions.swift_prefix");
+ "google.protobuf.FileOptions.swift_prefix");
target = stream->WriteStringMaybeAliased(
39, this->_internal_swift_prefix(), target);
- }
-
- // optional string php_class_prefix = 40;
- if (cached_has_bits & 0x00000040u) {
+ }
+
+ // optional string php_class_prefix = 40;
+ if (cached_has_bits & 0x00000040u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_php_class_prefix().data(), static_cast<int>(this->_internal_php_class_prefix().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "google.protobuf.FileOptions.php_class_prefix");
+ "google.protobuf.FileOptions.php_class_prefix");
target = stream->WriteStringMaybeAliased(
40, this->_internal_php_class_prefix(), target);
- }
-
- // optional string php_namespace = 41;
- if (cached_has_bits & 0x00000080u) {
+ }
+
+ // optional string php_namespace = 41;
+ if (cached_has_bits & 0x00000080u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_php_namespace().data(), static_cast<int>(this->_internal_php_namespace().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "google.protobuf.FileOptions.php_namespace");
+ "google.protobuf.FileOptions.php_namespace");
target = stream->WriteStringMaybeAliased(
41, this->_internal_php_namespace(), target);
- }
-
- // optional bool php_generic_services = 42 [default = false];
+ }
+
+ // optional bool php_generic_services = 42 [default = false];
if (cached_has_bits & 0x00010000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(42, this->_internal_php_generic_services(), target);
@@ -6610,7 +6610,7 @@ failure:
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_uninterpreted_option_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -6629,12 +6629,12 @@ failure:
return target;
}
-size_t FileOptions::ByteSizeLong() const {
+size_t FileOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileOptions)
- size_t total_size = 0;
+ size_t total_size = 0;
+
+ total_size += _extensions_.ByteSize();
- total_size += _extensions_.ByteSize();
-
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -6642,10 +6642,10 @@ size_t FileOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
for (const auto& msg : this->uninterpreted_option_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
-
+ }
+
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional string java_package = 1;
@@ -6662,57 +6662,57 @@ size_t FileOptions::ByteSizeLong() const {
this->_internal_java_outer_classname());
}
- // optional string go_package = 11;
+ // optional string go_package = 11;
if (cached_has_bits & 0x00000004u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_go_package());
- }
-
- // optional string objc_class_prefix = 36;
+ }
+
+ // optional string objc_class_prefix = 36;
if (cached_has_bits & 0x00000008u) {
- total_size += 2 +
+ total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_objc_class_prefix());
- }
-
- // optional string csharp_namespace = 37;
+ }
+
+ // optional string csharp_namespace = 37;
if (cached_has_bits & 0x00000010u) {
- total_size += 2 +
+ total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_csharp_namespace());
- }
-
- // optional string swift_prefix = 39;
+ }
+
+ // optional string swift_prefix = 39;
if (cached_has_bits & 0x00000020u) {
- total_size += 2 +
+ total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_swift_prefix());
- }
-
- // optional string php_class_prefix = 40;
+ }
+
+ // optional string php_class_prefix = 40;
if (cached_has_bits & 0x00000040u) {
- total_size += 2 +
+ total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_php_class_prefix());
- }
-
- // optional string php_namespace = 41;
+ }
+
+ // optional string php_namespace = 41;
if (cached_has_bits & 0x00000080u) {
- total_size += 2 +
+ total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_php_namespace());
- }
-
- }
+ }
+
+ }
if (cached_has_bits & 0x0000ff00u) {
// optional string php_metadata_namespace = 44;
if (cached_has_bits & 0x00000100u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_php_metadata_namespace());
- }
-
+ }
+
// optional string ruby_package = 45;
if (cached_has_bits & 0x00000200u) {
total_size += 2 +
@@ -6725,7 +6725,7 @@ size_t FileOptions::ByteSizeLong() const {
total_size += 1 + 1;
}
- // optional bool java_generate_equals_and_hash = 20 [deprecated = true];
+ // optional bool java_generate_equals_and_hash = 20 [deprecated = true];
if (cached_has_bits & 0x00000800u) {
total_size += 2 + 1;
}
@@ -6752,19 +6752,19 @@ size_t FileOptions::ByteSizeLong() const {
}
if (cached_has_bits & 0x000f0000u) {
- // optional bool php_generic_services = 42 [default = false];
+ // optional bool php_generic_services = 42 [default = false];
if (cached_has_bits & 0x00010000u) {
total_size += 2 + 1;
}
- // optional bool deprecated = 23 [default = false];
+ // optional bool deprecated = 23 [default = false];
if (cached_has_bits & 0x00020000u) {
total_size += 2 + 1;
}
- // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
+ // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
if (cached_has_bits & 0x00040000u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_optimize_for());
}
@@ -6798,79 +6798,79 @@ void FileOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void FileOptions::MergeFrom(const FileOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileOptions)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
_internal_set_java_package(from._internal_java_package());
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
_internal_set_java_outer_classname(from._internal_java_outer_classname());
}
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
_internal_set_go_package(from._internal_go_package());
- }
- if (cached_has_bits & 0x00000008u) {
+ }
+ if (cached_has_bits & 0x00000008u) {
_internal_set_objc_class_prefix(from._internal_objc_class_prefix());
- }
- if (cached_has_bits & 0x00000010u) {
+ }
+ if (cached_has_bits & 0x00000010u) {
_internal_set_csharp_namespace(from._internal_csharp_namespace());
- }
- if (cached_has_bits & 0x00000020u) {
+ }
+ if (cached_has_bits & 0x00000020u) {
_internal_set_swift_prefix(from._internal_swift_prefix());
- }
- if (cached_has_bits & 0x00000040u) {
+ }
+ if (cached_has_bits & 0x00000040u) {
_internal_set_php_class_prefix(from._internal_php_class_prefix());
}
- if (cached_has_bits & 0x00000080u) {
+ if (cached_has_bits & 0x00000080u) {
_internal_set_php_namespace(from._internal_php_namespace());
}
- }
+ }
if (cached_has_bits & 0x0000ff00u) {
- if (cached_has_bits & 0x00000100u) {
+ if (cached_has_bits & 0x00000100u) {
_internal_set_php_metadata_namespace(from._internal_php_metadata_namespace());
}
- if (cached_has_bits & 0x00000200u) {
+ if (cached_has_bits & 0x00000200u) {
_internal_set_ruby_package(from._internal_ruby_package());
}
- if (cached_has_bits & 0x00000400u) {
+ if (cached_has_bits & 0x00000400u) {
java_multiple_files_ = from.java_multiple_files_;
}
- if (cached_has_bits & 0x00000800u) {
+ if (cached_has_bits & 0x00000800u) {
java_generate_equals_and_hash_ = from.java_generate_equals_and_hash_;
}
- if (cached_has_bits & 0x00001000u) {
+ if (cached_has_bits & 0x00001000u) {
java_string_check_utf8_ = from.java_string_check_utf8_;
}
- if (cached_has_bits & 0x00002000u) {
+ if (cached_has_bits & 0x00002000u) {
cc_generic_services_ = from.cc_generic_services_;
}
- if (cached_has_bits & 0x00004000u) {
+ if (cached_has_bits & 0x00004000u) {
java_generic_services_ = from.java_generic_services_;
}
- if (cached_has_bits & 0x00008000u) {
+ if (cached_has_bits & 0x00008000u) {
py_generic_services_ = from.py_generic_services_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
+ }
+ _has_bits_[0] |= cached_has_bits;
+ }
if (cached_has_bits & 0x000f0000u) {
- if (cached_has_bits & 0x00010000u) {
+ if (cached_has_bits & 0x00010000u) {
php_generic_services_ = from.php_generic_services_;
}
if (cached_has_bits & 0x00020000u) {
deprecated_ = from.deprecated_;
}
if (cached_has_bits & 0x00040000u) {
- optimize_for_ = from.optimize_for_;
- }
+ optimize_for_ = from.optimize_for_;
+ }
if (cached_has_bits & 0x00080000u) {
cc_enable_arenas_ = from.cc_enable_arenas_;
}
- _has_bits_[0] |= cached_has_bits;
+ _has_bits_[0] |= cached_has_bits;
}
_extensions_.MergeFrom(from._extensions_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
@@ -6880,24 +6880,24 @@ void FileOptions::CopyFrom(const FileOptions& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FileOptions)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool FileOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
- return false;
- }
-
+ if (!_extensions_.IsInitialized()) {
+ return false;
+ }
+
if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false;
- return true;
+ return true;
}
void FileOptions::InternalSwap(FileOptions* other) {
- using std::swap;
+ using std::swap;
_extensions_.InternalSwap(&other->_extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&java_package_, GetArenaForAllocation(),
@@ -6955,7 +6955,7 @@ void FileOptions::InternalSwap(FileOptions* other) {
reinterpret_cast<char*>(&java_multiple_files_),
reinterpret_cast<char*>(&other->java_multiple_files_));
swap(optimize_for_, other->optimize_for_);
- swap(cc_enable_arenas_, other->cc_enable_arenas_);
+ swap(cc_enable_arenas_, other->cc_enable_arenas_);
}
::PROTOBUF_NAMESPACE_ID::Metadata FileOptions::GetMetadata() const {
@@ -6996,13 +6996,13 @@ MessageOptions::MessageOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
MessageOptions::MessageOptions(const MessageOptions& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- uninterpreted_option_(from.uninterpreted_option_) {
+ _has_bits_(from._has_bits_),
+ uninterpreted_option_(from.uninterpreted_option_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(from._extensions_);
- ::memcpy(&message_set_wire_format_, &from.message_set_wire_format_,
- static_cast<size_t>(reinterpret_cast<char*>(&map_entry_) -
- reinterpret_cast<char*>(&message_set_wire_format_)) + sizeof(map_entry_));
+ _extensions_.MergeFrom(from._extensions_);
+ ::memcpy(&message_set_wire_format_, &from.message_set_wire_format_,
+ static_cast<size_t>(reinterpret_cast<char*>(&map_entry_) -
+ reinterpret_cast<char*>(&message_set_wire_format_)) + sizeof(map_entry_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.MessageOptions)
}
@@ -7037,15 +7037,15 @@ void MessageOptions::SetCachedSize(int size) const {
void MessageOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.MessageOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
_extensions_.Clear();
uninterpreted_option_.Clear();
::memset(&message_set_wire_format_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&map_entry_) -
reinterpret_cast<char*>(&message_set_wire_format_)) + sizeof(map_entry_));
- _has_bits_.Clear();
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -7134,35 +7134,35 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MessageOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional bool message_set_wire_format = 1 [default = false];
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_message_set_wire_format(), target);
}
// optional bool no_standard_descriptor_accessor = 2 [default = false];
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_no_standard_descriptor_accessor(), target);
}
// optional bool deprecated = 3 [default = false];
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_deprecated(), target);
}
// optional bool map_entry = 7;
- if (cached_has_bits & 0x00000008u) {
+ if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_map_entry(), target);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_uninterpreted_option_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -7181,12 +7181,12 @@ failure:
return target;
}
-size_t MessageOptions::ByteSizeLong() const {
+size_t MessageOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.MessageOptions)
- size_t total_size = 0;
+ size_t total_size = 0;
+
+ total_size += _extensions_.ByteSize();
- total_size += _extensions_.ByteSize();
-
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -7194,10 +7194,10 @@ size_t MessageOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
for (const auto& msg : this->uninterpreted_option_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
-
+ }
+
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
// optional bool message_set_wire_format = 1 [default = false];
@@ -7245,26 +7245,26 @@ void MessageOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void MessageOptions::MergeFrom(const MessageOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MessageOptions)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
- if (cached_has_bits & 0x00000001u) {
- message_set_wire_format_ = from.message_set_wire_format_;
+ if (cached_has_bits & 0x00000001u) {
+ message_set_wire_format_ = from.message_set_wire_format_;
}
- if (cached_has_bits & 0x00000002u) {
- no_standard_descriptor_accessor_ = from.no_standard_descriptor_accessor_;
+ if (cached_has_bits & 0x00000002u) {
+ no_standard_descriptor_accessor_ = from.no_standard_descriptor_accessor_;
}
- if (cached_has_bits & 0x00000004u) {
- deprecated_ = from.deprecated_;
+ if (cached_has_bits & 0x00000004u) {
+ deprecated_ = from.deprecated_;
}
- if (cached_has_bits & 0x00000008u) {
- map_entry_ = from.map_entry_;
+ if (cached_has_bits & 0x00000008u) {
+ map_entry_ = from.map_entry_;
}
- _has_bits_[0] |= cached_has_bits;
+ _has_bits_[0] |= cached_has_bits;
}
_extensions_.MergeFrom(from._extensions_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
@@ -7274,24 +7274,24 @@ void MessageOptions::CopyFrom(const MessageOptions& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.MessageOptions)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool MessageOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
- return false;
- }
-
+ if (!_extensions_.IsInitialized()) {
+ return false;
+ }
+
if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false;
- return true;
+ return true;
}
void MessageOptions::InternalSwap(MessageOptions* other) {
- using std::swap;
+ using std::swap;
_extensions_.InternalSwap(&other->_extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(MessageOptions, map_entry_)
+ sizeof(MessageOptions::map_entry_)
@@ -7344,13 +7344,13 @@ FieldOptions::FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
FieldOptions::FieldOptions(const FieldOptions& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- uninterpreted_option_(from.uninterpreted_option_) {
+ _has_bits_(from._has_bits_),
+ uninterpreted_option_(from.uninterpreted_option_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(from._extensions_);
- ::memcpy(&ctype_, &from.ctype_,
- static_cast<size_t>(reinterpret_cast<char*>(&jstype_) -
- reinterpret_cast<char*>(&ctype_)) + sizeof(jstype_));
+ _extensions_.MergeFrom(from._extensions_);
+ ::memcpy(&ctype_, &from.ctype_,
+ static_cast<size_t>(reinterpret_cast<char*>(&jstype_) -
+ reinterpret_cast<char*>(&ctype_)) + sizeof(jstype_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.FieldOptions)
}
@@ -7385,18 +7385,18 @@ void FieldOptions::SetCachedSize(int size) const {
void FieldOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FieldOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
_extensions_.Clear();
uninterpreted_option_.Clear();
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
- ::memset(&ctype_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&jstype_) -
- reinterpret_cast<char*>(&ctype_)) + sizeof(jstype_));
- }
- _has_bits_.Clear();
+ ::memset(&ctype_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&jstype_) -
+ reinterpret_cast<char*>(&ctype_)) + sizeof(jstype_));
+ }
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -7509,49 +7509,49 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->_internal_ctype(), target);
}
// optional bool packed = 2;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_packed(), target);
}
// optional bool deprecated = 3 [default = false];
- if (cached_has_bits & 0x00000008u) {
+ if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_deprecated(), target);
}
// optional bool lazy = 5 [default = false];
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_lazy(), target);
}
// optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
- if (cached_has_bits & 0x00000020u) {
+ if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
6, this->_internal_jstype(), target);
}
// optional bool weak = 10 [default = false];
- if (cached_has_bits & 0x00000010u) {
+ if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_weak(), target);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_uninterpreted_option_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -7570,12 +7570,12 @@ failure:
return target;
}
-size_t FieldOptions::ByteSizeLong() const {
+size_t FieldOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldOptions)
- size_t total_size = 0;
+ size_t total_size = 0;
+
+ total_size += _extensions_.ByteSize();
- total_size += _extensions_.ByteSize();
-
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -7583,10 +7583,10 @@ size_t FieldOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
for (const auto& msg : this->uninterpreted_option_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
-
+ }
+
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
// optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
@@ -7595,11 +7595,11 @@ size_t FieldOptions::ByteSizeLong() const {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_ctype());
}
- // optional bool packed = 2;
+ // optional bool packed = 2;
if (cached_has_bits & 0x00000002u) {
- total_size += 1 + 1;
- }
-
+ total_size += 1 + 1;
+ }
+
// optional bool lazy = 5 [default = false];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 1;
@@ -7615,12 +7615,12 @@ size_t FieldOptions::ByteSizeLong() const {
total_size += 1 + 1;
}
- // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
+ // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
if (cached_has_bits & 0x00000020u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_jstype());
- }
-
+ }
+
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
@@ -7646,32 +7646,32 @@ void FieldOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void FieldOptions::MergeFrom(const FieldOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldOptions)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
- if (cached_has_bits & 0x00000001u) {
- ctype_ = from.ctype_;
+ if (cached_has_bits & 0x00000001u) {
+ ctype_ = from.ctype_;
}
- if (cached_has_bits & 0x00000002u) {
- packed_ = from.packed_;
- }
- if (cached_has_bits & 0x00000004u) {
- lazy_ = from.lazy_;
+ if (cached_has_bits & 0x00000002u) {
+ packed_ = from.packed_;
}
- if (cached_has_bits & 0x00000008u) {
- deprecated_ = from.deprecated_;
+ if (cached_has_bits & 0x00000004u) {
+ lazy_ = from.lazy_;
}
- if (cached_has_bits & 0x00000010u) {
- weak_ = from.weak_;
+ if (cached_has_bits & 0x00000008u) {
+ deprecated_ = from.deprecated_;
}
- if (cached_has_bits & 0x00000020u) {
- jstype_ = from.jstype_;
+ if (cached_has_bits & 0x00000010u) {
+ weak_ = from.weak_;
+ }
+ if (cached_has_bits & 0x00000020u) {
+ jstype_ = from.jstype_;
}
- _has_bits_[0] |= cached_has_bits;
+ _has_bits_[0] |= cached_has_bits;
}
_extensions_.MergeFrom(from._extensions_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
@@ -7681,24 +7681,24 @@ void FieldOptions::CopyFrom(const FieldOptions& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FieldOptions)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool FieldOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
- return false;
- }
-
+ if (!_extensions_.IsInitialized()) {
+ return false;
+ }
+
if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false;
- return true;
+ return true;
}
void FieldOptions::InternalSwap(FieldOptions* other) {
- using std::swap;
+ using std::swap;
_extensions_.InternalSwap(&other->_extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(FieldOptions, jstype_)
+ sizeof(FieldOptions::jstype_)
@@ -7732,9 +7732,9 @@ OneofOptions::OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
OneofOptions::OneofOptions(const OneofOptions& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- uninterpreted_option_(from.uninterpreted_option_) {
+ uninterpreted_option_(from.uninterpreted_option_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(from._extensions_);
+ _extensions_.MergeFrom(from._extensions_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.OneofOptions)
}
@@ -7765,9 +7765,9 @@ void OneofOptions::SetCachedSize(int size) const {
void OneofOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.OneofOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
_extensions_.Clear();
uninterpreted_option_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
@@ -7824,10 +7824,10 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_uninterpreted_option_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -7846,12 +7846,12 @@ failure:
return target;
}
-size_t OneofOptions::ByteSizeLong() const {
+size_t OneofOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.OneofOptions)
- size_t total_size = 0;
+ size_t total_size = 0;
+
+ total_size += _extensions_.ByteSize();
- total_size += _extensions_.ByteSize();
-
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -7859,9 +7859,9 @@ size_t OneofOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
for (const auto& msg : this->uninterpreted_option_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
+ }
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
@@ -7887,10 +7887,10 @@ void OneofOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void OneofOptions::MergeFrom(const OneofOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofOptions)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
_extensions_.MergeFrom(from._extensions_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
@@ -7900,23 +7900,23 @@ void OneofOptions::CopyFrom(const OneofOptions& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.OneofOptions)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool OneofOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
- return false;
- }
-
+ if (!_extensions_.IsInitialized()) {
+ return false;
+ }
+
if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false;
- return true;
+ return true;
}
void OneofOptions::InternalSwap(OneofOptions* other) {
- using std::swap;
+ using std::swap;
_extensions_.InternalSwap(&other->_extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
}
::PROTOBUF_NAMESPACE_ID::Metadata OneofOptions::GetMetadata() const {
@@ -7951,13 +7951,13 @@ EnumOptions::EnumOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
EnumOptions::EnumOptions(const EnumOptions& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- uninterpreted_option_(from.uninterpreted_option_) {
+ _has_bits_(from._has_bits_),
+ uninterpreted_option_(from.uninterpreted_option_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(from._extensions_);
- ::memcpy(&allow_alias_, &from.allow_alias_,
- static_cast<size_t>(reinterpret_cast<char*>(&deprecated_) -
- reinterpret_cast<char*>(&allow_alias_)) + sizeof(deprecated_));
+ _extensions_.MergeFrom(from._extensions_);
+ ::memcpy(&allow_alias_, &from.allow_alias_,
+ static_cast<size_t>(reinterpret_cast<char*>(&deprecated_) -
+ reinterpret_cast<char*>(&allow_alias_)) + sizeof(deprecated_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumOptions)
}
@@ -7992,15 +7992,15 @@ void EnumOptions::SetCachedSize(int size) const {
void EnumOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
_extensions_.Clear();
uninterpreted_option_.Clear();
::memset(&allow_alias_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&deprecated_) -
reinterpret_cast<char*>(&allow_alias_)) + sizeof(deprecated_));
- _has_bits_.Clear();
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -8073,23 +8073,23 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional bool allow_alias = 2;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_allow_alias(), target);
}
// optional bool deprecated = 3 [default = false];
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_deprecated(), target);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_uninterpreted_option_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -8108,11 +8108,11 @@ failure:
return target;
}
-size_t EnumOptions::ByteSizeLong() const {
+size_t EnumOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumOptions)
- size_t total_size = 0;
+ size_t total_size = 0;
- total_size += _extensions_.ByteSize();
+ total_size += _extensions_.ByteSize();
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -8121,22 +8121,22 @@ size_t EnumOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
for (const auto& msg : this->uninterpreted_option_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- // optional bool allow_alias = 2;
+ // optional bool allow_alias = 2;
if (cached_has_bits & 0x00000001u) {
- total_size += 1 + 1;
- }
+ total_size += 1 + 1;
+ }
- // optional bool deprecated = 3 [default = false];
+ // optional bool deprecated = 3 [default = false];
if (cached_has_bits & 0x00000002u) {
- total_size += 1 + 1;
- }
-
+ total_size += 1 + 1;
+ }
+
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
@@ -8162,20 +8162,20 @@ void EnumOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void EnumOptions::MergeFrom(const EnumOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumOptions)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
- allow_alias_ = from.allow_alias_;
+ if (cached_has_bits & 0x00000001u) {
+ allow_alias_ = from.allow_alias_;
}
- if (cached_has_bits & 0x00000002u) {
- deprecated_ = from.deprecated_;
+ if (cached_has_bits & 0x00000002u) {
+ deprecated_ = from.deprecated_;
}
- _has_bits_[0] |= cached_has_bits;
+ _has_bits_[0] |= cached_has_bits;
}
_extensions_.MergeFrom(from._extensions_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
@@ -8185,24 +8185,24 @@ void EnumOptions::CopyFrom(const EnumOptions& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.EnumOptions)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool EnumOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
- return false;
- }
-
+ if (!_extensions_.IsInitialized()) {
+ return false;
+ }
+
if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false;
- return true;
+ return true;
}
void EnumOptions::InternalSwap(EnumOptions* other) {
- using std::swap;
+ using std::swap;
_extensions_.InternalSwap(&other->_extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(EnumOptions, deprecated_)
+ sizeof(EnumOptions::deprecated_)
@@ -8240,11 +8240,11 @@ EnumValueOptions::EnumValueOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
EnumValueOptions::EnumValueOptions(const EnumValueOptions& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- uninterpreted_option_(from.uninterpreted_option_) {
+ _has_bits_(from._has_bits_),
+ uninterpreted_option_(from.uninterpreted_option_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(from._extensions_);
- deprecated_ = from.deprecated_;
+ _extensions_.MergeFrom(from._extensions_);
+ deprecated_ = from.deprecated_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueOptions)
}
@@ -8276,13 +8276,13 @@ void EnumValueOptions::SetCachedSize(int size) const {
void EnumValueOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValueOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
_extensions_.Clear();
- uninterpreted_option_.Clear();
+ uninterpreted_option_.Clear();
deprecated_ = false;
- _has_bits_.Clear();
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -8347,17 +8347,17 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional bool deprecated = 1 [default = false];
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_deprecated(), target);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_uninterpreted_option_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -8376,12 +8376,12 @@ failure:
return target;
}
-size_t EnumValueOptions::ByteSizeLong() const {
+size_t EnumValueOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValueOptions)
- size_t total_size = 0;
+ size_t total_size = 0;
+
+ total_size += _extensions_.ByteSize();
- total_size += _extensions_.ByteSize();
-
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -8389,15 +8389,15 @@ size_t EnumValueOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
for (const auto& msg : this->uninterpreted_option_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- // optional bool deprecated = 1 [default = false];
+ // optional bool deprecated = 1 [default = false];
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
- total_size += 1 + 1;
- }
+ total_size += 1 + 1;
+ }
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
@@ -8423,10 +8423,10 @@ void EnumValueOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void EnumValueOptions::MergeFrom(const EnumValueOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueOptions)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
if (from._internal_has_deprecated()) {
_internal_set_deprecated(from._internal_deprecated());
@@ -8439,25 +8439,25 @@ void EnumValueOptions::CopyFrom(const EnumValueOptions& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.EnumValueOptions)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool EnumValueOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
- return false;
- }
-
+ if (!_extensions_.IsInitialized()) {
+ return false;
+ }
+
if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false;
- return true;
+ return true;
}
void EnumValueOptions::InternalSwap(EnumValueOptions* other) {
- using std::swap;
+ using std::swap;
_extensions_.InternalSwap(&other->_extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
- swap(deprecated_, other->deprecated_);
+ uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ swap(deprecated_, other->deprecated_);
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumValueOptions::GetMetadata() const {
@@ -8489,11 +8489,11 @@ ServiceOptions::ServiceOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
ServiceOptions::ServiceOptions(const ServiceOptions& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- uninterpreted_option_(from.uninterpreted_option_) {
+ _has_bits_(from._has_bits_),
+ uninterpreted_option_(from.uninterpreted_option_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(from._extensions_);
- deprecated_ = from.deprecated_;
+ _extensions_.MergeFrom(from._extensions_);
+ deprecated_ = from.deprecated_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceOptions)
}
@@ -8525,13 +8525,13 @@ void ServiceOptions::SetCachedSize(int size) const {
void ServiceOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ServiceOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
_extensions_.Clear();
- uninterpreted_option_.Clear();
+ uninterpreted_option_.Clear();
deprecated_ = false;
- _has_bits_.Clear();
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -8596,17 +8596,17 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional bool deprecated = 33 [default = false];
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(33, this->_internal_deprecated(), target);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_uninterpreted_option_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -8625,12 +8625,12 @@ failure:
return target;
}
-size_t ServiceOptions::ByteSizeLong() const {
+size_t ServiceOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.ServiceOptions)
- size_t total_size = 0;
+ size_t total_size = 0;
+
+ total_size += _extensions_.ByteSize();
- total_size += _extensions_.ByteSize();
-
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -8638,15 +8638,15 @@ size_t ServiceOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
for (const auto& msg : this->uninterpreted_option_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- // optional bool deprecated = 33 [default = false];
+ // optional bool deprecated = 33 [default = false];
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
- total_size += 2 + 1;
- }
+ total_size += 2 + 1;
+ }
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
@@ -8672,10 +8672,10 @@ void ServiceOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void ServiceOptions::MergeFrom(const ServiceOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceOptions)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
if (from._internal_has_deprecated()) {
_internal_set_deprecated(from._internal_deprecated());
@@ -8688,25 +8688,25 @@ void ServiceOptions::CopyFrom(const ServiceOptions& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.ServiceOptions)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool ServiceOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
- return false;
- }
-
+ if (!_extensions_.IsInitialized()) {
+ return false;
+ }
+
if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false;
- return true;
+ return true;
}
void ServiceOptions::InternalSwap(ServiceOptions* other) {
- using std::swap;
+ using std::swap;
_extensions_.InternalSwap(&other->_extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
- swap(deprecated_, other->deprecated_);
+ uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ swap(deprecated_, other->deprecated_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ServiceOptions::GetMetadata() const {
@@ -8741,13 +8741,13 @@ MethodOptions::MethodOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
MethodOptions::MethodOptions(const MethodOptions& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- uninterpreted_option_(from.uninterpreted_option_) {
+ _has_bits_(from._has_bits_),
+ uninterpreted_option_(from.uninterpreted_option_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(from._extensions_);
- ::memcpy(&deprecated_, &from.deprecated_,
- static_cast<size_t>(reinterpret_cast<char*>(&idempotency_level_) -
- reinterpret_cast<char*>(&deprecated_)) + sizeof(idempotency_level_));
+ _extensions_.MergeFrom(from._extensions_);
+ ::memcpy(&deprecated_, &from.deprecated_,
+ static_cast<size_t>(reinterpret_cast<char*>(&idempotency_level_) -
+ reinterpret_cast<char*>(&deprecated_)) + sizeof(idempotency_level_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.MethodOptions)
}
@@ -8782,18 +8782,18 @@ void MethodOptions::SetCachedSize(int size) const {
void MethodOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.MethodOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
_extensions_.Clear();
uninterpreted_option_.Clear();
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- ::memset(&deprecated_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&idempotency_level_) -
- reinterpret_cast<char*>(&deprecated_)) + sizeof(idempotency_level_));
- }
- _has_bits_.Clear();
+ ::memset(&deprecated_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&idempotency_level_) -
+ reinterpret_cast<char*>(&deprecated_)) + sizeof(idempotency_level_));
+ }
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -8812,16 +8812,16 @@ const char* MethodOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_
CHK_(ptr);
} else goto handle_unusual;
continue;
- // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
+ // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
case 34:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel_IsValid(val))) {
_internal_set_idempotency_level(static_cast<PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel>(val));
- } else {
+ } else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(34, val, mutable_unknown_fields());
- }
+ }
} else goto handle_unusual;
continue;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
@@ -8870,24 +8870,24 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodOptions)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// optional bool deprecated = 33 [default = false];
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(33, this->_internal_deprecated(), target);
}
- // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
- if (cached_has_bits & 0x00000002u) {
+ // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
+ if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
34, this->_internal_idempotency_level(), target);
- }
-
+ }
+
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_uninterpreted_option_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -8906,12 +8906,12 @@ failure:
return target;
}
-size_t MethodOptions::ByteSizeLong() const {
+size_t MethodOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.MethodOptions)
- size_t total_size = 0;
+ size_t total_size = 0;
+
+ total_size += _extensions_.ByteSize();
- total_size += _extensions_.ByteSize();
-
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -8919,23 +8919,23 @@ size_t MethodOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
for (const auto& msg : this->uninterpreted_option_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- // optional bool deprecated = 33 [default = false];
+ // optional bool deprecated = 33 [default = false];
if (cached_has_bits & 0x00000001u) {
- total_size += 2 + 1;
- }
+ total_size += 2 + 1;
+ }
- // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
+ // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
if (cached_has_bits & 0x00000002u) {
- total_size += 2 +
+ total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_idempotency_level());
- }
-
+ }
+
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
@@ -8961,20 +8961,20 @@ void MethodOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void MethodOptions::MergeFrom(const MethodOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodOptions)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
- deprecated_ = from.deprecated_;
+ if (cached_has_bits & 0x00000001u) {
+ deprecated_ = from.deprecated_;
}
- if (cached_has_bits & 0x00000002u) {
- idempotency_level_ = from.idempotency_level_;
- }
- _has_bits_[0] |= cached_has_bits;
+ if (cached_has_bits & 0x00000002u) {
+ idempotency_level_ = from.idempotency_level_;
+ }
+ _has_bits_[0] |= cached_has_bits;
}
_extensions_.MergeFrom(from._extensions_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
@@ -8984,24 +8984,24 @@ void MethodOptions::CopyFrom(const MethodOptions& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.MethodOptions)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool MethodOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
- return false;
- }
-
+ if (!_extensions_.IsInitialized()) {
+ return false;
+ }
+
if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false;
- return true;
+ return true;
}
void MethodOptions::InternalSwap(MethodOptions* other) {
- using std::swap;
+ using std::swap;
_extensions_.InternalSwap(&other->_extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(MethodOptions, idempotency_level_)
+ sizeof(MethodOptions::idempotency_level_)
@@ -9049,8 +9049,8 @@ UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOp
if (from._internal_has_name_part()) {
name_part_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name_part(),
GetArenaForAllocation());
- }
- is_extension_ = from.is_extension_;
+ }
+ is_extension_ = from.is_extension_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption.NamePart)
}
@@ -9084,15 +9084,15 @@ void UninterpretedOption_NamePart::SetCachedSize(int size) const {
void UninterpretedOption_NamePart::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.UninterpretedOption.NamePart)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
name_part_.ClearNonDefaultToEmpty();
}
- is_extension_ = false;
- _has_bits_.Clear();
+ is_extension_ = false;
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -9150,11 +9150,11 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption.NamePart)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = _has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = _has_bits_[0];
// required string name_part = 1;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name_part().data(), static_cast<int>(this->_internal_name_part().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -9164,7 +9164,7 @@ failure:
}
// required bool is_extension = 2;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_is_extension(), target);
}
@@ -9177,9 +9177,9 @@ failure:
return target;
}
-size_t UninterpretedOption_NamePart::RequiredFieldsByteSizeFallback() const {
+size_t UninterpretedOption_NamePart::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:google.protobuf.UninterpretedOption.NamePart)
- size_t total_size = 0;
+ size_t total_size = 0;
if (_internal_has_name_part()) {
// required string name_part = 1;
@@ -9195,9 +9195,9 @@ size_t UninterpretedOption_NamePart::RequiredFieldsByteSizeFallback() const {
return total_size;
}
-size_t UninterpretedOption_NamePart::ByteSizeLong() const {
+size_t UninterpretedOption_NamePart::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.UninterpretedOption.NamePart)
- size_t total_size = 0;
+ size_t total_size = 0;
if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present.
// required string name_part = 1;
@@ -9239,19 +9239,19 @@ void UninterpretedOption_NamePart::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to
void UninterpretedOption_NamePart::MergeFrom(const UninterpretedOption_NamePart& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption.NamePart)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- cached_has_bits = from._has_bits_[0];
+ (void) cached_has_bits;
+
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
_internal_set_name_part(from._internal_name_part());
}
- if (cached_has_bits & 0x00000002u) {
- is_extension_ = from.is_extension_;
+ if (cached_has_bits & 0x00000002u) {
+ is_extension_ = from.is_extension_;
}
- _has_bits_[0] |= cached_has_bits;
+ _has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -9260,7 +9260,7 @@ void UninterpretedOption_NamePart::CopyFrom(const UninterpretedOption_NamePart&
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.UninterpretedOption.NamePart)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool UninterpretedOption_NamePart::IsInitialized() const {
@@ -9269,7 +9269,7 @@ bool UninterpretedOption_NamePart::IsInitialized() const {
}
void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
@@ -9277,7 +9277,7 @@ void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* ot
&name_part_, GetArenaForAllocation(),
&other->name_part_, other->GetArenaForAllocation()
);
- swap(is_extension_, other->is_extension_);
+ swap(is_extension_, other->is_extension_);
}
::PROTOBUF_NAMESPACE_ID::Metadata UninterpretedOption_NamePart::GetMetadata() const {
@@ -9286,8 +9286,8 @@ void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* ot
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[21]);
}
-// ===================================================================
-
+// ===================================================================
+
class UninterpretedOption::_Internal {
public:
using HasBits = decltype(std::declval<UninterpretedOption>()._has_bits_);
@@ -9323,27 +9323,27 @@ UninterpretedOption::UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
UninterpretedOption::UninterpretedOption(const UninterpretedOption& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- name_(from.name_) {
+ _has_bits_(from._has_bits_),
+ name_(from.name_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
identifier_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_identifier_value()) {
identifier_value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_identifier_value(),
GetArenaForAllocation());
- }
+ }
string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_string_value()) {
string_value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_string_value(),
GetArenaForAllocation());
- }
+ }
aggregate_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_aggregate_value()) {
aggregate_value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_aggregate_value(),
GetArenaForAllocation());
- }
- ::memcpy(&positive_int_value_, &from.positive_int_value_,
- static_cast<size_t>(reinterpret_cast<char*>(&double_value_) -
- reinterpret_cast<char*>(&positive_int_value_)) + sizeof(double_value_));
+ }
+ ::memcpy(&positive_int_value_, &from.positive_int_value_,
+ static_cast<size_t>(reinterpret_cast<char*>(&double_value_) -
+ reinterpret_cast<char*>(&positive_int_value_)) + sizeof(double_value_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption)
}
@@ -9384,28 +9384,28 @@ void UninterpretedOption::SetCachedSize(int size) const {
void UninterpretedOption::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.UninterpretedOption)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- name_.Clear();
- cached_has_bits = _has_bits_[0];
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ name_.Clear();
+ cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
identifier_value_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
string_value_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
aggregate_value_.ClearNonDefaultToEmpty();
}
}
if (cached_has_bits & 0x00000038u) {
- ::memset(&positive_int_value_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&double_value_) -
- reinterpret_cast<char*>(&positive_int_value_)) + sizeof(double_value_));
- }
- _has_bits_.Clear();
+ ::memset(&positive_int_value_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&double_value_) -
+ reinterpret_cast<char*>(&positive_int_value_)) + sizeof(double_value_));
+ }
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -9510,19 +9510,19 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
// repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_name_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(2, this->_internal_name(i), target, stream);
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _has_bits_[0];
// optional string identifier_value = 3;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_identifier_value().data(), static_cast<int>(this->_internal_identifier_value().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -9532,31 +9532,31 @@ failure:
}
// optional uint64 positive_int_value = 4;
- if (cached_has_bits & 0x00000008u) {
+ if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(4, this->_internal_positive_int_value(), target);
}
// optional int64 negative_int_value = 5;
- if (cached_has_bits & 0x00000010u) {
+ if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->_internal_negative_int_value(), target);
}
// optional double double_value = 6;
- if (cached_has_bits & 0x00000020u) {
+ if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(6, this->_internal_double_value(), target);
}
// optional bytes string_value = 7;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
target = stream->WriteBytesMaybeAliased(
7, this->_internal_string_value(), target);
}
// optional string aggregate_value = 8;
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_aggregate_value().data(), static_cast<int>(this->_internal_aggregate_value().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -9573,9 +9573,9 @@ failure:
return target;
}
-size_t UninterpretedOption::ByteSizeLong() const {
+size_t UninterpretedOption::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.UninterpretedOption)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -9584,10 +9584,10 @@ size_t UninterpretedOption::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
total_size += 1UL * this->_internal_name_size();
for (const auto& msg : this->name_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
-
+ }
+
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
// optional string identifier_value = 3;
@@ -9597,20 +9597,20 @@ size_t UninterpretedOption::ByteSizeLong() const {
this->_internal_identifier_value());
}
- // optional bytes string_value = 7;
+ // optional bytes string_value = 7;
if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
this->_internal_string_value());
- }
-
- // optional string aggregate_value = 8;
+ }
+
+ // optional string aggregate_value = 8;
if (cached_has_bits & 0x00000004u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_aggregate_value());
- }
-
+ }
+
// optional uint64 positive_int_value = 4;
if (cached_has_bits & 0x00000008u) {
total_size += 1 +
@@ -9655,32 +9655,32 @@ void UninterpretedOption::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void UninterpretedOption::MergeFrom(const UninterpretedOption& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
name_.MergeFrom(from.name_);
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
_internal_set_identifier_value(from._internal_identifier_value());
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
_internal_set_string_value(from._internal_string_value());
- }
- if (cached_has_bits & 0x00000004u) {
+ }
+ if (cached_has_bits & 0x00000004u) {
_internal_set_aggregate_value(from._internal_aggregate_value());
- }
- if (cached_has_bits & 0x00000008u) {
- positive_int_value_ = from.positive_int_value_;
}
- if (cached_has_bits & 0x00000010u) {
- negative_int_value_ = from.negative_int_value_;
+ if (cached_has_bits & 0x00000008u) {
+ positive_int_value_ = from.positive_int_value_;
}
- if (cached_has_bits & 0x00000020u) {
- double_value_ = from.double_value_;
+ if (cached_has_bits & 0x00000010u) {
+ negative_int_value_ = from.negative_int_value_;
}
- _has_bits_[0] |= cached_has_bits;
+ if (cached_has_bits & 0x00000020u) {
+ double_value_ = from.double_value_;
+ }
+ _has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -9689,7 +9689,7 @@ void UninterpretedOption::CopyFrom(const UninterpretedOption& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.UninterpretedOption)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool UninterpretedOption::IsInitialized() const {
@@ -9698,10 +9698,10 @@ bool UninterpretedOption::IsInitialized() const {
}
void UninterpretedOption::InternalSwap(UninterpretedOption* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
- name_.InternalSwap(&other->name_);
+ name_.InternalSwap(&other->name_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&identifier_value_, GetArenaForAllocation(),
@@ -9758,21 +9758,21 @@ SourceCodeInfo_Location::SourceCodeInfo_Location(::PROTOBUF_NAMESPACE_ID::Arena*
}
SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- path_(from.path_),
- span_(from.span_),
- leading_detached_comments_(from.leading_detached_comments_) {
+ _has_bits_(from._has_bits_),
+ path_(from.path_),
+ span_(from.span_),
+ leading_detached_comments_(from.leading_detached_comments_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
leading_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_leading_comments()) {
leading_comments_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_leading_comments(),
GetArenaForAllocation());
- }
+ }
trailing_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_trailing_comments()) {
trailing_comments_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_trailing_comments(),
GetArenaForAllocation());
- }
+ }
// @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo.Location)
}
@@ -9807,22 +9807,22 @@ void SourceCodeInfo_Location::SetCachedSize(int size) const {
void SourceCodeInfo_Location::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.SourceCodeInfo.Location)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- path_.Clear();
- span_.Clear();
- leading_detached_comments_.Clear();
- cached_has_bits = _has_bits_[0];
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ path_.Clear();
+ span_.Clear();
+ leading_detached_comments_.Clear();
+ cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
leading_comments_.ClearNonDefaultToEmpty();
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
trailing_comments_.ClearNonDefaultToEmpty();
}
}
- _has_bits_.Clear();
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -9919,8 +9919,8 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo.Location)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
// repeated int32 path = 1 [packed = true];
{
int byte_size = _path_cached_byte_size_.load(std::memory_order_relaxed);
@@ -9939,9 +9939,9 @@ failure:
}
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _has_bits_[0];
// optional string leading_comments = 3;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_leading_comments().data(), static_cast<int>(this->_internal_leading_comments().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -9951,7 +9951,7 @@ failure:
}
// optional string trailing_comments = 4;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_trailing_comments().data(), static_cast<int>(this->_internal_trailing_comments().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -9978,9 +9978,9 @@ failure:
return target;
}
-size_t SourceCodeInfo_Location::ByteSizeLong() const {
+size_t SourceCodeInfo_Location::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceCodeInfo.Location)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -9989,7 +9989,7 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const {
// repeated int32 path = 1 [packed = true];
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- Int32Size(this->path_);
+ Int32Size(this->path_);
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
@@ -10004,7 +10004,7 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const {
// repeated int32 span = 2 [packed = true];
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- Int32Size(this->span_);
+ Int32Size(this->span_);
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
@@ -10017,7 +10017,7 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const {
}
// repeated string leading_detached_comments = 6;
- total_size += 1 *
+ total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(leading_detached_comments_.size());
for (int i = 0, n = leading_detached_comments_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
@@ -10026,20 +10026,20 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const {
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- // optional string leading_comments = 3;
+ // optional string leading_comments = 3;
if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_leading_comments());
- }
-
- // optional string trailing_comments = 4;
+ }
+
+ // optional string trailing_comments = 4;
if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_trailing_comments());
- }
-
+ }
+
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
@@ -10065,19 +10065,19 @@ void SourceCodeInfo_Location::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void SourceCodeInfo_Location::MergeFrom(const SourceCodeInfo_Location& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo.Location)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- path_.MergeFrom(from.path_);
- span_.MergeFrom(from.span_);
- leading_detached_comments_.MergeFrom(from.leading_detached_comments_);
- cached_has_bits = from._has_bits_[0];
+ (void) cached_has_bits;
+
+ path_.MergeFrom(from.path_);
+ span_.MergeFrom(from.span_);
+ leading_detached_comments_.MergeFrom(from.leading_detached_comments_);
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
_internal_set_leading_comments(from._internal_leading_comments());
}
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
_internal_set_trailing_comments(from._internal_trailing_comments());
}
}
@@ -10088,7 +10088,7 @@ void SourceCodeInfo_Location::CopyFrom(const SourceCodeInfo_Location& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.SourceCodeInfo.Location)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool SourceCodeInfo_Location::IsInitialized() const {
@@ -10096,12 +10096,12 @@ bool SourceCodeInfo_Location::IsInitialized() const {
}
void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
- path_.InternalSwap(&other->path_);
- span_.InternalSwap(&other->span_);
- leading_detached_comments_.InternalSwap(&other->leading_detached_comments_);
+ path_.InternalSwap(&other->path_);
+ span_.InternalSwap(&other->span_);
+ leading_detached_comments_.InternalSwap(&other->leading_detached_comments_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&leading_comments_, GetArenaForAllocation(),
@@ -10120,70 +10120,70 @@ void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* other) {
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[23]);
}
-// ===================================================================
-
+// ===================================================================
+
class SourceCodeInfo::_Internal {
public:
};
-
+
SourceCodeInfo::SourceCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
location_(arena) {
- SharedCtor();
+ SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:google.protobuf.SourceCodeInfo)
-}
-SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from)
+}
+SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- location_(from.location_) {
+ location_(from.location_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo)
-}
-
-void SourceCodeInfo::SharedCtor() {
-}
-
-SourceCodeInfo::~SourceCodeInfo() {
- // @@protoc_insertion_point(destructor:google.protobuf.SourceCodeInfo)
+ // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo)
+}
+
+void SourceCodeInfo::SharedCtor() {
+}
+
+SourceCodeInfo::~SourceCodeInfo() {
+ // @@protoc_insertion_point(destructor:google.protobuf.SourceCodeInfo)
if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
+ SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
-}
-
+}
+
inline void SourceCodeInfo::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
-}
-
+}
+
void SourceCodeInfo::ArenaDtor(void* object) {
SourceCodeInfo* _this = reinterpret_cast< SourceCodeInfo* >(object);
(void)_this;
-}
+}
void SourceCodeInfo::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
-}
+}
void SourceCodeInfo::SetCachedSize(int size) const {
_cached_size_.Set(size);
-}
-
-void SourceCodeInfo::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.SourceCodeInfo)
+}
+
+void SourceCodeInfo::Clear() {
+// @@protoc_insertion_point(message_clear_start:google.protobuf.SourceCodeInfo)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- location_.Clear();
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ location_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
-}
-
+}
+
const char* SourceCodeInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
+ // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr -= 1;
@@ -10195,55 +10195,55 @@ const char* SourceCodeInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
} else goto handle_unusual;
continue;
- default: {
- handle_unusual:
+ default: {
+ handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
- goto success;
- }
+ goto success;
+ }
ptr = UnknownFieldParse(tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
continue;
- }
+ }
} // switch
} // while
-success:
+success:
return ptr;
-failure:
+failure:
ptr = nullptr;
goto success;
#undef CHK_
-}
-
+}
+
::PROTOBUF_NAMESPACE_ID::uint8* SourceCodeInfo::_InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo)
+ // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
- for (unsigned int i = 0,
+ (void) cached_has_bits;
+
+ // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_location_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(1, this->_internal_location(i), target, stream);
- }
-
+ }
+
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo)
- return target;
-}
-
-size_t SourceCodeInfo::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceCodeInfo)
- size_t total_size = 0;
-
+ }
+ // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo)
+ return target;
+}
+
+size_t SourceCodeInfo::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceCodeInfo)
+ size_t total_size = 0;
+
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -10251,19 +10251,19 @@ size_t SourceCodeInfo::ByteSizeLong() const {
// repeated .google.protobuf.SourceCodeInfo.Location location = 1;
total_size += 1UL * this->_internal_location_size();
for (const auto& msg : this->location_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
+ }
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
_internal_metadata_, total_size, &_cached_size_);
- }
+ }
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
- return total_size;
-}
-
+ return total_size;
+}
+
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SourceCodeInfo::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
SourceCodeInfo::MergeImpl
@@ -10274,42 +10274,42 @@ void SourceCodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
const ::PROTOBUF_NAMESPACE_ID::Message&from) {
static_cast<SourceCodeInfo *>(to)->MergeFrom(
static_cast<const SourceCodeInfo &>(from));
-}
-
+}
+
-void SourceCodeInfo::MergeFrom(const SourceCodeInfo& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo)
- GOOGLE_DCHECK_NE(&from, this);
+void SourceCodeInfo::MergeFrom(const SourceCodeInfo& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo)
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- location_.MergeFrom(from.location_);
+ (void) cached_has_bits;
+
+ location_.MergeFrom(from.location_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
-}
-
-void SourceCodeInfo::CopyFrom(const SourceCodeInfo& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.SourceCodeInfo)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool SourceCodeInfo::IsInitialized() const {
- return true;
-}
-
-void SourceCodeInfo::InternalSwap(SourceCodeInfo* other) {
- using std::swap;
+}
+
+void SourceCodeInfo::CopyFrom(const SourceCodeInfo& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.SourceCodeInfo)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool SourceCodeInfo::IsInitialized() const {
+ return true;
+}
+
+void SourceCodeInfo::InternalSwap(SourceCodeInfo* other) {
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- location_.InternalSwap(&other->location_);
-}
-
+ location_.InternalSwap(&other->location_);
+}
+
::PROTOBUF_NAMESPACE_ID::Metadata SourceCodeInfo::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[24]);
-}
-
+}
+
// ===================================================================
class GeneratedCodeInfo_Annotation::_Internal {
@@ -10338,17 +10338,17 @@ GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(::PROTOBUF_NAMESPACE_
}
GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeInfo_Annotation& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- path_(from.path_) {
+ _has_bits_(from._has_bits_),
+ path_(from.path_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
source_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from._internal_has_source_file()) {
source_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source_file(),
GetArenaForAllocation());
- }
- ::memcpy(&begin_, &from.begin_,
- static_cast<size_t>(reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&begin_)) + sizeof(end_));
+ }
+ ::memcpy(&begin_, &from.begin_,
+ static_cast<size_t>(reinterpret_cast<char*>(&end_) -
+ reinterpret_cast<char*>(&begin_)) + sizeof(end_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo.Annotation)
}
@@ -10385,20 +10385,20 @@ void GeneratedCodeInfo_Annotation::SetCachedSize(int size) const {
void GeneratedCodeInfo_Annotation::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.GeneratedCodeInfo.Annotation)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- path_.Clear();
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ path_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
source_file_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000006u) {
- ::memset(&begin_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&begin_)) + sizeof(end_));
- }
- _has_bits_.Clear();
+ ::memset(&begin_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&end_) -
+ reinterpret_cast<char*>(&begin_)) + sizeof(end_));
+ }
+ _has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -10474,8 +10474,8 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo.Annotation)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
// repeated int32 path = 1 [packed = true];
{
int byte_size = _path_cached_byte_size_.load(std::memory_order_relaxed);
@@ -10485,9 +10485,9 @@ failure:
}
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _has_bits_[0];
// optional string source_file = 2;
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_source_file().data(), static_cast<int>(this->_internal_source_file().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
@@ -10497,13 +10497,13 @@ failure:
}
// optional int32 begin = 3;
- if (cached_has_bits & 0x00000002u) {
+ if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_begin(), target);
}
// optional int32 end = 4;
- if (cached_has_bits & 0x00000004u) {
+ if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_end(), target);
}
@@ -10516,29 +10516,29 @@ failure:
return target;
}
-size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const {
+size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.GeneratedCodeInfo.Annotation)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // repeated int32 path = 1 [packed = true];
- {
+ // repeated int32 path = 1 [packed = true];
+ {
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- Int32Size(this->path_);
- if (data_size > 0) {
- total_size += 1 +
+ Int32Size(this->path_);
+ if (data_size > 0) {
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
- }
+ }
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
_path_cached_byte_size_.store(cached_size,
std::memory_order_relaxed);
- total_size += data_size;
- }
-
+ total_size += data_size;
+ }
+
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional string source_file = 2;
@@ -10587,23 +10587,23 @@ void GeneratedCodeInfo_Annotation::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to
void GeneratedCodeInfo_Annotation::MergeFrom(const GeneratedCodeInfo_Annotation& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo.Annotation)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- path_.MergeFrom(from.path_);
- cached_has_bits = from._has_bits_[0];
+ (void) cached_has_bits;
+
+ path_.MergeFrom(from.path_);
+ cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
- if (cached_has_bits & 0x00000001u) {
+ if (cached_has_bits & 0x00000001u) {
_internal_set_source_file(from._internal_source_file());
}
- if (cached_has_bits & 0x00000002u) {
- begin_ = from.begin_;
+ if (cached_has_bits & 0x00000002u) {
+ begin_ = from.begin_;
}
- if (cached_has_bits & 0x00000004u) {
- end_ = from.end_;
+ if (cached_has_bits & 0x00000004u) {
+ end_ = from.end_;
}
- _has_bits_[0] |= cached_has_bits;
+ _has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -10612,7 +10612,7 @@ void GeneratedCodeInfo_Annotation::CopyFrom(const GeneratedCodeInfo_Annotation&
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.GeneratedCodeInfo.Annotation)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool GeneratedCodeInfo_Annotation::IsInitialized() const {
@@ -10620,10 +10620,10 @@ bool GeneratedCodeInfo_Annotation::IsInitialized() const {
}
void GeneratedCodeInfo_Annotation::InternalSwap(GeneratedCodeInfo_Annotation* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
- path_.InternalSwap(&other->path_);
+ path_.InternalSwap(&other->path_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&source_file_, GetArenaForAllocation(),
@@ -10643,8 +10643,8 @@ void GeneratedCodeInfo_Annotation::InternalSwap(GeneratedCodeInfo_Annotation* ot
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[25]);
}
-// ===================================================================
-
+// ===================================================================
+
class GeneratedCodeInfo::_Internal {
public:
};
@@ -10661,7 +10661,7 @@ GeneratedCodeInfo::GeneratedCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
GeneratedCodeInfo::GeneratedCodeInfo(const GeneratedCodeInfo& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- annotation_(from.annotation_) {
+ annotation_(from.annotation_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo)
}
@@ -10693,9 +10693,9 @@ void GeneratedCodeInfo::SetCachedSize(int size) const {
void GeneratedCodeInfo::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.GeneratedCodeInfo)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
annotation_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -10745,10 +10745,10 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
// repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_annotation_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -10763,9 +10763,9 @@ failure:
return target;
}
-size_t GeneratedCodeInfo::ByteSizeLong() const {
+size_t GeneratedCodeInfo::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.GeneratedCodeInfo)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -10774,9 +10774,9 @@ size_t GeneratedCodeInfo::ByteSizeLong() const {
// repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
total_size += 1UL * this->_internal_annotation_size();
for (const auto& msg : this->annotation_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
+ }
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
@@ -10802,10 +10802,10 @@ void GeneratedCodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void GeneratedCodeInfo::MergeFrom(const GeneratedCodeInfo& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
annotation_.MergeFrom(from.annotation_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -10814,7 +10814,7 @@ void GeneratedCodeInfo::CopyFrom(const GeneratedCodeInfo& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.GeneratedCodeInfo)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool GeneratedCodeInfo::IsInitialized() const {
@@ -10822,9 +10822,9 @@ bool GeneratedCodeInfo::IsInitialized() const {
}
void GeneratedCodeInfo::InternalSwap(GeneratedCodeInfo* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- annotation_.InternalSwap(&other->annotation_);
+ annotation_.InternalSwap(&other->annotation_);
}
::PROTOBUF_NAMESPACE_ID::Metadata GeneratedCodeInfo::GetMetadata() const {
diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.h b/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.h
index d105a3a130..0df49109cd 100644
--- a/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.h
@@ -79,7 +79,7 @@ PROTOBUF_EXPORT extern EnumValueDescriptorProtoDefaultTypeInternal _EnumValueDes
class EnumValueOptions;
struct EnumValueOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern EnumValueOptionsDefaultTypeInternal _EnumValueOptions_default_instance_;
-class ExtensionRangeOptions;
+class ExtensionRangeOptions;
struct ExtensionRangeOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern ExtensionRangeOptionsDefaultTypeInternal _ExtensionRangeOptions_default_instance_;
class FieldDescriptorProto;
@@ -304,15 +304,15 @@ inline bool FieldOptions_JSType_Parse(
FieldOptions_JSType_descriptor(), name, value);
}
enum MethodOptions_IdempotencyLevel : int {
- MethodOptions_IdempotencyLevel_IDEMPOTENCY_UNKNOWN = 0,
- MethodOptions_IdempotencyLevel_NO_SIDE_EFFECTS = 1,
- MethodOptions_IdempotencyLevel_IDEMPOTENT = 2
-};
+ MethodOptions_IdempotencyLevel_IDEMPOTENCY_UNKNOWN = 0,
+ MethodOptions_IdempotencyLevel_NO_SIDE_EFFECTS = 1,
+ MethodOptions_IdempotencyLevel_IDEMPOTENT = 2
+};
PROTOBUF_EXPORT bool MethodOptions_IdempotencyLevel_IsValid(int value);
constexpr MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel_IdempotencyLevel_MIN = MethodOptions_IdempotencyLevel_IDEMPOTENCY_UNKNOWN;
constexpr MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel_IdempotencyLevel_MAX = MethodOptions_IdempotencyLevel_IDEMPOTENT;
constexpr int MethodOptions_IdempotencyLevel_IdempotencyLevel_ARRAYSIZE = MethodOptions_IdempotencyLevel_IdempotencyLevel_MAX + 1;
-
+
PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MethodOptions_IdempotencyLevel_descriptor();
template<typename T>
inline const TProtoStringType& MethodOptions_IdempotencyLevel_Name(T enum_t_value) {
@@ -321,12 +321,12 @@ inline const TProtoStringType& MethodOptions_IdempotencyLevel_Name(T enum_t_valu
"Incorrect type passed to function MethodOptions_IdempotencyLevel_Name.");
return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
MethodOptions_IdempotencyLevel_descriptor(), enum_t_value);
-}
-inline bool MethodOptions_IdempotencyLevel_Parse(
+}
+inline bool MethodOptions_IdempotencyLevel_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, MethodOptions_IdempotencyLevel* value) {
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<MethodOptions_IdempotencyLevel>(
- MethodOptions_IdempotencyLevel_descriptor(), name, value);
-}
+ MethodOptions_IdempotencyLevel_descriptor(), name, value);
+}
// ===================================================================
class PROTOBUF_EXPORT FileDescriptorSet final :
@@ -346,15 +346,15 @@ class PROTOBUF_EXPORT FileDescriptorSet final :
CopyFrom(from);
return *this;
}
- inline FileDescriptorSet& operator=(FileDescriptorSet&& from) noexcept {
+ inline FileDescriptorSet& operator=(FileDescriptorSet&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -375,16 +375,16 @@ class PROTOBUF_EXPORT FileDescriptorSet final :
static const FileDescriptorSet& default_instance() {
return *internal_default_instance();
}
- static inline const FileDescriptorSet* internal_default_instance() {
- return reinterpret_cast<const FileDescriptorSet*>(
- &_FileDescriptorSet_default_instance_);
- }
+ static inline const FileDescriptorSet* internal_default_instance() {
+ return reinterpret_cast<const FileDescriptorSet*>(
+ &_FileDescriptorSet_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 0;
-
- friend void swap(FileDescriptorSet& a, FileDescriptorSet& b) {
- a.Swap(&b);
- }
+ 0;
+
+ friend void swap(FileDescriptorSet& a, FileDescriptorSet& b) {
+ a.Swap(&b);
+ }
inline void Swap(FileDescriptorSet* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -501,15 +501,15 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
CopyFrom(from);
return *this;
}
- inline FileDescriptorProto& operator=(FileDescriptorProto&& from) noexcept {
+ inline FileDescriptorProto& operator=(FileDescriptorProto&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -530,16 +530,16 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
static const FileDescriptorProto& default_instance() {
return *internal_default_instance();
}
- static inline const FileDescriptorProto* internal_default_instance() {
- return reinterpret_cast<const FileDescriptorProto*>(
- &_FileDescriptorProto_default_instance_);
- }
+ static inline const FileDescriptorProto* internal_default_instance() {
+ return reinterpret_cast<const FileDescriptorProto*>(
+ &_FileDescriptorProto_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 1;
-
- friend void swap(FileDescriptorProto& a, FileDescriptorProto& b) {
- a.Swap(&b);
- }
+ 1;
+
+ friend void swap(FileDescriptorProto& a, FileDescriptorProto& b) {
+ a.Swap(&b);
+ }
inline void Swap(FileDescriptorProto* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -628,12 +628,12 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
const TProtoStringType& dependency(int index) const;
TProtoStringType* mutable_dependency(int index);
void set_dependency(int index, const TProtoStringType& value);
- void set_dependency(int index, TProtoStringType&& value);
+ void set_dependency(int index, TProtoStringType&& value);
void set_dependency(int index, const char* value);
void set_dependency(int index, const char* value, size_t size);
TProtoStringType* add_dependency();
void add_dependency(const TProtoStringType& value);
- void add_dependency(TProtoStringType&& value);
+ void add_dependency(TProtoStringType&& value);
void add_dependency(const char* value);
void add_dependency(const char* value, size_t size);
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>& dependency() const;
@@ -715,12 +715,12 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >&
extension() const;
- // repeated int32 public_dependency = 10;
- int public_dependency_size() const;
+ // repeated int32 public_dependency = 10;
+ int public_dependency_size() const;
private:
int _internal_public_dependency_size() const;
public:
- void clear_public_dependency();
+ void clear_public_dependency();
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_public_dependency(int index) const;
const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
@@ -733,16 +733,16 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
void set_public_dependency(int index, ::PROTOBUF_NAMESPACE_ID::int32 value);
void add_public_dependency(::PROTOBUF_NAMESPACE_ID::int32 value);
const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
- public_dependency() const;
+ public_dependency() const;
::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
- mutable_public_dependency();
-
- // repeated int32 weak_dependency = 11;
- int weak_dependency_size() const;
+ mutable_public_dependency();
+
+ // repeated int32 weak_dependency = 11;
+ int weak_dependency_size() const;
private:
int _internal_weak_dependency_size() const;
public:
- void clear_weak_dependency();
+ void clear_weak_dependency();
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_weak_dependency(int index) const;
const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
@@ -755,64 +755,64 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
void set_weak_dependency(int index, ::PROTOBUF_NAMESPACE_ID::int32 value);
void add_weak_dependency(::PROTOBUF_NAMESPACE_ID::int32 value);
const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
- weak_dependency() const;
+ weak_dependency() const;
::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
- mutable_weak_dependency();
-
- // optional string name = 1;
- bool has_name() const;
+ mutable_weak_dependency();
+
+ // optional string name = 1;
+ bool has_name() const;
private:
bool _internal_has_name() const;
public:
- void clear_name();
- const TProtoStringType& name() const;
+ void clear_name();
+ const TProtoStringType& name() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
void set_name(ArgT0&& arg0, ArgT... args);
- TProtoStringType* mutable_name();
+ TProtoStringType* mutable_name();
PROTOBUF_MUST_USE_RESULT TProtoStringType* release_name();
- void set_allocated_name(TProtoStringType* name);
+ void set_allocated_name(TProtoStringType* name);
private:
const TProtoStringType& _internal_name() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const TProtoStringType& value);
TProtoStringType* _internal_mutable_name();
public:
-
- // optional string package = 2;
- bool has_package() const;
+
+ // optional string package = 2;
+ bool has_package() const;
private:
bool _internal_has_package() const;
public:
- void clear_package();
- const TProtoStringType& package() const;
+ void clear_package();
+ const TProtoStringType& package() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
void set_package(ArgT0&& arg0, ArgT... args);
- TProtoStringType* mutable_package();
+ TProtoStringType* mutable_package();
PROTOBUF_MUST_USE_RESULT TProtoStringType* release_package();
- void set_allocated_package(TProtoStringType* package);
+ void set_allocated_package(TProtoStringType* package);
private:
const TProtoStringType& _internal_package() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_package(const TProtoStringType& value);
TProtoStringType* _internal_mutable_package();
public:
-
- // optional string syntax = 12;
- bool has_syntax() const;
+
+ // optional string syntax = 12;
+ bool has_syntax() const;
private:
bool _internal_has_syntax() const;
public:
- void clear_syntax();
- const TProtoStringType& syntax() const;
+ void clear_syntax();
+ const TProtoStringType& syntax() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
void set_syntax(ArgT0&& arg0, ArgT... args);
- TProtoStringType* mutable_syntax();
+ TProtoStringType* mutable_syntax();
PROTOBUF_MUST_USE_RESULT TProtoStringType* release_syntax();
- void set_allocated_syntax(TProtoStringType* syntax);
+ void set_allocated_syntax(TProtoStringType* syntax);
private:
const TProtoStringType& _internal_syntax() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_syntax(const TProtoStringType& value);
TProtoStringType* _internal_mutable_syntax();
public:
-
+
// optional .google.protobuf.FileOptions options = 8;
bool has_options() const;
private:
@@ -891,15 +891,15 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final :
CopyFrom(from);
return *this;
}
- inline DescriptorProto_ExtensionRange& operator=(DescriptorProto_ExtensionRange&& from) noexcept {
+ inline DescriptorProto_ExtensionRange& operator=(DescriptorProto_ExtensionRange&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -920,16 +920,16 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final :
static const DescriptorProto_ExtensionRange& default_instance() {
return *internal_default_instance();
}
- static inline const DescriptorProto_ExtensionRange* internal_default_instance() {
- return reinterpret_cast<const DescriptorProto_ExtensionRange*>(
- &_DescriptorProto_ExtensionRange_default_instance_);
- }
+ static inline const DescriptorProto_ExtensionRange* internal_default_instance() {
+ return reinterpret_cast<const DescriptorProto_ExtensionRange*>(
+ &_DescriptorProto_ExtensionRange_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 2;
-
- friend void swap(DescriptorProto_ExtensionRange& a, DescriptorProto_ExtensionRange& b) {
- a.Swap(&b);
- }
+ 2;
+
+ friend void swap(DescriptorProto_ExtensionRange& a, DescriptorProto_ExtensionRange& b) {
+ a.Swap(&b);
+ }
inline void Swap(DescriptorProto_ExtensionRange* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -1000,12 +1000,12 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final :
kStartFieldNumber = 1,
kEndFieldNumber = 2,
};
- // optional .google.protobuf.ExtensionRangeOptions options = 3;
- bool has_options() const;
+ // optional .google.protobuf.ExtensionRangeOptions options = 3;
+ bool has_options() const;
private:
bool _internal_has_options() const;
public:
- void clear_options();
+ void clear_options();
const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& options() const;
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* release_options();
PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* mutable_options();
@@ -1017,7 +1017,7 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final :
void unsafe_arena_set_allocated_options(
PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options);
PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* unsafe_arena_release_options();
-
+
// optional int32 start = 1;
bool has_start() const;
private:
@@ -1077,15 +1077,15 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final :
CopyFrom(from);
return *this;
}
- inline DescriptorProto_ReservedRange& operator=(DescriptorProto_ReservedRange&& from) noexcept {
+ inline DescriptorProto_ReservedRange& operator=(DescriptorProto_ReservedRange&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -1106,16 +1106,16 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final :
static const DescriptorProto_ReservedRange& default_instance() {
return *internal_default_instance();
}
- static inline const DescriptorProto_ReservedRange* internal_default_instance() {
- return reinterpret_cast<const DescriptorProto_ReservedRange*>(
- &_DescriptorProto_ReservedRange_default_instance_);
- }
+ static inline const DescriptorProto_ReservedRange* internal_default_instance() {
+ return reinterpret_cast<const DescriptorProto_ReservedRange*>(
+ &_DescriptorProto_ReservedRange_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 3;
-
- friend void swap(DescriptorProto_ReservedRange& a, DescriptorProto_ReservedRange& b) {
- a.Swap(&b);
- }
+ 3;
+
+ friend void swap(DescriptorProto_ReservedRange& a, DescriptorProto_ReservedRange& b) {
+ a.Swap(&b);
+ }
inline void Swap(DescriptorProto_ReservedRange* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -1243,15 +1243,15 @@ class PROTOBUF_EXPORT DescriptorProto final :
CopyFrom(from);
return *this;
}
- inline DescriptorProto& operator=(DescriptorProto&& from) noexcept {
+ inline DescriptorProto& operator=(DescriptorProto&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -1272,16 +1272,16 @@ class PROTOBUF_EXPORT DescriptorProto final :
static const DescriptorProto& default_instance() {
return *internal_default_instance();
}
- static inline const DescriptorProto* internal_default_instance() {
- return reinterpret_cast<const DescriptorProto*>(
- &_DescriptorProto_default_instance_);
- }
+ static inline const DescriptorProto* internal_default_instance() {
+ return reinterpret_cast<const DescriptorProto*>(
+ &_DescriptorProto_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 4;
-
- friend void swap(DescriptorProto& a, DescriptorProto& b) {
- a.Swap(&b);
- }
+ 4;
+
+ friend void swap(DescriptorProto& a, DescriptorProto& b) {
+ a.Swap(&b);
+ }
inline void Swap(DescriptorProto* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -1434,15 +1434,15 @@ class PROTOBUF_EXPORT DescriptorProto final :
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange >&
extension_range() const;
- // repeated .google.protobuf.FieldDescriptorProto extension = 6;
- int extension_size() const;
+ // repeated .google.protobuf.FieldDescriptorProto extension = 6;
+ int extension_size() const;
private:
int _internal_extension_size() const;
public:
- void clear_extension();
+ void clear_extension();
PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* mutable_extension(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >*
- mutable_extension();
+ mutable_extension();
private:
const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& _internal_extension(int index) const;
PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* _internal_add_extension();
@@ -1450,8 +1450,8 @@ class PROTOBUF_EXPORT DescriptorProto final :
const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& extension(int index) const;
PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* add_extension();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >&
- extension() const;
-
+ extension() const;
+
// repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
int oneof_decl_size() const;
private:
@@ -1497,12 +1497,12 @@ class PROTOBUF_EXPORT DescriptorProto final :
const TProtoStringType& reserved_name(int index) const;
TProtoStringType* mutable_reserved_name(int index);
void set_reserved_name(int index, const TProtoStringType& value);
- void set_reserved_name(int index, TProtoStringType&& value);
+ void set_reserved_name(int index, TProtoStringType&& value);
void set_reserved_name(int index, const char* value);
void set_reserved_name(int index, const char* value, size_t size);
TProtoStringType* add_reserved_name();
void add_reserved_name(const TProtoStringType& value);
- void add_reserved_name(TProtoStringType&& value);
+ void add_reserved_name(TProtoStringType&& value);
void add_reserved_name(const char* value);
void add_reserved_name(const char* value, size_t size);
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>& reserved_name() const;
@@ -1512,30 +1512,30 @@ class PROTOBUF_EXPORT DescriptorProto final :
TProtoStringType* _internal_add_reserved_name();
public:
- // optional string name = 1;
- bool has_name() const;
+ // optional string name = 1;
+ bool has_name() const;
private:
bool _internal_has_name() const;
public:
- void clear_name();
- const TProtoStringType& name() const;
+ void clear_name();
+ const TProtoStringType& name() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
void set_name(ArgT0&& arg0, ArgT... args);
- TProtoStringType* mutable_name();
+ TProtoStringType* mutable_name();
PROTOBUF_MUST_USE_RESULT TProtoStringType* release_name();
- void set_allocated_name(TProtoStringType* name);
+ void set_allocated_name(TProtoStringType* name);
private:
const TProtoStringType& _internal_name() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const TProtoStringType& value);
TProtoStringType* _internal_mutable_name();
public:
-
- // optional .google.protobuf.MessageOptions options = 7;
- bool has_options() const;
+
+ // optional .google.protobuf.MessageOptions options = 7;
+ bool has_options() const;
private:
bool _internal_has_options() const;
public:
- void clear_options();
+ void clear_options();
const PROTOBUF_NAMESPACE_ID::MessageOptions& options() const;
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::MessageOptions* release_options();
PROTOBUF_NAMESPACE_ID::MessageOptions* mutable_options();
@@ -1547,7 +1547,7 @@ class PROTOBUF_EXPORT DescriptorProto final :
void unsafe_arena_set_allocated_options(
PROTOBUF_NAMESPACE_ID::MessageOptions* options);
PROTOBUF_NAMESPACE_ID::MessageOptions* unsafe_arena_release_options();
-
+
// @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto)
private:
class _Internal;
@@ -1573,38 +1573,38 @@ class PROTOBUF_EXPORT DescriptorProto final :
class PROTOBUF_EXPORT ExtensionRangeOptions final :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ExtensionRangeOptions) */ {
- public:
+ public:
inline ExtensionRangeOptions() : ExtensionRangeOptions(nullptr) {}
~ExtensionRangeOptions() override;
explicit constexpr ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
-
- ExtensionRangeOptions(const ExtensionRangeOptions& from);
+
+ ExtensionRangeOptions(const ExtensionRangeOptions& from);
ExtensionRangeOptions(ExtensionRangeOptions&& from) noexcept
: ExtensionRangeOptions() {
*this = ::std::move(from);
}
-
- inline ExtensionRangeOptions& operator=(const ExtensionRangeOptions& from) {
- CopyFrom(from);
- return *this;
- }
- inline ExtensionRangeOptions& operator=(ExtensionRangeOptions&& from) noexcept {
+
+ inline ExtensionRangeOptions& operator=(const ExtensionRangeOptions& from) {
+ CopyFrom(from);
+ return *this;
+ }
+ inline ExtensionRangeOptions& operator=(ExtensionRangeOptions&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
- }
+ }
inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
-
+ }
+
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
@@ -1617,16 +1617,16 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
static const ExtensionRangeOptions& default_instance() {
return *internal_default_instance();
}
- static inline const ExtensionRangeOptions* internal_default_instance() {
- return reinterpret_cast<const ExtensionRangeOptions*>(
- &_ExtensionRangeOptions_default_instance_);
- }
+ static inline const ExtensionRangeOptions* internal_default_instance() {
+ return reinterpret_cast<const ExtensionRangeOptions*>(
+ &_ExtensionRangeOptions_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 5;
-
- friend void swap(ExtensionRangeOptions& a, ExtensionRangeOptions& b) {
- a.Swap(&b);
- }
+ 5;
+
+ friend void swap(ExtensionRangeOptions& a, ExtensionRangeOptions& b) {
+ a.Swap(&b);
+ }
inline void Swap(ExtensionRangeOptions* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -1640,37 +1640,37 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
-
- // implements Message ----------------------------------------------
-
+
+ // implements Message ----------------------------------------------
+
inline ExtensionRangeOptions* New() const final {
return new ExtensionRangeOptions();
}
-
+
ExtensionRangeOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<ExtensionRangeOptions>(arena);
}
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
- void CopyFrom(const ExtensionRangeOptions& from);
+ void CopyFrom(const ExtensionRangeOptions& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const ExtensionRangeOptions& from);
+ void MergeFrom(const ExtensionRangeOptions& from);
private:
static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, const ::PROTOBUF_NAMESPACE_ID::Message&from);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
-
+
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
- private:
- void SharedCtor();
- void SharedDtor();
+ private:
+ void SharedCtor();
+ void SharedDtor();
void SetCachedSize(int size) const final;
- void InternalSwap(ExtensionRangeOptions* other);
+ void InternalSwap(ExtensionRangeOptions* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "google.protobuf.ExtensionRangeOptions";
@@ -1678,7 +1678,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
protected:
explicit ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
- private:
+ private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
@@ -1688,22 +1688,22 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
enum : int {
kUninterpretedOptionFieldNumber = 999,
};
- // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- int uninterpreted_option_size() const;
+ // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ int uninterpreted_option_size() const;
private:
int _internal_uninterpreted_option_size() const;
public:
- void clear_uninterpreted_option();
+ void clear_uninterpreted_option();
PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
- mutable_uninterpreted_option();
+ mutable_uninterpreted_option();
private:
const PROTOBUF_NAMESPACE_ID::UninterpretedOption& _internal_uninterpreted_option(int index) const;
PROTOBUF_NAMESPACE_ID::UninterpretedOption* _internal_add_uninterpreted_option();
@@ -1711,24 +1711,24 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const;
PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
- uninterpreted_option() const;
-
- GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(ExtensionRangeOptions)
- // @@protoc_insertion_point(class_scope:google.protobuf.ExtensionRangeOptions)
- private:
+ uninterpreted_option() const;
+
+ GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(ExtensionRangeOptions)
+ // @@protoc_insertion_point(class_scope:google.protobuf.ExtensionRangeOptions)
+ private:
class _Internal;
-
+
::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
-
+
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
-};
-// -------------------------------------------------------------------
-
+};
+// -------------------------------------------------------------------
+
class PROTOBUF_EXPORT FieldDescriptorProto final :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldDescriptorProto) */ {
public:
@@ -1746,15 +1746,15 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
CopyFrom(from);
return *this;
}
- inline FieldDescriptorProto& operator=(FieldDescriptorProto&& from) noexcept {
+ inline FieldDescriptorProto& operator=(FieldDescriptorProto&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -1775,16 +1775,16 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
static const FieldDescriptorProto& default_instance() {
return *internal_default_instance();
}
- static inline const FieldDescriptorProto* internal_default_instance() {
- return reinterpret_cast<const FieldDescriptorProto*>(
- &_FieldDescriptorProto_default_instance_);
- }
+ static inline const FieldDescriptorProto* internal_default_instance() {
+ return reinterpret_cast<const FieldDescriptorProto*>(
+ &_FieldDescriptorProto_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 6;
-
- friend void swap(FieldDescriptorProto& a, FieldDescriptorProto& b) {
- a.Swap(&b);
- }
+ 6;
+
+ friend void swap(FieldDescriptorProto& a, FieldDescriptorProto& b) {
+ a.Swap(&b);
+ }
inline void Swap(FieldDescriptorProto* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -1975,24 +1975,24 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
TProtoStringType* _internal_mutable_name();
public:
- // optional string extendee = 2;
- bool has_extendee() const;
+ // optional string extendee = 2;
+ bool has_extendee() const;
private:
bool _internal_has_extendee() const;
public:
- void clear_extendee();
- const TProtoStringType& extendee() const;
+ void clear_extendee();
+ const TProtoStringType& extendee() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
void set_extendee(ArgT0&& arg0, ArgT... args);
- TProtoStringType* mutable_extendee();
+ TProtoStringType* mutable_extendee();
PROTOBUF_MUST_USE_RESULT TProtoStringType* release_extendee();
- void set_allocated_extendee(TProtoStringType* extendee);
+ void set_allocated_extendee(TProtoStringType* extendee);
private:
const TProtoStringType& _internal_extendee() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_extendee(const TProtoStringType& value);
TProtoStringType* _internal_mutable_extendee();
public:
-
+
// optional string type_name = 6;
bool has_type_name() const;
private:
@@ -2065,32 +2065,32 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
PROTOBUF_NAMESPACE_ID::FieldOptions* options);
PROTOBUF_NAMESPACE_ID::FieldOptions* unsafe_arena_release_options();
- // optional int32 number = 3;
- bool has_number() const;
+ // optional int32 number = 3;
+ bool has_number() const;
private:
bool _internal_has_number() const;
public:
- void clear_number();
+ void clear_number();
::PROTOBUF_NAMESPACE_ID::int32 number() const;
void set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_number() const;
void _internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
-
- // optional int32 oneof_index = 9;
- bool has_oneof_index() const;
+
+ // optional int32 oneof_index = 9;
+ bool has_oneof_index() const;
private:
bool _internal_has_oneof_index() const;
public:
- void clear_oneof_index();
+ void clear_oneof_index();
::PROTOBUF_NAMESPACE_ID::int32 oneof_index() const;
void set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_oneof_index() const;
void _internal_set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
-
+
// optional bool proto3_optional = 17;
bool has_proto3_optional() const;
private:
@@ -2104,32 +2104,32 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
void _internal_set_proto3_optional(bool value);
public:
- // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
- bool has_label() const;
+ // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
+ bool has_label() const;
private:
bool _internal_has_label() const;
public:
- void clear_label();
+ void clear_label();
PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label label() const;
void set_label(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label value);
private:
PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label _internal_label() const;
void _internal_set_label(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label value);
public:
-
- // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
- bool has_type() const;
+
+ // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
+ bool has_type() const;
private:
bool _internal_has_type() const;
public:
- void clear_type();
+ void clear_type();
PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type type() const;
void set_type(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type value);
private:
PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type _internal_type() const;
void _internal_set_type(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type value);
public:
-
+
// @@protoc_insertion_point(class_scope:google.protobuf.FieldDescriptorProto)
private:
class _Internal;
@@ -2148,8 +2148,8 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
::PROTOBUF_NAMESPACE_ID::int32 number_;
::PROTOBUF_NAMESPACE_ID::int32 oneof_index_;
bool proto3_optional_;
- int label_;
- int type_;
+ int label_;
+ int type_;
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -2171,15 +2171,15 @@ class PROTOBUF_EXPORT OneofDescriptorProto final :
CopyFrom(from);
return *this;
}
- inline OneofDescriptorProto& operator=(OneofDescriptorProto&& from) noexcept {
+ inline OneofDescriptorProto& operator=(OneofDescriptorProto&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -2200,16 +2200,16 @@ class PROTOBUF_EXPORT OneofDescriptorProto final :
static const OneofDescriptorProto& default_instance() {
return *internal_default_instance();
}
- static inline const OneofDescriptorProto* internal_default_instance() {
- return reinterpret_cast<const OneofDescriptorProto*>(
- &_OneofDescriptorProto_default_instance_);
- }
+ static inline const OneofDescriptorProto* internal_default_instance() {
+ return reinterpret_cast<const OneofDescriptorProto*>(
+ &_OneofDescriptorProto_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 7;
-
- friend void swap(OneofDescriptorProto& a, OneofDescriptorProto& b) {
- a.Swap(&b);
- }
+ 7;
+
+ friend void swap(OneofDescriptorProto& a, OneofDescriptorProto& b) {
+ a.Swap(&b);
+ }
inline void Swap(OneofDescriptorProto* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -2504,24 +2504,24 @@ class PROTOBUF_EXPORT EnumDescriptorProto final :
explicit constexpr EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
EnumDescriptorProto(const EnumDescriptorProto& from);
- EnumDescriptorProto(EnumDescriptorProto&& from) noexcept
- : EnumDescriptorProto() {
- *this = ::std::move(from);
- }
+ EnumDescriptorProto(EnumDescriptorProto&& from) noexcept
+ : EnumDescriptorProto() {
+ *this = ::std::move(from);
+ }
inline EnumDescriptorProto& operator=(const EnumDescriptorProto& from) {
CopyFrom(from);
return *this;
}
- inline EnumDescriptorProto& operator=(EnumDescriptorProto&& from) noexcept {
+ inline EnumDescriptorProto& operator=(EnumDescriptorProto&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -2542,16 +2542,16 @@ class PROTOBUF_EXPORT EnumDescriptorProto final :
static const EnumDescriptorProto& default_instance() {
return *internal_default_instance();
}
- static inline const EnumDescriptorProto* internal_default_instance() {
- return reinterpret_cast<const EnumDescriptorProto*>(
- &_EnumDescriptorProto_default_instance_);
- }
+ static inline const EnumDescriptorProto* internal_default_instance() {
+ return reinterpret_cast<const EnumDescriptorProto*>(
+ &_EnumDescriptorProto_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
9;
-
- friend void swap(EnumDescriptorProto& a, EnumDescriptorProto& b) {
- a.Swap(&b);
- }
+
+ friend void swap(EnumDescriptorProto& a, EnumDescriptorProto& b) {
+ a.Swap(&b);
+ }
inline void Swap(EnumDescriptorProto* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -2626,15 +2626,15 @@ class PROTOBUF_EXPORT EnumDescriptorProto final :
kNameFieldNumber = 1,
kOptionsFieldNumber = 3,
};
- // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
- int value_size() const;
+ // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
+ int value_size() const;
private:
int _internal_value_size() const;
public:
- void clear_value();
+ void clear_value();
PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* mutable_value(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto >*
- mutable_value();
+ mutable_value();
private:
const PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto& _internal_value(int index) const;
PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* _internal_add_value();
@@ -2642,8 +2642,8 @@ class PROTOBUF_EXPORT EnumDescriptorProto final :
const PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto& value(int index) const;
PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* add_value();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto >&
- value() const;
-
+ value() const;
+
// repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
int reserved_range_size() const;
private:
@@ -2757,15 +2757,15 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final :
CopyFrom(from);
return *this;
}
- inline EnumValueDescriptorProto& operator=(EnumValueDescriptorProto&& from) noexcept {
+ inline EnumValueDescriptorProto& operator=(EnumValueDescriptorProto&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -2786,16 +2786,16 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final :
static const EnumValueDescriptorProto& default_instance() {
return *internal_default_instance();
}
- static inline const EnumValueDescriptorProto* internal_default_instance() {
- return reinterpret_cast<const EnumValueDescriptorProto*>(
- &_EnumValueDescriptorProto_default_instance_);
- }
+ static inline const EnumValueDescriptorProto* internal_default_instance() {
+ return reinterpret_cast<const EnumValueDescriptorProto*>(
+ &_EnumValueDescriptorProto_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
10;
-
- friend void swap(EnumValueDescriptorProto& a, EnumValueDescriptorProto& b) {
- a.Swap(&b);
- }
+
+ friend void swap(EnumValueDescriptorProto& a, EnumValueDescriptorProto& b) {
+ a.Swap(&b);
+ }
inline void Swap(EnumValueDescriptorProto* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -2902,19 +2902,19 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final :
PROTOBUF_NAMESPACE_ID::EnumValueOptions* options);
PROTOBUF_NAMESPACE_ID::EnumValueOptions* unsafe_arena_release_options();
- // optional int32 number = 2;
- bool has_number() const;
+ // optional int32 number = 2;
+ bool has_number() const;
private:
bool _internal_has_number() const;
public:
- void clear_number();
+ void clear_number();
::PROTOBUF_NAMESPACE_ID::int32 number() const;
void set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_number() const;
void _internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
-
+
// @@protoc_insertion_point(class_scope:google.protobuf.EnumValueDescriptorProto)
private:
class _Internal;
@@ -2948,15 +2948,15 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final :
CopyFrom(from);
return *this;
}
- inline ServiceDescriptorProto& operator=(ServiceDescriptorProto&& from) noexcept {
+ inline ServiceDescriptorProto& operator=(ServiceDescriptorProto&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -2977,16 +2977,16 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final :
static const ServiceDescriptorProto& default_instance() {
return *internal_default_instance();
}
- static inline const ServiceDescriptorProto* internal_default_instance() {
- return reinterpret_cast<const ServiceDescriptorProto*>(
- &_ServiceDescriptorProto_default_instance_);
- }
+ static inline const ServiceDescriptorProto* internal_default_instance() {
+ return reinterpret_cast<const ServiceDescriptorProto*>(
+ &_ServiceDescriptorProto_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
11;
-
- friend void swap(ServiceDescriptorProto& a, ServiceDescriptorProto& b) {
- a.Swap(&b);
- }
+
+ friend void swap(ServiceDescriptorProto& a, ServiceDescriptorProto& b) {
+ a.Swap(&b);
+ }
inline void Swap(ServiceDescriptorProto* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -3057,15 +3057,15 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final :
kNameFieldNumber = 1,
kOptionsFieldNumber = 3,
};
- // repeated .google.protobuf.MethodDescriptorProto method = 2;
- int method_size() const;
+ // repeated .google.protobuf.MethodDescriptorProto method = 2;
+ int method_size() const;
private:
int _internal_method_size() const;
public:
- void clear_method();
+ void clear_method();
PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* mutable_method(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::MethodDescriptorProto >*
- mutable_method();
+ mutable_method();
private:
const PROTOBUF_NAMESPACE_ID::MethodDescriptorProto& _internal_method(int index) const;
PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* _internal_add_method();
@@ -3073,8 +3073,8 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final :
const PROTOBUF_NAMESPACE_ID::MethodDescriptorProto& method(int index) const;
PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* add_method();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::MethodDescriptorProto >&
- method() const;
-
+ method() const;
+
// optional string name = 1;
bool has_name() const;
private:
@@ -3144,15 +3144,15 @@ class PROTOBUF_EXPORT MethodDescriptorProto final :
CopyFrom(from);
return *this;
}
- inline MethodDescriptorProto& operator=(MethodDescriptorProto&& from) noexcept {
+ inline MethodDescriptorProto& operator=(MethodDescriptorProto&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -3173,16 +3173,16 @@ class PROTOBUF_EXPORT MethodDescriptorProto final :
static const MethodDescriptorProto& default_instance() {
return *internal_default_instance();
}
- static inline const MethodDescriptorProto* internal_default_instance() {
- return reinterpret_cast<const MethodDescriptorProto*>(
- &_MethodDescriptorProto_default_instance_);
- }
+ static inline const MethodDescriptorProto* internal_default_instance() {
+ return reinterpret_cast<const MethodDescriptorProto*>(
+ &_MethodDescriptorProto_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
12;
-
- friend void swap(MethodDescriptorProto& a, MethodDescriptorProto& b) {
- a.Swap(&b);
- }
+
+ friend void swap(MethodDescriptorProto& a, MethodDescriptorProto& b) {
+ a.Swap(&b);
+ }
inline void Swap(MethodDescriptorProto* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -3390,15 +3390,15 @@ class PROTOBUF_EXPORT FileOptions final :
CopyFrom(from);
return *this;
}
- inline FileOptions& operator=(FileOptions&& from) noexcept {
+ inline FileOptions& operator=(FileOptions&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -3419,16 +3419,16 @@ class PROTOBUF_EXPORT FileOptions final :
static const FileOptions& default_instance() {
return *internal_default_instance();
}
- static inline const FileOptions* internal_default_instance() {
- return reinterpret_cast<const FileOptions*>(
- &_FileOptions_default_instance_);
- }
+ static inline const FileOptions* internal_default_instance() {
+ return reinterpret_cast<const FileOptions*>(
+ &_FileOptions_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
13;
-
- friend void swap(FileOptions& a, FileOptions& b) {
- a.Swap(&b);
- }
+
+ friend void swap(FileOptions& a, FileOptions& b) {
+ a.Swap(&b);
+ }
inline void Swap(FileOptions* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -3549,15 +3549,15 @@ class PROTOBUF_EXPORT FileOptions final :
kOptimizeForFieldNumber = 9,
kCcEnableArenasFieldNumber = 31,
};
- // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- int uninterpreted_option_size() const;
+ // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ int uninterpreted_option_size() const;
private:
int _internal_uninterpreted_option_size() const;
public:
- void clear_uninterpreted_option();
+ void clear_uninterpreted_option();
PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
- mutable_uninterpreted_option();
+ mutable_uninterpreted_option();
private:
const PROTOBUF_NAMESPACE_ID::UninterpretedOption& _internal_uninterpreted_option(int index) const;
PROTOBUF_NAMESPACE_ID::UninterpretedOption* _internal_add_uninterpreted_option();
@@ -3565,8 +3565,8 @@ class PROTOBUF_EXPORT FileOptions final :
const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const;
PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
- uninterpreted_option() const;
-
+ uninterpreted_option() const;
+
// optional string java_package = 1;
bool has_java_package() const;
private:
@@ -3603,114 +3603,114 @@ class PROTOBUF_EXPORT FileOptions final :
TProtoStringType* _internal_mutable_java_outer_classname();
public:
- // optional string go_package = 11;
- bool has_go_package() const;
+ // optional string go_package = 11;
+ bool has_go_package() const;
private:
bool _internal_has_go_package() const;
public:
- void clear_go_package();
- const TProtoStringType& go_package() const;
+ void clear_go_package();
+ const TProtoStringType& go_package() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
void set_go_package(ArgT0&& arg0, ArgT... args);
- TProtoStringType* mutable_go_package();
+ TProtoStringType* mutable_go_package();
PROTOBUF_MUST_USE_RESULT TProtoStringType* release_go_package();
- void set_allocated_go_package(TProtoStringType* go_package);
+ void set_allocated_go_package(TProtoStringType* go_package);
private:
const TProtoStringType& _internal_go_package() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_go_package(const TProtoStringType& value);
TProtoStringType* _internal_mutable_go_package();
public:
-
- // optional string objc_class_prefix = 36;
- bool has_objc_class_prefix() const;
+
+ // optional string objc_class_prefix = 36;
+ bool has_objc_class_prefix() const;
private:
bool _internal_has_objc_class_prefix() const;
public:
- void clear_objc_class_prefix();
- const TProtoStringType& objc_class_prefix() const;
+ void clear_objc_class_prefix();
+ const TProtoStringType& objc_class_prefix() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
void set_objc_class_prefix(ArgT0&& arg0, ArgT... args);
- TProtoStringType* mutable_objc_class_prefix();
+ TProtoStringType* mutable_objc_class_prefix();
PROTOBUF_MUST_USE_RESULT TProtoStringType* release_objc_class_prefix();
- void set_allocated_objc_class_prefix(TProtoStringType* objc_class_prefix);
+ void set_allocated_objc_class_prefix(TProtoStringType* objc_class_prefix);
private:
const TProtoStringType& _internal_objc_class_prefix() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_objc_class_prefix(const TProtoStringType& value);
TProtoStringType* _internal_mutable_objc_class_prefix();
public:
-
- // optional string csharp_namespace = 37;
- bool has_csharp_namespace() const;
+
+ // optional string csharp_namespace = 37;
+ bool has_csharp_namespace() const;
private:
bool _internal_has_csharp_namespace() const;
public:
- void clear_csharp_namespace();
- const TProtoStringType& csharp_namespace() const;
+ void clear_csharp_namespace();
+ const TProtoStringType& csharp_namespace() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
void set_csharp_namespace(ArgT0&& arg0, ArgT... args);
- TProtoStringType* mutable_csharp_namespace();
+ TProtoStringType* mutable_csharp_namespace();
PROTOBUF_MUST_USE_RESULT TProtoStringType* release_csharp_namespace();
- void set_allocated_csharp_namespace(TProtoStringType* csharp_namespace);
+ void set_allocated_csharp_namespace(TProtoStringType* csharp_namespace);
private:
const TProtoStringType& _internal_csharp_namespace() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_csharp_namespace(const TProtoStringType& value);
TProtoStringType* _internal_mutable_csharp_namespace();
public:
-
- // optional string swift_prefix = 39;
- bool has_swift_prefix() const;
+
+ // optional string swift_prefix = 39;
+ bool has_swift_prefix() const;
private:
bool _internal_has_swift_prefix() const;
public:
- void clear_swift_prefix();
- const TProtoStringType& swift_prefix() const;
+ void clear_swift_prefix();
+ const TProtoStringType& swift_prefix() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
void set_swift_prefix(ArgT0&& arg0, ArgT... args);
- TProtoStringType* mutable_swift_prefix();
+ TProtoStringType* mutable_swift_prefix();
PROTOBUF_MUST_USE_RESULT TProtoStringType* release_swift_prefix();
- void set_allocated_swift_prefix(TProtoStringType* swift_prefix);
+ void set_allocated_swift_prefix(TProtoStringType* swift_prefix);
private:
const TProtoStringType& _internal_swift_prefix() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_swift_prefix(const TProtoStringType& value);
TProtoStringType* _internal_mutable_swift_prefix();
public:
-
- // optional string php_class_prefix = 40;
- bool has_php_class_prefix() const;
+
+ // optional string php_class_prefix = 40;
+ bool has_php_class_prefix() const;
private:
bool _internal_has_php_class_prefix() const;
public:
- void clear_php_class_prefix();
- const TProtoStringType& php_class_prefix() const;
+ void clear_php_class_prefix();
+ const TProtoStringType& php_class_prefix() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
void set_php_class_prefix(ArgT0&& arg0, ArgT... args);
- TProtoStringType* mutable_php_class_prefix();
+ TProtoStringType* mutable_php_class_prefix();
PROTOBUF_MUST_USE_RESULT TProtoStringType* release_php_class_prefix();
- void set_allocated_php_class_prefix(TProtoStringType* php_class_prefix);
+ void set_allocated_php_class_prefix(TProtoStringType* php_class_prefix);
private:
const TProtoStringType& _internal_php_class_prefix() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_php_class_prefix(const TProtoStringType& value);
TProtoStringType* _internal_mutable_php_class_prefix();
public:
-
- // optional string php_namespace = 41;
- bool has_php_namespace() const;
+
+ // optional string php_namespace = 41;
+ bool has_php_namespace() const;
private:
bool _internal_has_php_namespace() const;
public:
- void clear_php_namespace();
- const TProtoStringType& php_namespace() const;
+ void clear_php_namespace();
+ const TProtoStringType& php_namespace() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
void set_php_namespace(ArgT0&& arg0, ArgT... args);
- TProtoStringType* mutable_php_namespace();
+ TProtoStringType* mutable_php_namespace();
PROTOBUF_MUST_USE_RESULT TProtoStringType* release_php_namespace();
- void set_allocated_php_namespace(TProtoStringType* php_namespace);
+ void set_allocated_php_namespace(TProtoStringType* php_namespace);
private:
const TProtoStringType& _internal_php_namespace() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_php_namespace(const TProtoStringType& value);
TProtoStringType* _internal_mutable_php_namespace();
public:
-
+
// optional string php_metadata_namespace = 44;
bool has_php_metadata_namespace() const;
private:
@@ -3728,7 +3728,7 @@ class PROTOBUF_EXPORT FileOptions final :
inline PROTOBUF_ALWAYS_INLINE void _internal_set_php_metadata_namespace(const TProtoStringType& value);
TProtoStringType* _internal_mutable_php_metadata_namespace();
public:
-
+
// optional string ruby_package = 45;
bool has_ruby_package() const;
private:
@@ -3760,7 +3760,7 @@ class PROTOBUF_EXPORT FileOptions final :
void _internal_set_java_multiple_files(bool value);
public:
- // optional bool java_generate_equals_and_hash = 20 [deprecated = true];
+ // optional bool java_generate_equals_and_hash = 20 [deprecated = true];
PROTOBUF_DEPRECATED bool has_java_generate_equals_and_hash() const;
private:
bool _internal_has_java_generate_equals_and_hash() const;
@@ -3825,19 +3825,19 @@ class PROTOBUF_EXPORT FileOptions final :
void _internal_set_py_generic_services(bool value);
public:
- // optional bool php_generic_services = 42 [default = false];
- bool has_php_generic_services() const;
+ // optional bool php_generic_services = 42 [default = false];
+ bool has_php_generic_services() const;
private:
bool _internal_has_php_generic_services() const;
public:
- void clear_php_generic_services();
- bool php_generic_services() const;
- void set_php_generic_services(bool value);
+ void clear_php_generic_services();
+ bool php_generic_services() const;
+ void set_php_generic_services(bool value);
private:
bool _internal_php_generic_services() const;
void _internal_set_php_generic_services(bool value);
public:
-
+
// optional bool deprecated = 23 [default = false];
bool has_deprecated() const;
private:
@@ -3851,12 +3851,12 @@ class PROTOBUF_EXPORT FileOptions final :
void _internal_set_deprecated(bool value);
public:
- // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
- bool has_optimize_for() const;
+ // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
+ bool has_optimize_for() const;
private:
bool _internal_has_optimize_for() const;
public:
- void clear_optimize_for();
+ void clear_optimize_for();
PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode optimize_for() const;
void set_optimize_for(PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode value);
private:
@@ -3906,9 +3906,9 @@ class PROTOBUF_EXPORT FileOptions final :
bool cc_generic_services_;
bool java_generic_services_;
bool py_generic_services_;
- bool php_generic_services_;
+ bool php_generic_services_;
bool deprecated_;
- int optimize_for_;
+ int optimize_for_;
bool cc_enable_arenas_;
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
@@ -3931,15 +3931,15 @@ class PROTOBUF_EXPORT MessageOptions final :
CopyFrom(from);
return *this;
}
- inline MessageOptions& operator=(MessageOptions&& from) noexcept {
+ inline MessageOptions& operator=(MessageOptions&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -3960,16 +3960,16 @@ class PROTOBUF_EXPORT MessageOptions final :
static const MessageOptions& default_instance() {
return *internal_default_instance();
}
- static inline const MessageOptions* internal_default_instance() {
- return reinterpret_cast<const MessageOptions*>(
- &_MessageOptions_default_instance_);
- }
+ static inline const MessageOptions* internal_default_instance() {
+ return reinterpret_cast<const MessageOptions*>(
+ &_MessageOptions_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
14;
-
- friend void swap(MessageOptions& a, MessageOptions& b) {
- a.Swap(&b);
- }
+
+ friend void swap(MessageOptions& a, MessageOptions& b) {
+ a.Swap(&b);
+ }
inline void Swap(MessageOptions* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -4042,15 +4042,15 @@ class PROTOBUF_EXPORT MessageOptions final :
kDeprecatedFieldNumber = 3,
kMapEntryFieldNumber = 7,
};
- // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- int uninterpreted_option_size() const;
+ // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ int uninterpreted_option_size() const;
private:
int _internal_uninterpreted_option_size() const;
public:
- void clear_uninterpreted_option();
+ void clear_uninterpreted_option();
PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
- mutable_uninterpreted_option();
+ mutable_uninterpreted_option();
private:
const PROTOBUF_NAMESPACE_ID::UninterpretedOption& _internal_uninterpreted_option(int index) const;
PROTOBUF_NAMESPACE_ID::UninterpretedOption* _internal_add_uninterpreted_option();
@@ -4058,8 +4058,8 @@ class PROTOBUF_EXPORT MessageOptions final :
const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const;
PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
- uninterpreted_option() const;
-
+ uninterpreted_option() const;
+
// optional bool message_set_wire_format = 1 [default = false];
bool has_message_set_wire_format() const;
private:
@@ -4150,15 +4150,15 @@ class PROTOBUF_EXPORT FieldOptions final :
CopyFrom(from);
return *this;
}
- inline FieldOptions& operator=(FieldOptions&& from) noexcept {
+ inline FieldOptions& operator=(FieldOptions&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -4179,16 +4179,16 @@ class PROTOBUF_EXPORT FieldOptions final :
static const FieldOptions& default_instance() {
return *internal_default_instance();
}
- static inline const FieldOptions* internal_default_instance() {
- return reinterpret_cast<const FieldOptions*>(
- &_FieldOptions_default_instance_);
- }
+ static inline const FieldOptions* internal_default_instance() {
+ return reinterpret_cast<const FieldOptions*>(
+ &_FieldOptions_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
15;
-
- friend void swap(FieldOptions& a, FieldOptions& b) {
- a.Swap(&b);
- }
+
+ friend void swap(FieldOptions& a, FieldOptions& b) {
+ a.Swap(&b);
+ }
inline void Swap(FieldOptions* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -4327,15 +4327,15 @@ class PROTOBUF_EXPORT FieldOptions final :
kWeakFieldNumber = 10,
kJstypeFieldNumber = 6,
};
- // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- int uninterpreted_option_size() const;
+ // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ int uninterpreted_option_size() const;
private:
int _internal_uninterpreted_option_size() const;
public:
- void clear_uninterpreted_option();
+ void clear_uninterpreted_option();
PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
- mutable_uninterpreted_option();
+ mutable_uninterpreted_option();
private:
const PROTOBUF_NAMESPACE_ID::UninterpretedOption& _internal_uninterpreted_option(int index) const;
PROTOBUF_NAMESPACE_ID::UninterpretedOption* _internal_add_uninterpreted_option();
@@ -4343,8 +4343,8 @@ class PROTOBUF_EXPORT FieldOptions final :
const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const;
PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
- uninterpreted_option() const;
-
+ uninterpreted_option() const;
+
// optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
bool has_ctype() const;
private:
@@ -4410,19 +4410,19 @@ class PROTOBUF_EXPORT FieldOptions final :
void _internal_set_weak(bool value);
public:
- // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
- bool has_jstype() const;
+ // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
+ bool has_jstype() const;
private:
bool _internal_has_jstype() const;
public:
- void clear_jstype();
+ void clear_jstype();
PROTOBUF_NAMESPACE_ID::FieldOptions_JSType jstype() const;
void set_jstype(PROTOBUF_NAMESPACE_ID::FieldOptions_JSType value);
private:
PROTOBUF_NAMESPACE_ID::FieldOptions_JSType _internal_jstype() const;
void _internal_set_jstype(PROTOBUF_NAMESPACE_ID::FieldOptions_JSType value);
public:
-
+
GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(FieldOptions)
// @@protoc_insertion_point(class_scope:google.protobuf.FieldOptions)
private:
@@ -4441,7 +4441,7 @@ class PROTOBUF_EXPORT FieldOptions final :
bool lazy_;
bool deprecated_;
bool weak_;
- int jstype_;
+ int jstype_;
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -4463,15 +4463,15 @@ class PROTOBUF_EXPORT OneofOptions final :
CopyFrom(from);
return *this;
}
- inline OneofOptions& operator=(OneofOptions&& from) noexcept {
+ inline OneofOptions& operator=(OneofOptions&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -4492,16 +4492,16 @@ class PROTOBUF_EXPORT OneofOptions final :
static const OneofOptions& default_instance() {
return *internal_default_instance();
}
- static inline const OneofOptions* internal_default_instance() {
- return reinterpret_cast<const OneofOptions*>(
- &_OneofOptions_default_instance_);
- }
+ static inline const OneofOptions* internal_default_instance() {
+ return reinterpret_cast<const OneofOptions*>(
+ &_OneofOptions_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
16;
-
- friend void swap(OneofOptions& a, OneofOptions& b) {
- a.Swap(&b);
- }
+
+ friend void swap(OneofOptions& a, OneofOptions& b) {
+ a.Swap(&b);
+ }
inline void Swap(OneofOptions* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -4621,15 +4621,15 @@ class PROTOBUF_EXPORT EnumOptions final :
CopyFrom(from);
return *this;
}
- inline EnumOptions& operator=(EnumOptions&& from) noexcept {
+ inline EnumOptions& operator=(EnumOptions&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -4650,16 +4650,16 @@ class PROTOBUF_EXPORT EnumOptions final :
static const EnumOptions& default_instance() {
return *internal_default_instance();
}
- static inline const EnumOptions* internal_default_instance() {
- return reinterpret_cast<const EnumOptions*>(
- &_EnumOptions_default_instance_);
- }
+ static inline const EnumOptions* internal_default_instance() {
+ return reinterpret_cast<const EnumOptions*>(
+ &_EnumOptions_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
17;
-
- friend void swap(EnumOptions& a, EnumOptions& b) {
- a.Swap(&b);
- }
+
+ friend void swap(EnumOptions& a, EnumOptions& b) {
+ a.Swap(&b);
+ }
inline void Swap(EnumOptions* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -4730,15 +4730,15 @@ class PROTOBUF_EXPORT EnumOptions final :
kAllowAliasFieldNumber = 2,
kDeprecatedFieldNumber = 3,
};
- // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- int uninterpreted_option_size() const;
+ // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ int uninterpreted_option_size() const;
private:
int _internal_uninterpreted_option_size() const;
public:
- void clear_uninterpreted_option();
+ void clear_uninterpreted_option();
PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
- mutable_uninterpreted_option();
+ mutable_uninterpreted_option();
private:
const PROTOBUF_NAMESPACE_ID::UninterpretedOption& _internal_uninterpreted_option(int index) const;
PROTOBUF_NAMESPACE_ID::UninterpretedOption* _internal_add_uninterpreted_option();
@@ -4746,8 +4746,8 @@ class PROTOBUF_EXPORT EnumOptions final :
const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const;
PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
- uninterpreted_option() const;
-
+ uninterpreted_option() const;
+
// optional bool allow_alias = 2;
bool has_allow_alias() const;
private:
@@ -4810,15 +4810,15 @@ class PROTOBUF_EXPORT EnumValueOptions final :
CopyFrom(from);
return *this;
}
- inline EnumValueOptions& operator=(EnumValueOptions&& from) noexcept {
+ inline EnumValueOptions& operator=(EnumValueOptions&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -4839,16 +4839,16 @@ class PROTOBUF_EXPORT EnumValueOptions final :
static const EnumValueOptions& default_instance() {
return *internal_default_instance();
}
- static inline const EnumValueOptions* internal_default_instance() {
- return reinterpret_cast<const EnumValueOptions*>(
- &_EnumValueOptions_default_instance_);
- }
+ static inline const EnumValueOptions* internal_default_instance() {
+ return reinterpret_cast<const EnumValueOptions*>(
+ &_EnumValueOptions_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
18;
-
- friend void swap(EnumValueOptions& a, EnumValueOptions& b) {
- a.Swap(&b);
- }
+
+ friend void swap(EnumValueOptions& a, EnumValueOptions& b) {
+ a.Swap(&b);
+ }
inline void Swap(EnumValueOptions* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -4936,19 +4936,19 @@ class PROTOBUF_EXPORT EnumValueOptions final :
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
uninterpreted_option() const;
- // optional bool deprecated = 1 [default = false];
- bool has_deprecated() const;
+ // optional bool deprecated = 1 [default = false];
+ bool has_deprecated() const;
private:
bool _internal_has_deprecated() const;
public:
- void clear_deprecated();
- bool deprecated() const;
- void set_deprecated(bool value);
+ void clear_deprecated();
+ bool deprecated() const;
+ void set_deprecated(bool value);
private:
bool _internal_deprecated() const;
void _internal_set_deprecated(bool value);
public:
-
+
GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(EnumValueOptions)
// @@protoc_insertion_point(class_scope:google.protobuf.EnumValueOptions)
private:
@@ -4984,15 +4984,15 @@ class PROTOBUF_EXPORT ServiceOptions final :
CopyFrom(from);
return *this;
}
- inline ServiceOptions& operator=(ServiceOptions&& from) noexcept {
+ inline ServiceOptions& operator=(ServiceOptions&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -5013,16 +5013,16 @@ class PROTOBUF_EXPORT ServiceOptions final :
static const ServiceOptions& default_instance() {
return *internal_default_instance();
}
- static inline const ServiceOptions* internal_default_instance() {
- return reinterpret_cast<const ServiceOptions*>(
- &_ServiceOptions_default_instance_);
- }
+ static inline const ServiceOptions* internal_default_instance() {
+ return reinterpret_cast<const ServiceOptions*>(
+ &_ServiceOptions_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
19;
-
- friend void swap(ServiceOptions& a, ServiceOptions& b) {
- a.Swap(&b);
- }
+
+ friend void swap(ServiceOptions& a, ServiceOptions& b) {
+ a.Swap(&b);
+ }
inline void Swap(ServiceOptions* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -5110,19 +5110,19 @@ class PROTOBUF_EXPORT ServiceOptions final :
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
uninterpreted_option() const;
- // optional bool deprecated = 33 [default = false];
- bool has_deprecated() const;
+ // optional bool deprecated = 33 [default = false];
+ bool has_deprecated() const;
private:
bool _internal_has_deprecated() const;
public:
- void clear_deprecated();
- bool deprecated() const;
- void set_deprecated(bool value);
+ void clear_deprecated();
+ bool deprecated() const;
+ void set_deprecated(bool value);
private:
bool _internal_deprecated() const;
void _internal_set_deprecated(bool value);
public:
-
+
GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(ServiceOptions)
// @@protoc_insertion_point(class_scope:google.protobuf.ServiceOptions)
private:
@@ -5158,15 +5158,15 @@ class PROTOBUF_EXPORT MethodOptions final :
CopyFrom(from);
return *this;
}
- inline MethodOptions& operator=(MethodOptions&& from) noexcept {
+ inline MethodOptions& operator=(MethodOptions&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -5187,16 +5187,16 @@ class PROTOBUF_EXPORT MethodOptions final :
static const MethodOptions& default_instance() {
return *internal_default_instance();
}
- static inline const MethodOptions* internal_default_instance() {
- return reinterpret_cast<const MethodOptions*>(
- &_MethodOptions_default_instance_);
- }
+ static inline const MethodOptions* internal_default_instance() {
+ return reinterpret_cast<const MethodOptions*>(
+ &_MethodOptions_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
20;
-
- friend void swap(MethodOptions& a, MethodOptions& b) {
- a.Swap(&b);
- }
+
+ friend void swap(MethodOptions& a, MethodOptions& b) {
+ a.Swap(&b);
+ }
inline void Swap(MethodOptions* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -5260,38 +5260,38 @@ class PROTOBUF_EXPORT MethodOptions final :
// nested types ----------------------------------------------------
- typedef MethodOptions_IdempotencyLevel IdempotencyLevel;
+ typedef MethodOptions_IdempotencyLevel IdempotencyLevel;
static constexpr IdempotencyLevel IDEMPOTENCY_UNKNOWN =
- MethodOptions_IdempotencyLevel_IDEMPOTENCY_UNKNOWN;
+ MethodOptions_IdempotencyLevel_IDEMPOTENCY_UNKNOWN;
static constexpr IdempotencyLevel NO_SIDE_EFFECTS =
- MethodOptions_IdempotencyLevel_NO_SIDE_EFFECTS;
+ MethodOptions_IdempotencyLevel_NO_SIDE_EFFECTS;
static constexpr IdempotencyLevel IDEMPOTENT =
- MethodOptions_IdempotencyLevel_IDEMPOTENT;
- static inline bool IdempotencyLevel_IsValid(int value) {
- return MethodOptions_IdempotencyLevel_IsValid(value);
- }
+ MethodOptions_IdempotencyLevel_IDEMPOTENT;
+ static inline bool IdempotencyLevel_IsValid(int value) {
+ return MethodOptions_IdempotencyLevel_IsValid(value);
+ }
static constexpr IdempotencyLevel IdempotencyLevel_MIN =
- MethodOptions_IdempotencyLevel_IdempotencyLevel_MIN;
+ MethodOptions_IdempotencyLevel_IdempotencyLevel_MIN;
static constexpr IdempotencyLevel IdempotencyLevel_MAX =
- MethodOptions_IdempotencyLevel_IdempotencyLevel_MAX;
+ MethodOptions_IdempotencyLevel_IdempotencyLevel_MAX;
static constexpr int IdempotencyLevel_ARRAYSIZE =
- MethodOptions_IdempotencyLevel_IdempotencyLevel_ARRAYSIZE;
+ MethodOptions_IdempotencyLevel_IdempotencyLevel_ARRAYSIZE;
static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor*
- IdempotencyLevel_descriptor() {
- return MethodOptions_IdempotencyLevel_descriptor();
- }
+ IdempotencyLevel_descriptor() {
+ return MethodOptions_IdempotencyLevel_descriptor();
+ }
template<typename T>
static inline const TProtoStringType& IdempotencyLevel_Name(T enum_t_value) {
static_assert(::std::is_same<T, IdempotencyLevel>::value ||
::std::is_integral<T>::value,
"Incorrect type passed to function IdempotencyLevel_Name.");
return MethodOptions_IdempotencyLevel_Name(enum_t_value);
- }
+ }
static inline bool IdempotencyLevel_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,
- IdempotencyLevel* value) {
- return MethodOptions_IdempotencyLevel_Parse(name, value);
- }
-
+ IdempotencyLevel* value) {
+ return MethodOptions_IdempotencyLevel_Parse(name, value);
+ }
+
// accessors -------------------------------------------------------
enum : int {
@@ -5317,32 +5317,32 @@ class PROTOBUF_EXPORT MethodOptions final :
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
uninterpreted_option() const;
- // optional bool deprecated = 33 [default = false];
- bool has_deprecated() const;
+ // optional bool deprecated = 33 [default = false];
+ bool has_deprecated() const;
private:
bool _internal_has_deprecated() const;
public:
- void clear_deprecated();
- bool deprecated() const;
- void set_deprecated(bool value);
+ void clear_deprecated();
+ bool deprecated() const;
+ void set_deprecated(bool value);
private:
bool _internal_deprecated() const;
void _internal_set_deprecated(bool value);
public:
-
- // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
- bool has_idempotency_level() const;
+
+ // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
+ bool has_idempotency_level() const;
private:
bool _internal_has_idempotency_level() const;
public:
- void clear_idempotency_level();
+ void clear_idempotency_level();
PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel idempotency_level() const;
void set_idempotency_level(PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel value);
private:
PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel _internal_idempotency_level() const;
void _internal_set_idempotency_level(PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel value);
public:
-
+
GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(MethodOptions)
// @@protoc_insertion_point(class_scope:google.protobuf.MethodOptions)
private:
@@ -5357,7 +5357,7 @@ class PROTOBUF_EXPORT MethodOptions final :
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
bool deprecated_;
- int idempotency_level_;
+ int idempotency_level_;
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -5379,15 +5379,15 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final :
CopyFrom(from);
return *this;
}
- inline UninterpretedOption_NamePart& operator=(UninterpretedOption_NamePart&& from) noexcept {
+ inline UninterpretedOption_NamePart& operator=(UninterpretedOption_NamePart&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -5408,16 +5408,16 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final :
static const UninterpretedOption_NamePart& default_instance() {
return *internal_default_instance();
}
- static inline const UninterpretedOption_NamePart* internal_default_instance() {
- return reinterpret_cast<const UninterpretedOption_NamePart*>(
- &_UninterpretedOption_NamePart_default_instance_);
- }
+ static inline const UninterpretedOption_NamePart* internal_default_instance() {
+ return reinterpret_cast<const UninterpretedOption_NamePart*>(
+ &_UninterpretedOption_NamePart_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
21;
-
- friend void swap(UninterpretedOption_NamePart& a, UninterpretedOption_NamePart& b) {
- a.Swap(&b);
- }
+
+ friend void swap(UninterpretedOption_NamePart& a, UninterpretedOption_NamePart& b) {
+ a.Swap(&b);
+ }
inline void Swap(UninterpretedOption_NamePart* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -5522,8 +5522,8 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final :
private:
class _Internal;
- // helper for ByteSizeLong()
- size_t RequiredFieldsByteSizeFallback() const;
+ // helper for ByteSizeLong()
+ size_t RequiredFieldsByteSizeFallback() const;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
@@ -5553,15 +5553,15 @@ class PROTOBUF_EXPORT UninterpretedOption final :
CopyFrom(from);
return *this;
}
- inline UninterpretedOption& operator=(UninterpretedOption&& from) noexcept {
+ inline UninterpretedOption& operator=(UninterpretedOption&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -5582,16 +5582,16 @@ class PROTOBUF_EXPORT UninterpretedOption final :
static const UninterpretedOption& default_instance() {
return *internal_default_instance();
}
- static inline const UninterpretedOption* internal_default_instance() {
- return reinterpret_cast<const UninterpretedOption*>(
- &_UninterpretedOption_default_instance_);
- }
+ static inline const UninterpretedOption* internal_default_instance() {
+ return reinterpret_cast<const UninterpretedOption*>(
+ &_UninterpretedOption_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
22;
-
- friend void swap(UninterpretedOption& a, UninterpretedOption& b) {
- a.Swap(&b);
- }
+
+ friend void swap(UninterpretedOption& a, UninterpretedOption& b) {
+ a.Swap(&b);
+ }
inline void Swap(UninterpretedOption* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -5740,45 +5740,45 @@ class PROTOBUF_EXPORT UninterpretedOption final :
TProtoStringType* _internal_mutable_aggregate_value();
public:
- // optional uint64 positive_int_value = 4;
- bool has_positive_int_value() const;
+ // optional uint64 positive_int_value = 4;
+ bool has_positive_int_value() const;
private:
bool _internal_has_positive_int_value() const;
public:
- void clear_positive_int_value();
+ void clear_positive_int_value();
::PROTOBUF_NAMESPACE_ID::uint64 positive_int_value() const;
void set_positive_int_value(::PROTOBUF_NAMESPACE_ID::uint64 value);
private:
::PROTOBUF_NAMESPACE_ID::uint64 _internal_positive_int_value() const;
void _internal_set_positive_int_value(::PROTOBUF_NAMESPACE_ID::uint64 value);
public:
-
- // optional int64 negative_int_value = 5;
- bool has_negative_int_value() const;
+
+ // optional int64 negative_int_value = 5;
+ bool has_negative_int_value() const;
private:
bool _internal_has_negative_int_value() const;
public:
- void clear_negative_int_value();
+ void clear_negative_int_value();
::PROTOBUF_NAMESPACE_ID::int64 negative_int_value() const;
void set_negative_int_value(::PROTOBUF_NAMESPACE_ID::int64 value);
private:
::PROTOBUF_NAMESPACE_ID::int64 _internal_negative_int_value() const;
void _internal_set_negative_int_value(::PROTOBUF_NAMESPACE_ID::int64 value);
public:
-
- // optional double double_value = 6;
- bool has_double_value() const;
+
+ // optional double double_value = 6;
+ bool has_double_value() const;
private:
bool _internal_has_double_value() const;
public:
- void clear_double_value();
- double double_value() const;
- void set_double_value(double value);
+ void clear_double_value();
+ double double_value() const;
+ void set_double_value(double value);
private:
double _internal_double_value() const;
void _internal_set_double_value(double value);
public:
-
+
// @@protoc_insertion_point(class_scope:google.protobuf.UninterpretedOption)
private:
class _Internal;
@@ -5816,15 +5816,15 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final :
CopyFrom(from);
return *this;
}
- inline SourceCodeInfo_Location& operator=(SourceCodeInfo_Location&& from) noexcept {
+ inline SourceCodeInfo_Location& operator=(SourceCodeInfo_Location&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -5845,16 +5845,16 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final :
static const SourceCodeInfo_Location& default_instance() {
return *internal_default_instance();
}
- static inline const SourceCodeInfo_Location* internal_default_instance() {
- return reinterpret_cast<const SourceCodeInfo_Location*>(
- &_SourceCodeInfo_Location_default_instance_);
- }
+ static inline const SourceCodeInfo_Location* internal_default_instance() {
+ return reinterpret_cast<const SourceCodeInfo_Location*>(
+ &_SourceCodeInfo_Location_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
23;
-
- friend void swap(SourceCodeInfo_Location& a, SourceCodeInfo_Location& b) {
- a.Swap(&b);
- }
+
+ friend void swap(SourceCodeInfo_Location& a, SourceCodeInfo_Location& b) {
+ a.Swap(&b);
+ }
inline void Swap(SourceCodeInfo_Location* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -5971,30 +5971,30 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final :
::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
mutable_span();
- // repeated string leading_detached_comments = 6;
- int leading_detached_comments_size() const;
+ // repeated string leading_detached_comments = 6;
+ int leading_detached_comments_size() const;
private:
int _internal_leading_detached_comments_size() const;
public:
- void clear_leading_detached_comments();
- const TProtoStringType& leading_detached_comments(int index) const;
- TProtoStringType* mutable_leading_detached_comments(int index);
- void set_leading_detached_comments(int index, const TProtoStringType& value);
- void set_leading_detached_comments(int index, TProtoStringType&& value);
- void set_leading_detached_comments(int index, const char* value);
- void set_leading_detached_comments(int index, const char* value, size_t size);
- TProtoStringType* add_leading_detached_comments();
- void add_leading_detached_comments(const TProtoStringType& value);
- void add_leading_detached_comments(TProtoStringType&& value);
- void add_leading_detached_comments(const char* value);
- void add_leading_detached_comments(const char* value, size_t size);
+ void clear_leading_detached_comments();
+ const TProtoStringType& leading_detached_comments(int index) const;
+ TProtoStringType* mutable_leading_detached_comments(int index);
+ void set_leading_detached_comments(int index, const TProtoStringType& value);
+ void set_leading_detached_comments(int index, TProtoStringType&& value);
+ void set_leading_detached_comments(int index, const char* value);
+ void set_leading_detached_comments(int index, const char* value, size_t size);
+ TProtoStringType* add_leading_detached_comments();
+ void add_leading_detached_comments(const TProtoStringType& value);
+ void add_leading_detached_comments(TProtoStringType&& value);
+ void add_leading_detached_comments(const char* value);
+ void add_leading_detached_comments(const char* value, size_t size);
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>& leading_detached_comments() const;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>* mutable_leading_detached_comments();
private:
const TProtoStringType& _internal_leading_detached_comments(int index) const;
TProtoStringType* _internal_add_leading_detached_comments();
public:
-
+
// optional string leading_comments = 3;
bool has_leading_comments() const;
private:
@@ -6068,15 +6068,15 @@ class PROTOBUF_EXPORT SourceCodeInfo final :
CopyFrom(from);
return *this;
}
- inline SourceCodeInfo& operator=(SourceCodeInfo&& from) noexcept {
+ inline SourceCodeInfo& operator=(SourceCodeInfo&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -6097,16 +6097,16 @@ class PROTOBUF_EXPORT SourceCodeInfo final :
static const SourceCodeInfo& default_instance() {
return *internal_default_instance();
}
- static inline const SourceCodeInfo* internal_default_instance() {
- return reinterpret_cast<const SourceCodeInfo*>(
- &_SourceCodeInfo_default_instance_);
- }
+ static inline const SourceCodeInfo* internal_default_instance() {
+ return reinterpret_cast<const SourceCodeInfo*>(
+ &_SourceCodeInfo_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
24;
-
- friend void swap(SourceCodeInfo& a, SourceCodeInfo& b) {
- a.Swap(&b);
- }
+
+ friend void swap(SourceCodeInfo& a, SourceCodeInfo& b) {
+ a.Swap(&b);
+ }
inline void Swap(SourceCodeInfo* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -6225,15 +6225,15 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final :
CopyFrom(from);
return *this;
}
- inline GeneratedCodeInfo_Annotation& operator=(GeneratedCodeInfo_Annotation&& from) noexcept {
+ inline GeneratedCodeInfo_Annotation& operator=(GeneratedCodeInfo_Annotation&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -6254,16 +6254,16 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final :
static const GeneratedCodeInfo_Annotation& default_instance() {
return *internal_default_instance();
}
- static inline const GeneratedCodeInfo_Annotation* internal_default_instance() {
- return reinterpret_cast<const GeneratedCodeInfo_Annotation*>(
- &_GeneratedCodeInfo_Annotation_default_instance_);
- }
+ static inline const GeneratedCodeInfo_Annotation* internal_default_instance() {
+ return reinterpret_cast<const GeneratedCodeInfo_Annotation*>(
+ &_GeneratedCodeInfo_Annotation_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
25;
-
- friend void swap(GeneratedCodeInfo_Annotation& a, GeneratedCodeInfo_Annotation& b) {
- a.Swap(&b);
- }
+
+ friend void swap(GeneratedCodeInfo_Annotation& a, GeneratedCodeInfo_Annotation& b) {
+ a.Swap(&b);
+ }
inline void Swap(GeneratedCodeInfo_Annotation* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -6436,15 +6436,15 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final :
CopyFrom(from);
return *this;
}
- inline GeneratedCodeInfo& operator=(GeneratedCodeInfo&& from) noexcept {
+ inline GeneratedCodeInfo& operator=(GeneratedCodeInfo&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
@@ -6465,16 +6465,16 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final :
static const GeneratedCodeInfo& default_instance() {
return *internal_default_instance();
}
- static inline const GeneratedCodeInfo* internal_default_instance() {
- return reinterpret_cast<const GeneratedCodeInfo*>(
- &_GeneratedCodeInfo_default_instance_);
- }
+ static inline const GeneratedCodeInfo* internal_default_instance() {
+ return reinterpret_cast<const GeneratedCodeInfo*>(
+ &_GeneratedCodeInfo_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
26;
-
- friend void swap(GeneratedCodeInfo& a, GeneratedCodeInfo& b) {
- a.Swap(&b);
- }
+
+ friend void swap(GeneratedCodeInfo& a, GeneratedCodeInfo& b) {
+ a.Swap(&b);
+ }
inline void Swap(GeneratedCodeInfo* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -6579,10 +6579,10 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final :
// ===================================================================
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
// FileDescriptorSet
// repeated .google.protobuf.FileDescriptorProto file = 1;
@@ -6775,10 +6775,10 @@ inline void FileDescriptorProto::set_dependency(int index, const TProtoStringTyp
dependency_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency)
}
-inline void FileDescriptorProto::set_dependency(int index, TProtoStringType&& value) {
+inline void FileDescriptorProto::set_dependency(int index, TProtoStringType&& value) {
dependency_.Mutable(index)->assign(std::move(value));
- // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency)
-}
+ // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency)
+}
inline void FileDescriptorProto::set_dependency(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
dependency_.Mutable(index)->assign(value);
@@ -6796,10 +6796,10 @@ inline void FileDescriptorProto::add_dependency(const TProtoStringType& value) {
dependency_.Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency)
}
-inline void FileDescriptorProto::add_dependency(TProtoStringType&& value) {
- dependency_.Add(std::move(value));
- // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency)
-}
+inline void FileDescriptorProto::add_dependency(TProtoStringType&& value) {
+ dependency_.Add(std::move(value));
+ // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency)
+}
inline void FileDescriptorProto::add_dependency(const char* value) {
GOOGLE_DCHECK(value != nullptr);
dependency_.Add()->assign(value);
@@ -7085,7 +7085,7 @@ inline bool FileDescriptorProto::has_options() const {
}
inline void FileDescriptorProto::clear_options() {
if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000008u;
+ _has_bits_[0] &= ~0x00000008u;
}
inline const PROTOBUF_NAMESPACE_ID::FileOptions& FileDescriptorProto::_internal_options() const {
const PROTOBUF_NAMESPACE_ID::FileOptions* p = options_;
@@ -7175,7 +7175,7 @@ inline bool FileDescriptorProto::has_source_code_info() const {
}
inline void FileDescriptorProto::clear_source_code_info() {
if (source_code_info_ != nullptr) source_code_info_->Clear();
- _has_bits_[0] &= ~0x00000010u;
+ _has_bits_[0] &= ~0x00000010u;
}
inline const PROTOBUF_NAMESPACE_ID::SourceCodeInfo& FileDescriptorProto::_internal_source_code_info() const {
const PROTOBUF_NAMESPACE_ID::SourceCodeInfo* p = source_code_info_;
@@ -7264,7 +7264,7 @@ inline bool FileDescriptorProto::has_syntax() const {
}
inline void FileDescriptorProto::clear_syntax() {
syntax_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000004u;
+ _has_bits_[0] &= ~0x00000004u;
}
inline const TProtoStringType& FileDescriptorProto::syntax() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.syntax)
@@ -7372,33 +7372,33 @@ inline void DescriptorProto_ExtensionRange::set_end(::PROTOBUF_NAMESPACE_ID::int
// @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.end)
}
-// optional .google.protobuf.ExtensionRangeOptions options = 3;
+// optional .google.protobuf.ExtensionRangeOptions options = 3;
inline bool DescriptorProto_ExtensionRange::_internal_has_options() const {
bool value = (_has_bits_[0] & 0x00000001u) != 0;
PROTOBUF_ASSUME(!value || options_ != nullptr);
return value;
}
-inline bool DescriptorProto_ExtensionRange::has_options() const {
+inline bool DescriptorProto_ExtensionRange::has_options() const {
return _internal_has_options();
-}
+}
inline void DescriptorProto_ExtensionRange::clear_options() {
if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000001u;
-}
+ _has_bits_[0] &= ~0x00000001u;
+}
inline const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& DescriptorProto_ExtensionRange::_internal_options() const {
const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* p = options_;
return p != nullptr ? *p : reinterpret_cast<const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions&>(
PROTOBUF_NAMESPACE_ID::_ExtensionRangeOptions_default_instance_);
-}
+}
inline const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& DescriptorProto_ExtensionRange::options() const {
- // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.options)
+ // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.options)
return _internal_options();
-}
+}
inline void DescriptorProto_ExtensionRange::unsafe_arena_set_allocated_options(
PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options) {
if (GetArenaForAllocation() == nullptr) {
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_);
- }
+ }
options_ = options;
if (options) {
_has_bits_[0] |= 0x00000001u;
@@ -7406,7 +7406,7 @@ inline void DescriptorProto_ExtensionRange::unsafe_arena_set_allocated_options(
_has_bits_[0] &= ~0x00000001u;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.DescriptorProto.ExtensionRange.options)
-}
+}
inline PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRange::release_options() {
_has_bits_[0] &= ~0x00000001u;
PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* temp = options_;
@@ -7423,12 +7423,12 @@ inline PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRa
return temp;
}
inline PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRange::unsafe_arena_release_options() {
- // @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.ExtensionRange.options)
+ // @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.ExtensionRange.options)
_has_bits_[0] &= ~0x00000001u;
PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* temp = options_;
options_ = nullptr;
- return temp;
-}
+ return temp;
+}
inline PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRange::_internal_mutable_options() {
_has_bits_[0] |= 0x00000001u;
if (options_ == nullptr) {
@@ -7447,7 +7447,7 @@ inline void DescriptorProto_ExtensionRange::set_allocated_options(PROTOBUF_NAMES
if (message_arena == nullptr) {
delete options_;
}
- if (options) {
+ if (options) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions>::GetOwningArena(options);
if (message_arena != submessage_arena) {
@@ -7455,13 +7455,13 @@ inline void DescriptorProto_ExtensionRange::set_allocated_options(PROTOBUF_NAMES
message_arena, options, submessage_arena);
}
_has_bits_[0] |= 0x00000001u;
- } else {
+ } else {
_has_bits_[0] &= ~0x00000001u;
- }
+ }
options_ = options;
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.ExtensionRange.options)
-}
-
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.ExtensionRange.options)
+}
+
// -------------------------------------------------------------------
// DescriptorProto_ReservedRange
@@ -7835,7 +7835,7 @@ inline bool DescriptorProto::has_options() const {
}
inline void DescriptorProto::clear_options() {
if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000002u;
+ _has_bits_[0] &= ~0x00000002u;
}
inline const PROTOBUF_NAMESPACE_ID::MessageOptions& DescriptorProto::_internal_options() const {
const PROTOBUF_NAMESPACE_ID::MessageOptions* p = options_;
@@ -7984,10 +7984,10 @@ inline void DescriptorProto::set_reserved_name(int index, const TProtoStringType
reserved_name_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name)
}
-inline void DescriptorProto::set_reserved_name(int index, TProtoStringType&& value) {
+inline void DescriptorProto::set_reserved_name(int index, TProtoStringType&& value) {
reserved_name_.Mutable(index)->assign(std::move(value));
- // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name)
-}
+ // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name)
+}
inline void DescriptorProto::set_reserved_name(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
reserved_name_.Mutable(index)->assign(value);
@@ -8005,10 +8005,10 @@ inline void DescriptorProto::add_reserved_name(const TProtoStringType& value) {
reserved_name_.Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name)
}
-inline void DescriptorProto::add_reserved_name(TProtoStringType&& value) {
- reserved_name_.Add(std::move(value));
- // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name)
-}
+inline void DescriptorProto::add_reserved_name(TProtoStringType&& value) {
+ reserved_name_.Add(std::move(value));
+ // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name)
+}
inline void DescriptorProto::add_reserved_name(const char* value) {
GOOGLE_DCHECK(value != nullptr);
reserved_name_.Add()->assign(value);
@@ -8031,27 +8031,27 @@ DescriptorProto::mutable_reserved_name() {
// -------------------------------------------------------------------
-// ExtensionRangeOptions
-
-// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+// ExtensionRangeOptions
+
+// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int ExtensionRangeOptions::_internal_uninterpreted_option_size() const {
- return uninterpreted_option_.size();
-}
+ return uninterpreted_option_.size();
+}
inline int ExtensionRangeOptions::uninterpreted_option_size() const {
return _internal_uninterpreted_option_size();
}
-inline void ExtensionRangeOptions::clear_uninterpreted_option() {
- uninterpreted_option_.Clear();
-}
+inline void ExtensionRangeOptions::clear_uninterpreted_option() {
+ uninterpreted_option_.Clear();
+}
inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* ExtensionRangeOptions::mutable_uninterpreted_option(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.ExtensionRangeOptions.uninterpreted_option)
- return uninterpreted_option_.Mutable(index);
-}
+ // @@protoc_insertion_point(field_mutable:google.protobuf.ExtensionRangeOptions.uninterpreted_option)
+ return uninterpreted_option_.Mutable(index);
+}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
-ExtensionRangeOptions::mutable_uninterpreted_option() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.ExtensionRangeOptions.uninterpreted_option)
- return &uninterpreted_option_;
-}
+ExtensionRangeOptions::mutable_uninterpreted_option() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.ExtensionRangeOptions.uninterpreted_option)
+ return &uninterpreted_option_;
+}
inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& ExtensionRangeOptions::_internal_uninterpreted_option(int index) const {
return uninterpreted_option_.Get(index);
}
@@ -8068,13 +8068,13 @@ inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* ExtensionRangeOptions::add_un
return _add;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
-ExtensionRangeOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.ExtensionRangeOptions.uninterpreted_option)
- return uninterpreted_option_;
-}
-
-// -------------------------------------------------------------------
-
+ExtensionRangeOptions::uninterpreted_option() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.ExtensionRangeOptions.uninterpreted_option)
+ return uninterpreted_option_;
+}
+
+// -------------------------------------------------------------------
+
// FieldDescriptorProto
// optional string name = 1;
@@ -8231,7 +8231,7 @@ inline bool FieldDescriptorProto::has_type_name() const {
}
inline void FieldDescriptorProto::clear_type_name() {
type_name_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000004u;
+ _has_bits_[0] &= ~0x00000004u;
}
inline const TProtoStringType& FieldDescriptorProto::type_name() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type_name)
@@ -8289,7 +8289,7 @@ inline bool FieldDescriptorProto::has_extendee() const {
}
inline void FieldDescriptorProto::clear_extendee() {
extendee_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000002u;
+ _has_bits_[0] &= ~0x00000002u;
}
inline const TProtoStringType& FieldDescriptorProto::extendee() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.extendee)
@@ -8347,7 +8347,7 @@ inline bool FieldDescriptorProto::has_default_value() const {
}
inline void FieldDescriptorProto::clear_default_value() {
default_value_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000008u;
+ _has_bits_[0] &= ~0x00000008u;
}
inline const TProtoStringType& FieldDescriptorProto::default_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.default_value)
@@ -8433,7 +8433,7 @@ inline bool FieldDescriptorProto::has_json_name() const {
}
inline void FieldDescriptorProto::clear_json_name() {
json_name_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000010u;
+ _has_bits_[0] &= ~0x00000010u;
}
inline const TProtoStringType& FieldDescriptorProto::json_name() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.json_name)
@@ -8492,7 +8492,7 @@ inline bool FieldDescriptorProto::has_options() const {
}
inline void FieldDescriptorProto::clear_options() {
if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000020u;
+ _has_bits_[0] &= ~0x00000020u;
}
inline const PROTOBUF_NAMESPACE_ID::FieldOptions& FieldDescriptorProto::_internal_options() const {
const PROTOBUF_NAMESPACE_ID::FieldOptions* p = options_;
@@ -8924,7 +8924,7 @@ inline bool EnumDescriptorProto::has_options() const {
}
inline void EnumDescriptorProto::clear_options() {
if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000002u;
+ _has_bits_[0] &= ~0x00000002u;
}
inline const PROTOBUF_NAMESPACE_ID::EnumOptions& EnumDescriptorProto::_internal_options() const {
const PROTOBUF_NAMESPACE_ID::EnumOptions* p = options_;
@@ -9219,7 +9219,7 @@ inline bool EnumValueDescriptorProto::has_options() const {
}
inline void EnumValueDescriptorProto::clear_options() {
if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000002u;
+ _has_bits_[0] &= ~0x00000002u;
}
inline const PROTOBUF_NAMESPACE_ID::EnumValueOptions& EnumValueDescriptorProto::_internal_options() const {
const PROTOBUF_NAMESPACE_ID::EnumValueOptions* p = options_;
@@ -9411,7 +9411,7 @@ inline bool ServiceDescriptorProto::has_options() const {
}
inline void ServiceDescriptorProto::clear_options() {
if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000002u;
+ _has_bits_[0] &= ~0x00000002u;
}
inline const PROTOBUF_NAMESPACE_ID::ServiceOptions& ServiceDescriptorProto::_internal_options() const {
const PROTOBUF_NAMESPACE_ID::ServiceOptions* p = options_;
@@ -9962,7 +9962,7 @@ inline void FileOptions::set_java_multiple_files(bool value) {
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_multiple_files)
}
-// optional bool java_generate_equals_and_hash = 20 [deprecated = true];
+// optional bool java_generate_equals_and_hash = 20 [deprecated = true];
inline bool FileOptions::_internal_has_java_generate_equals_and_hash() const {
bool value = (_has_bits_[0] & 0x00000800u) != 0;
return value;
@@ -10057,7 +10057,7 @@ inline bool FileOptions::has_go_package() const {
}
inline void FileOptions::clear_go_package() {
go_package_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000004u;
+ _has_bits_[0] &= ~0x00000004u;
}
inline const TProtoStringType& FileOptions::go_package() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.go_package)
@@ -10189,34 +10189,34 @@ inline void FileOptions::set_py_generic_services(bool value) {
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.py_generic_services)
}
-// optional bool php_generic_services = 42 [default = false];
+// optional bool php_generic_services = 42 [default = false];
inline bool FileOptions::_internal_has_php_generic_services() const {
bool value = (_has_bits_[0] & 0x00010000u) != 0;
return value;
}
-inline bool FileOptions::has_php_generic_services() const {
+inline bool FileOptions::has_php_generic_services() const {
return _internal_has_php_generic_services();
-}
-inline void FileOptions::clear_php_generic_services() {
- php_generic_services_ = false;
+}
+inline void FileOptions::clear_php_generic_services() {
+ php_generic_services_ = false;
_has_bits_[0] &= ~0x00010000u;
-}
+}
inline bool FileOptions::_internal_php_generic_services() const {
return php_generic_services_;
}
-inline bool FileOptions::php_generic_services() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_generic_services)
+inline bool FileOptions::php_generic_services() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_generic_services)
return _internal_php_generic_services();
-}
+}
inline void FileOptions::_internal_set_php_generic_services(bool value) {
_has_bits_[0] |= 0x00010000u;
php_generic_services_ = value;
}
-inline void FileOptions::set_php_generic_services(bool value) {
+inline void FileOptions::set_php_generic_services(bool value) {
_internal_set_php_generic_services(value);
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_generic_services)
-}
-
+ // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_generic_services)
+}
+
// optional bool deprecated = 23 [default = false];
inline bool FileOptions::_internal_has_deprecated() const {
bool value = (_has_bits_[0] & 0x00020000u) != 0;
@@ -10283,7 +10283,7 @@ inline bool FileOptions::has_objc_class_prefix() const {
}
inline void FileOptions::clear_objc_class_prefix() {
objc_class_prefix_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000008u;
+ _has_bits_[0] &= ~0x00000008u;
}
inline const TProtoStringType& FileOptions::objc_class_prefix() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.objc_class_prefix)
@@ -10341,7 +10341,7 @@ inline bool FileOptions::has_csharp_namespace() const {
}
inline void FileOptions::clear_csharp_namespace() {
csharp_namespace_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000010u;
+ _has_bits_[0] &= ~0x00000010u;
}
inline const TProtoStringType& FileOptions::csharp_namespace() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.csharp_namespace)
@@ -10389,29 +10389,29 @@ inline void FileOptions::set_allocated_csharp_namespace(TProtoStringType* csharp
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.csharp_namespace)
}
-// optional string swift_prefix = 39;
+// optional string swift_prefix = 39;
inline bool FileOptions::_internal_has_swift_prefix() const {
bool value = (_has_bits_[0] & 0x00000020u) != 0;
return value;
}
-inline bool FileOptions::has_swift_prefix() const {
+inline bool FileOptions::has_swift_prefix() const {
return _internal_has_swift_prefix();
-}
+}
inline void FileOptions::clear_swift_prefix() {
swift_prefix_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000020u;
-}
-inline const TProtoStringType& FileOptions::swift_prefix() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.swift_prefix)
+ _has_bits_[0] &= ~0x00000020u;
+}
+inline const TProtoStringType& FileOptions::swift_prefix() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.swift_prefix)
return _internal_swift_prefix();
-}
+}
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileOptions::set_swift_prefix(ArgT0&& arg0, ArgT... args) {
_has_bits_[0] |= 0x00000020u;
swift_prefix_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.swift_prefix)
-}
+ // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.swift_prefix)
+}
inline TProtoStringType* FileOptions::mutable_swift_prefix() {
TProtoStringType* _s = _internal_mutable_swift_prefix();
// @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.swift_prefix)
@@ -10427,49 +10427,49 @@ inline void FileOptions::_internal_set_swift_prefix(const TProtoStringType& valu
inline TProtoStringType* FileOptions::_internal_mutable_swift_prefix() {
_has_bits_[0] |= 0x00000020u;
return swift_prefix_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
-}
-inline TProtoStringType* FileOptions::release_swift_prefix() {
- // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.swift_prefix)
+}
+inline TProtoStringType* FileOptions::release_swift_prefix() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.swift_prefix)
if (!_internal_has_swift_prefix()) {
return nullptr;
}
_has_bits_[0] &= ~0x00000020u;
return swift_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
-}
-inline void FileOptions::set_allocated_swift_prefix(TProtoStringType* swift_prefix) {
+}
+inline void FileOptions::set_allocated_swift_prefix(TProtoStringType* swift_prefix) {
if (swift_prefix != nullptr) {
_has_bits_[0] |= 0x00000020u;
- } else {
+ } else {
_has_bits_[0] &= ~0x00000020u;
- }
+ }
swift_prefix_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), swift_prefix,
GetArenaForAllocation());
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.swift_prefix)
-}
-
-// optional string php_class_prefix = 40;
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.swift_prefix)
+}
+
+// optional string php_class_prefix = 40;
inline bool FileOptions::_internal_has_php_class_prefix() const {
bool value = (_has_bits_[0] & 0x00000040u) != 0;
return value;
}
-inline bool FileOptions::has_php_class_prefix() const {
+inline bool FileOptions::has_php_class_prefix() const {
return _internal_has_php_class_prefix();
-}
+}
inline void FileOptions::clear_php_class_prefix() {
php_class_prefix_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000040u;
-}
-inline const TProtoStringType& FileOptions::php_class_prefix() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_class_prefix)
+ _has_bits_[0] &= ~0x00000040u;
+}
+inline const TProtoStringType& FileOptions::php_class_prefix() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_class_prefix)
return _internal_php_class_prefix();
-}
+}
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileOptions::set_php_class_prefix(ArgT0&& arg0, ArgT... args) {
_has_bits_[0] |= 0x00000040u;
php_class_prefix_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_class_prefix)
-}
+ // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_class_prefix)
+}
inline TProtoStringType* FileOptions::mutable_php_class_prefix() {
TProtoStringType* _s = _internal_mutable_php_class_prefix();
// @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.php_class_prefix)
@@ -10485,49 +10485,49 @@ inline void FileOptions::_internal_set_php_class_prefix(const TProtoStringType&
inline TProtoStringType* FileOptions::_internal_mutable_php_class_prefix() {
_has_bits_[0] |= 0x00000040u;
return php_class_prefix_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
-}
-inline TProtoStringType* FileOptions::release_php_class_prefix() {
- // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.php_class_prefix)
+}
+inline TProtoStringType* FileOptions::release_php_class_prefix() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.php_class_prefix)
if (!_internal_has_php_class_prefix()) {
return nullptr;
}
_has_bits_[0] &= ~0x00000040u;
return php_class_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
-}
-inline void FileOptions::set_allocated_php_class_prefix(TProtoStringType* php_class_prefix) {
+}
+inline void FileOptions::set_allocated_php_class_prefix(TProtoStringType* php_class_prefix) {
if (php_class_prefix != nullptr) {
_has_bits_[0] |= 0x00000040u;
- } else {
+ } else {
_has_bits_[0] &= ~0x00000040u;
- }
+ }
php_class_prefix_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), php_class_prefix,
GetArenaForAllocation());
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_class_prefix)
-}
-
-// optional string php_namespace = 41;
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_class_prefix)
+}
+
+// optional string php_namespace = 41;
inline bool FileOptions::_internal_has_php_namespace() const {
bool value = (_has_bits_[0] & 0x00000080u) != 0;
return value;
}
-inline bool FileOptions::has_php_namespace() const {
+inline bool FileOptions::has_php_namespace() const {
return _internal_has_php_namespace();
-}
+}
inline void FileOptions::clear_php_namespace() {
php_namespace_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000080u;
-}
-inline const TProtoStringType& FileOptions::php_namespace() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_namespace)
+ _has_bits_[0] &= ~0x00000080u;
+}
+inline const TProtoStringType& FileOptions::php_namespace() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_namespace)
return _internal_php_namespace();
-}
+}
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileOptions::set_php_namespace(ArgT0&& arg0, ArgT... args) {
_has_bits_[0] |= 0x00000080u;
php_namespace_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_namespace)
-}
+ // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_namespace)
+}
inline TProtoStringType* FileOptions::mutable_php_namespace() {
TProtoStringType* _s = _internal_mutable_php_namespace();
// @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.php_namespace)
@@ -10543,26 +10543,26 @@ inline void FileOptions::_internal_set_php_namespace(const TProtoStringType& val
inline TProtoStringType* FileOptions::_internal_mutable_php_namespace() {
_has_bits_[0] |= 0x00000080u;
return php_namespace_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
-}
-inline TProtoStringType* FileOptions::release_php_namespace() {
- // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.php_namespace)
+}
+inline TProtoStringType* FileOptions::release_php_namespace() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.php_namespace)
if (!_internal_has_php_namespace()) {
return nullptr;
}
_has_bits_[0] &= ~0x00000080u;
return php_namespace_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
-}
-inline void FileOptions::set_allocated_php_namespace(TProtoStringType* php_namespace) {
+}
+inline void FileOptions::set_allocated_php_namespace(TProtoStringType* php_namespace) {
if (php_namespace != nullptr) {
_has_bits_[0] |= 0x00000080u;
- } else {
+ } else {
_has_bits_[0] &= ~0x00000080u;
- }
+ }
php_namespace_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), php_namespace,
GetArenaForAllocation());
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_namespace)
-}
-
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_namespace)
+}
+
// optional string php_metadata_namespace = 44;
inline bool FileOptions::_internal_has_php_metadata_namespace() const {
bool value = (_has_bits_[0] & 0x00000100u) != 0;
@@ -11409,35 +11409,35 @@ inline void MethodOptions::set_deprecated(bool value) {
// @@protoc_insertion_point(field_set:google.protobuf.MethodOptions.deprecated)
}
-// optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
+// optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
inline bool MethodOptions::_internal_has_idempotency_level() const {
bool value = (_has_bits_[0] & 0x00000002u) != 0;
return value;
}
-inline bool MethodOptions::has_idempotency_level() const {
+inline bool MethodOptions::has_idempotency_level() const {
return _internal_has_idempotency_level();
-}
-inline void MethodOptions::clear_idempotency_level() {
- idempotency_level_ = 0;
+}
+inline void MethodOptions::clear_idempotency_level() {
+ idempotency_level_ = 0;
_has_bits_[0] &= ~0x00000002u;
-}
+}
inline PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel MethodOptions::_internal_idempotency_level() const {
return static_cast< PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel >(idempotency_level_);
}
inline PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel MethodOptions::idempotency_level() const {
- // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.idempotency_level)
+ // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.idempotency_level)
return _internal_idempotency_level();
-}
+}
inline void MethodOptions::_internal_set_idempotency_level(PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel value) {
assert(PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel_IsValid(value));
_has_bits_[0] |= 0x00000002u;
- idempotency_level_ = value;
+ idempotency_level_ = value;
}
inline void MethodOptions::set_idempotency_level(PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel value) {
_internal_set_idempotency_level(value);
- // @@protoc_insertion_point(field_set:google.protobuf.MethodOptions.idempotency_level)
-}
-
+ // @@protoc_insertion_point(field_set:google.protobuf.MethodOptions.idempotency_level)
+}
+
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int MethodOptions::_internal_uninterpreted_option_size() const {
return uninterpreted_option_.size();
@@ -11622,7 +11622,7 @@ inline bool UninterpretedOption::has_identifier_value() const {
}
inline void UninterpretedOption::clear_identifier_value() {
identifier_value_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& UninterpretedOption::identifier_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.identifier_value)
@@ -11680,7 +11680,7 @@ inline bool UninterpretedOption::has_positive_int_value() const {
}
inline void UninterpretedOption::clear_positive_int_value() {
positive_int_value_ = uint64_t{0u};
- _has_bits_[0] &= ~0x00000008u;
+ _has_bits_[0] &= ~0x00000008u;
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 UninterpretedOption::_internal_positive_int_value() const {
return positive_int_value_;
@@ -11708,7 +11708,7 @@ inline bool UninterpretedOption::has_negative_int_value() const {
}
inline void UninterpretedOption::clear_negative_int_value() {
negative_int_value_ = int64_t{0};
- _has_bits_[0] &= ~0x00000010u;
+ _has_bits_[0] &= ~0x00000010u;
}
inline ::PROTOBUF_NAMESPACE_ID::int64 UninterpretedOption::_internal_negative_int_value() const {
return negative_int_value_;
@@ -11764,7 +11764,7 @@ inline bool UninterpretedOption::has_string_value() const {
}
inline void UninterpretedOption::clear_string_value() {
string_value_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000002u;
+ _has_bits_[0] &= ~0x00000002u;
}
inline const TProtoStringType& UninterpretedOption::string_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.string_value)
@@ -11822,7 +11822,7 @@ inline bool UninterpretedOption::has_aggregate_value() const {
}
inline void UninterpretedOption::clear_aggregate_value() {
aggregate_value_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000004u;
+ _has_bits_[0] &= ~0x00000004u;
}
inline const TProtoStringType& UninterpretedOption::aggregate_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.aggregate_value)
@@ -11978,7 +11978,7 @@ inline bool SourceCodeInfo_Location::has_leading_comments() const {
}
inline void SourceCodeInfo_Location::clear_leading_comments() {
leading_comments_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& SourceCodeInfo_Location::leading_comments() const {
// @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_comments)
@@ -12036,7 +12036,7 @@ inline bool SourceCodeInfo_Location::has_trailing_comments() const {
}
inline void SourceCodeInfo_Location::clear_trailing_comments() {
trailing_comments_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000002u;
+ _has_bits_[0] &= ~0x00000002u;
}
inline const TProtoStringType& SourceCodeInfo_Location::trailing_comments() const {
// @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.trailing_comments)
@@ -12114,10 +12114,10 @@ inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, co
leading_detached_comments_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
}
-inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, TProtoStringType&& value) {
+inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, TProtoStringType&& value) {
leading_detached_comments_.Mutable(index)->assign(std::move(value));
- // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
-}
+ // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
+}
inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
leading_detached_comments_.Mutable(index)->assign(value);
@@ -12135,10 +12135,10 @@ inline void SourceCodeInfo_Location::add_leading_detached_comments(const TProtoS
leading_detached_comments_.Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
}
-inline void SourceCodeInfo_Location::add_leading_detached_comments(TProtoStringType&& value) {
- leading_detached_comments_.Add(std::move(value));
- // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
-}
+inline void SourceCodeInfo_Location::add_leading_detached_comments(TProtoStringType&& value) {
+ leading_detached_comments_.Add(std::move(value));
+ // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
+}
inline void SourceCodeInfo_Location::add_leading_detached_comments(const char* value) {
GOOGLE_DCHECK(value != nullptr);
leading_detached_comments_.Add()->assign(value);
@@ -12264,7 +12264,7 @@ inline bool GeneratedCodeInfo_Annotation::has_source_file() const {
}
inline void GeneratedCodeInfo_Annotation::clear_source_file() {
source_file_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& GeneratedCodeInfo_Annotation::source_file() const {
// @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
@@ -12412,9 +12412,9 @@ GeneratedCodeInfo::annotation() const {
return annotation_;
}
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif // __GNUC__
// -------------------------------------------------------------------
// -------------------------------------------------------------------
@@ -12463,15 +12463,15 @@ GeneratedCodeInfo::annotation() const {
// -------------------------------------------------------------------
-// -------------------------------------------------------------------
+// -------------------------------------------------------------------
// -------------------------------------------------------------------
-
+
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_CLOSE
-
+
PROTOBUF_NAMESPACE_OPEN
template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type> : ::std::true_type {};
@@ -12500,10 +12500,10 @@ inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::FieldOpti
return PROTOBUF_NAMESPACE_ID::FieldOptions_JSType_descriptor();
}
template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel> : ::std::true_type {};
-template <>
+template <>
inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel>() {
return PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel_descriptor();
-}
+}
PROTOBUF_NAMESPACE_CLOSE
diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor.proto b/contrib/libs/protobuf/src/google/protobuf/descriptor.proto
index 06135e9686..156e410ae1 100644
--- a/contrib/libs/protobuf/src/google/protobuf/descriptor.proto
+++ b/contrib/libs/protobuf/src/google/protobuf/descriptor.proto
@@ -103,8 +103,8 @@ message DescriptorProto {
message ExtensionRange {
optional int32 start = 1; // Inclusive.
optional int32 end = 2; // Exclusive.
-
- optional ExtensionRangeOptions options = 3;
+
+ optional ExtensionRangeOptions options = 3;
}
repeated ExtensionRange extension_range = 5;
@@ -125,15 +125,15 @@ message DescriptorProto {
repeated string reserved_name = 10;
}
-message ExtensionRangeOptions {
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
+message ExtensionRangeOptions {
+ // The parser stores options it doesn't recognize here. See above.
+ repeated UninterpretedOption uninterpreted_option = 999;
+
+
+ // Clients can define custom options in extensions of this message. See above.
+ extensions 1000 to max;
+}
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
// Describes a field within a message.
message FieldDescriptorProto {
enum Type {
@@ -152,10 +152,10 @@ message FieldDescriptorProto {
TYPE_FIXED32 = 7;
TYPE_BOOL = 8;
TYPE_STRING = 9;
- // Tag-delimited aggregate.
- // Group type is deprecated and not supported in proto3. However, Proto3
- // implementations should still be able to parse the group wire format and
- // treat group fields as unknown fields.
+ // Tag-delimited aggregate.
+ // Group type is deprecated and not supported in proto3. However, Proto3
+ // implementations should still be able to parse the group wire format and
+ // treat group fields as unknown fields.
TYPE_GROUP = 10;
TYPE_MESSAGE = 11; // Length-delimited aggregate.
@@ -363,8 +363,8 @@ message FileOptions {
// top-level extensions defined in the file.
optional bool java_multiple_files = 10 [default = false];
- // This option does nothing.
- optional bool java_generate_equals_and_hash = 20 [deprecated=true];
+ // This option does nothing.
+ optional bool java_generate_equals_and_hash = 20 [deprecated=true];
// If set true, then the Java2 code generator will generate code that
// throws an exception whenever an attempt is made to assign a non-UTF-8
@@ -427,21 +427,21 @@ message FileOptions {
// Namespace for generated classes; defaults to the package.
optional string csharp_namespace = 37;
- // By default Swift generators will take the proto package and CamelCase it
- // replacing '.' with underscore and use that to prefix the types/symbols
- // defined. When this options is provided, they will use this value instead
- // to prefix the types/symbols defined.
- optional string swift_prefix = 39;
-
- // Sets the php class prefix which is prepended to all php generated classes
- // from this .proto. Default is empty.
- optional string php_class_prefix = 40;
-
- // Use this option to change the namespace of php generated classes. Default
- // is empty. When this option is empty, the package name will be used for
- // determining the namespace.
- optional string php_namespace = 41;
-
+ // By default Swift generators will take the proto package and CamelCase it
+ // replacing '.' with underscore and use that to prefix the types/symbols
+ // defined. When this options is provided, they will use this value instead
+ // to prefix the types/symbols defined.
+ optional string swift_prefix = 39;
+
+ // Sets the php class prefix which is prepended to all php generated classes
+ // from this .proto. Default is empty.
+ optional string php_class_prefix = 40;
+
+ // Use this option to change the namespace of php generated classes. Default
+ // is empty. When this option is empty, the package name will be used for
+ // determining the namespace.
+ optional string php_namespace = 41;
+
// Use this option to change the namespace of php generated metadata classes.
// Default is empty. When this option is empty, the proto file name will be
// used for determining the namespace.
@@ -521,9 +521,9 @@ message MessageOptions {
// parser.
optional bool map_entry = 7;
- reserved 8; // javalite_serializable
- reserved 9; // javanano_as_lite
-
+ reserved 8; // javalite_serializable
+ reserved 9; // javanano_as_lite
+
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
@@ -555,15 +555,15 @@ message FieldOptions {
// The jstype option determines the JavaScript type used for values of the
// field. The option is permitted only for 64 bit integral and fixed types
- // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
- // is represented as JavaScript string, which avoids loss of precision that
- // can happen when a large value is converted to a floating point JavaScript.
- // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
- // use the JavaScript "number" type. The behavior of the default option
- // JS_NORMAL is implementation dependent.
- //
- // This option is an enum to permit additional types to be added, e.g.
- // goog.math.Integer.
+ // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
+ // is represented as JavaScript string, which avoids loss of precision that
+ // can happen when a large value is converted to a floating point JavaScript.
+ // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
+ // use the JavaScript "number" type. The behavior of the default option
+ // JS_NORMAL is implementation dependent.
+ //
+ // This option is an enum to permit additional types to be added, e.g.
+ // goog.math.Integer.
optional JSType jstype = 6 [default = JS_NORMAL];
enum JSType {
// Use the default type.
@@ -595,7 +595,7 @@ message FieldOptions {
//
//
// Note that implementations may choose not to check required fields within
- // a lazy sub-message. That is, calling IsInitialized() on the outer message
+ // a lazy sub-message. That is, calling IsInitialized() on the outer message
// may return true even if the inner message has missing required fields.
// This is necessary because otherwise the inner message would have to be
// parsed in order to perform the check, defeating the purpose of lazy
@@ -621,8 +621,8 @@ message FieldOptions {
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
-
- reserved 4; // removed jtype
+
+ reserved 4; // removed jtype
}
message OneofOptions {
@@ -645,8 +645,8 @@ message EnumOptions {
// is a formalization for deprecating enums.
optional bool deprecated = 3 [default = false];
- reserved 5; // javanano_as_lite
-
+ reserved 5; // javanano_as_lite
+
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
@@ -701,17 +701,17 @@ message MethodOptions {
// this is a formalization for deprecating methods.
optional bool deprecated = 33 [default = false];
- // Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
- // or neither? HTTP based RPC implementation may choose GET verb for safe
- // methods, and PUT verb for idempotent methods instead of the default POST.
- enum IdempotencyLevel {
- IDEMPOTENCY_UNKNOWN = 0;
+ // Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
+ // or neither? HTTP based RPC implementation may choose GET verb for safe
+ // methods, and PUT verb for idempotent methods instead of the default POST.
+ enum IdempotencyLevel {
+ IDEMPOTENCY_UNKNOWN = 0;
NO_SIDE_EFFECTS = 1; // implies idempotent
IDEMPOTENT = 2; // idempotent, but may have side effects
- }
+ }
optional IdempotencyLevel idempotency_level = 34
[default = IDEMPOTENCY_UNKNOWN];
-
+
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor_database.cc b/contrib/libs/protobuf/src/google/protobuf/descriptor_database.cc
index 61b51ed2cc..d9104f8a2e 100644
--- a/contrib/libs/protobuf/src/google/protobuf/descriptor_database.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/descriptor_database.cc
@@ -211,7 +211,7 @@ bool SimpleDescriptorDatabase::DescriptorIndex<Value>::AddSymbol(
if (iter == by_symbol_.end()) {
// Apparently the map is currently empty. Just insert and be done with it.
- by_symbol_.insert(
+ by_symbol_.insert(
typename std::map<TProtoStringType, Value>::value_type(name, value));
return true;
}
@@ -594,7 +594,7 @@ bool EncodedDescriptorDatabase::FindNameOfFileContainingSymbol(
FileDescriptorProto::kNameFieldNumber,
internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED);
- if (input.ReadTagNoLastTag() == kNameTag) {
+ if (input.ReadTagNoLastTag() == kNameTag) {
// Success!
return internal::WireFormatLite::ReadString(&input, output);
} else {
@@ -1012,9 +1012,9 @@ bool MergedDescriptorDatabase::FindAllExtensionNumbers(
for (DescriptorDatabase* source : sources_) {
if (source->FindAllExtensionNumbers(extendee_type, &results)) {
- std::copy(results.begin(), results.end(),
- std::insert_iterator<std::set<int> >(merged_results,
- merged_results.begin()));
+ std::copy(results.begin(), results.end(),
+ std::insert_iterator<std::set<int> >(merged_results,
+ merged_results.begin()));
success = true;
}
results.clear();
diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor_database.h b/contrib/libs/protobuf/src/google/protobuf/descriptor_database.h
index 9b1183ee02..ac89ff6e39 100644
--- a/contrib/libs/protobuf/src/google/protobuf/descriptor_database.h
+++ b/contrib/libs/protobuf/src/google/protobuf/descriptor_database.h
@@ -108,18 +108,18 @@ class PROTOBUF_EXPORT DescriptorDatabase {
}
- // Finds the file names and appends them to the output in an
- // undefined order. This method is best-effort: it's not guaranteed that the
- // database will find all files. Returns true if the database supports
- // searching all file names, otherwise returns false and leaves output
- // unchanged.
- //
- // This method has a default implementation that always returns
- // false.
+ // Finds the file names and appends them to the output in an
+ // undefined order. This method is best-effort: it's not guaranteed that the
+ // database will find all files. Returns true if the database supports
+ // searching all file names, otherwise returns false and leaves output
+ // unchanged.
+ //
+ // This method has a default implementation that always returns
+ // false.
virtual bool FindAllFileNames(std::vector<TProtoStringType>* /*output*/) {
- return false;
- }
-
+ return false;
+ }
+
// Finds the package names and appends them to the output in an
// undefined order. This method is best-effort: it's not guaranteed that the
// database will find all packages. Returns true if the database supports
@@ -360,8 +360,8 @@ class PROTOBUF_EXPORT MergedDescriptorDatabase : public DescriptorDatabase {
// Merge more than two databases. The sources remain property of the caller.
// The vector may be deleted after the constructor returns but the
// DescriptorDatabases need to stick around.
- explicit MergedDescriptorDatabase(
- const std::vector<DescriptorDatabase*>& sources);
+ explicit MergedDescriptorDatabase(
+ const std::vector<DescriptorDatabase*>& sources);
~MergedDescriptorDatabase() override;
// implements DescriptorDatabase -----------------------------------
diff --git a/contrib/libs/protobuf/src/google/protobuf/duration.pb.cc b/contrib/libs/protobuf/src/google/protobuf/duration.pb.cc
index 1e8bc71df3..2f02356645 100644
--- a/contrib/libs/protobuf/src/google/protobuf/duration.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/duration.pb.cc
@@ -28,30 +28,30 @@ struct DurationDefaultTypeInternal {
union {
Duration _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DurationDefaultTypeInternal _Duration_default_instance_;
PROTOBUF_NAMESPACE_CLOSE
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fduration_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fduration_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fduration_2eproto = nullptr;
-
+
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fduration_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Duration, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Duration, seconds_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Duration, nanos_),
-};
+};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Duration)},
-};
+};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Duration_default_instance_),
-};
-
+};
+
const char descriptor_table_protodef_google_2fprotobuf_2fduration_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\036google/protobuf/duration.proto\022\017google"
".protobuf\"*\n\010Duration\022\017\n\007seconds\030\001 \001(\003\022\r"
@@ -69,8 +69,8 @@ const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_google_2fprotobuf_2fduration_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2fduration_2eproto;
-}
-
+}
+
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fduration_2eproto(&descriptor_table_google_2fprotobuf_2fduration_2eproto);
PROTOBUF_NAMESPACE_OPEN
@@ -88,14 +88,14 @@ Duration::Duration(::PROTOBUF_NAMESPACE_ID::Arena* arena,
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
- // @@protoc_insertion_point(arena_constructor:google.protobuf.Duration)
-}
+ // @@protoc_insertion_point(arena_constructor:google.protobuf.Duration)
+}
Duration::Duration(const Duration& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- ::memcpy(&seconds_, &from.seconds_,
- static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -
- reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
+ ::memcpy(&seconds_, &from.seconds_,
+ static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -
+ reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.Duration)
}
@@ -117,12 +117,12 @@ inline void Duration::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
-void Duration::ArenaDtor(void* object) {
- Duration* _this = reinterpret_cast< Duration* >(object);
- (void)_this;
-}
+void Duration::ArenaDtor(void* object) {
+ Duration* _this = reinterpret_cast< Duration* >(object);
+ (void)_this;
+}
void Duration::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
-}
+}
void Duration::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
@@ -130,12 +130,12 @@ void Duration::SetCachedSize(int size) const {
void Duration::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Duration)
::PROTOBUF_NAMESPACE_ID::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_));
+ // 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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -145,14 +145,14 @@ const char* Duration::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // int64 seconds = 1;
+ // int64 seconds = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
- // int32 nanos = 2;
+ // int32 nanos = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -186,15 +186,15 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Duration)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // int64 seconds = 1;
+ (void) cached_has_bits;
+
+ // int64 seconds = 1;
if (this->_internal_seconds() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_seconds(), target);
}
- // int32 nanos = 2;
+ // int32 nanos = 2;
if (this->_internal_nanos() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_nanos(), target);
@@ -203,27 +203,27 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Duration)
return target;
}
-size_t Duration::ByteSizeLong() const {
+size_t Duration::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Duration)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // int64 seconds = 1;
+ // int64 seconds = 1;
if (this->_internal_seconds() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->_internal_seconds());
}
- // int32 nanos = 2;
+ // int32 nanos = 2;
if (this->_internal_nanos() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
@@ -254,10 +254,10 @@ void Duration::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Duration::MergeFrom(const Duration& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Duration)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (from._internal_seconds() != 0) {
_internal_set_seconds(from._internal_seconds());
}
@@ -271,7 +271,7 @@ void Duration::CopyFrom(const Duration& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Duration)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Duration::IsInitialized() const {
@@ -279,7 +279,7 @@ bool Duration::IsInitialized() const {
}
void Duration::InternalSwap(Duration* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(Duration, nanos_)
diff --git a/contrib/libs/protobuf/src/google/protobuf/duration.pb.h b/contrib/libs/protobuf/src/google/protobuf/duration.pb.h
index a91faac537..7a5caa0555 100644
--- a/contrib/libs/protobuf/src/google/protobuf/duration.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/duration.pb.h
@@ -51,7 +51,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fduration_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
-};
+};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fduration_2eproto;
PROTOBUF_NAMESPACE_OPEN
class Duration;
@@ -82,38 +82,38 @@ class PROTOBUF_EXPORT Duration final :
CopyFrom(from);
return *this;
}
- inline Duration& operator=(Duration&& from) noexcept {
+ inline Duration& operator=(Duration&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const Duration& default_instance() {
return *internal_default_instance();
}
- static inline const Duration* internal_default_instance() {
- return reinterpret_cast<const Duration*>(
- &_Duration_default_instance_);
- }
+ static inline const Duration* internal_default_instance() {
+ return reinterpret_cast<const Duration*>(
+ &_Duration_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 0;
-
- friend void swap(Duration& a, Duration& b) {
- a.Swap(&b);
- }
+ 0;
+
+ friend void swap(Duration& a, Duration& b) {
+ a.Swap(&b);
+ }
inline void Swap(Duration* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -162,11 +162,11 @@ class PROTOBUF_EXPORT Duration final :
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "google.protobuf.Duration";
}
- protected:
+ protected:
explicit Duration(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
private:
- static void ArenaDtor(void* object);
+ static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
@@ -183,7 +183,7 @@ class PROTOBUF_EXPORT Duration final :
kSecondsFieldNumber = 1,
kNanosFieldNumber = 2,
};
- // int64 seconds = 1;
+ // int64 seconds = 1;
void clear_seconds();
::PROTOBUF_NAMESPACE_ID::int64 seconds() const;
void set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value);
@@ -192,7 +192,7 @@ class PROTOBUF_EXPORT Duration final :
void _internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value);
public:
- // int32 nanos = 2;
+ // int32 nanos = 2;
void clear_nanos();
::PROTOBUF_NAMESPACE_ID::int32 nanos() const;
void set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value);
@@ -206,8 +206,8 @@ class PROTOBUF_EXPORT Duration final :
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::int64 seconds_;
::PROTOBUF_NAMESPACE_ID::int32 nanos_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
@@ -218,13 +218,13 @@ class PROTOBUF_EXPORT Duration final :
// ===================================================================
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
// Duration
-// int64 seconds = 1;
+// int64 seconds = 1;
inline void Duration::clear_seconds() {
seconds_ = int64_t{0};
}
@@ -244,7 +244,7 @@ inline void Duration::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) {
// @@protoc_insertion_point(field_set:google.protobuf.Duration.seconds)
}
-// int32 nanos = 2;
+// int32 nanos = 2;
inline void Duration::clear_nanos() {
nanos_ = 0;
}
@@ -264,14 +264,14 @@ inline void Duration::set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) {
// @@protoc_insertion_point(field_set:google.protobuf.Duration.nanos)
}
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_CLOSE
-
+
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protobuf/src/google/protobuf/duration.proto b/contrib/libs/protobuf/src/google/protobuf/duration.proto
index fd01f0a8a6..81c3e369fd 100644
--- a/contrib/libs/protobuf/src/google/protobuf/duration.proto
+++ b/contrib/libs/protobuf/src/google/protobuf/duration.proto
@@ -33,7 +33,7 @@ syntax = "proto3";
package google.protobuf;
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option cc_enable_arenas = true;
+option cc_enable_arenas = true;
option go_package = "google.golang.org/protobuf/types/known/durationpb";
option java_package = "com.google.protobuf";
option java_outer_classname = "DurationProto";
@@ -47,8 +47,8 @@ option objc_class_prefix = "GPB";
// two Timestamp values is a Duration and it can be added or subtracted
// from a Timestamp. Range is approximately +-10,000 years.
//
-// # Examples
-//
+// # Examples
+//
// Example 1: Compute Duration from two Timestamps in pseudo code.
//
// Timestamp start = ...;
@@ -83,27 +83,27 @@ option objc_class_prefix = "GPB";
// end.nanos -= 1000000000;
// }
//
-// Example 3: Compute Duration from datetime.timedelta in Python.
-//
-// td = datetime.timedelta(days=3, minutes=10)
-// duration = Duration()
-// duration.FromTimedelta(td)
-//
-// # JSON Mapping
-//
-// In JSON format, the Duration type is encoded as a string rather than an
-// object, where the string ends in the suffix "s" (indicating seconds) and
-// is preceded by the number of seconds, with nanoseconds expressed as
-// fractional seconds. For example, 3 seconds with 0 nanoseconds should be
-// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
-// be expressed in JSON format as "3.000000001s", and 3 seconds and 1
-// microsecond should be expressed in JSON format as "3.000001s".
-//
-//
+// Example 3: Compute Duration from datetime.timedelta in Python.
+//
+// td = datetime.timedelta(days=3, minutes=10)
+// duration = Duration()
+// duration.FromTimedelta(td)
+//
+// # JSON Mapping
+//
+// In JSON format, the Duration type is encoded as a string rather than an
+// object, where the string ends in the suffix "s" (indicating seconds) and
+// is preceded by the number of seconds, with nanoseconds expressed as
+// fractional seconds. For example, 3 seconds with 0 nanoseconds should be
+// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
+// be expressed in JSON format as "3.000000001s", and 3 seconds and 1
+// microsecond should be expressed in JSON format as "3.000001s".
+//
+//
message Duration {
// Signed seconds of the span of time. Must be from -315,576,000,000
- // to +315,576,000,000 inclusive. Note: these bounds are computed from:
- // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
+ // to +315,576,000,000 inclusive. Note: these bounds are computed from:
+ // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
int64 seconds = 1;
// Signed fractions of a second at nanosecond resolution of the span
diff --git a/contrib/libs/protobuf/src/google/protobuf/dynamic_message.cc b/contrib/libs/protobuf/src/google/protobuf/dynamic_message.cc
index e7317465b5..0d79fbe571 100644
--- a/contrib/libs/protobuf/src/google/protobuf/dynamic_message.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/dynamic_message.cc
@@ -86,11 +86,11 @@
#include <google/protobuf/wire_format.h>
#include <google/protobuf/port_def.inc> // NOLINT
-
+
namespace google {
namespace protobuf {
-using internal::DynamicMapField;
+using internal::DynamicMapField;
using internal::ExtensionSet;
using internal::MapField;
@@ -221,9 +221,9 @@ class DynamicMessage : public Message {
public:
explicit DynamicMessage(const DynamicMessageFactory::TypeInfo* type_info);
- // This should only be used by GetPrototypeNoLock() to avoid dead lock.
+ // This should only be used by GetPrototypeNoLock() to avoid dead lock.
DynamicMessage(DynamicMessageFactory::TypeInfo* type_info, bool lock_factory);
-
+
~DynamicMessage();
// Called on the prototype after construction to initialize message fields.
@@ -263,8 +263,8 @@ class DynamicMessage : public Message {
DynamicMessage(const DynamicMessageFactory::TypeInfo* type_info,
Arena* arena);
- void SharedCtor(bool lock_factory);
-
+ void SharedCtor(bool lock_factory);
+
// Needed to get the offset of the internal metadata member.
friend class DynamicMessageFactory;
@@ -312,18 +312,18 @@ struct DynamicMessageFactory::TypeInfo {
DynamicMessage::DynamicMessage(const DynamicMessageFactory::TypeInfo* type_info)
: type_info_(type_info), cached_byte_size_(0) {
- SharedCtor(true);
+ SharedCtor(true);
}
DynamicMessage::DynamicMessage(const DynamicMessageFactory::TypeInfo* type_info,
Arena* arena)
: Message(arena), type_info_(type_info), cached_byte_size_(0) {
- SharedCtor(true);
+ SharedCtor(true);
}
DynamicMessage::DynamicMessage(DynamicMessageFactory::TypeInfo* type_info,
bool lock_factory)
- : type_info_(type_info), cached_byte_size_(0) {
+ : type_info_(type_info), cached_byte_size_(0) {
// The prototype in type_info has to be set before creating the prototype
// instance on memory. e.g., message Foo { map<int32, Foo> a = 1; }. When
// creating prototype for Foo, prototype of the map entry will also be
@@ -331,10 +331,10 @@ DynamicMessage::DynamicMessage(DynamicMessageFactory::TypeInfo* type_info,
// map). To break the cyclic dependency, we have to assign the address of
// prototype into type_info first.
type_info->prototype = this;
- SharedCtor(lock_factory);
-}
-
-void DynamicMessage::SharedCtor(bool lock_factory) {
+ SharedCtor(lock_factory);
+}
+
+void DynamicMessage::SharedCtor(bool lock_factory) {
// We need to call constructors for various fields manually and set
// default values where appropriate. We use placement new to call
// constructors. If you haven't heard of placement new, I suggest Googling
@@ -414,10 +414,10 @@ void DynamicMessage::SharedCtor(bool lock_factory) {
new (field_ptr) Message*(NULL);
} else {
if (IsMapFieldInApi(field)) {
- // We need to lock in most cases to avoid data racing. Only not lock
- // when the constructor is called inside GetPrototype(), in which
- // case we have already locked the factory.
- if (lock_factory) {
+ // We need to lock in most cases to avoid data racing. Only not lock
+ // when the constructor is called inside GetPrototype(), in which
+ // case we have already locked the factory.
+ if (lock_factory) {
if (GetArenaForAllocation() != nullptr) {
new (field_ptr) DynamicMapField(
type_info_->factory->GetPrototype(field->message_type()),
@@ -431,7 +431,7 @@ void DynamicMessage::SharedCtor(bool lock_factory) {
new (field_ptr) DynamicMapField(
type_info_->factory->GetPrototype(field->message_type()));
}
- } else {
+ } else {
if (GetArenaForAllocation() != nullptr) {
new (field_ptr)
DynamicMapField(type_info_->factory->GetPrototypeNoLock(
@@ -447,7 +447,7 @@ void DynamicMessage::SharedCtor(bool lock_factory) {
DynamicMapField(type_info_->factory->GetPrototypeNoLock(
field->message_type()));
}
- }
+ }
} else {
new (field_ptr) RepeatedPtrField<Message>(GetArenaForAllocation());
}
@@ -748,8 +748,8 @@ const Message* DynamicMessageFactory::GetPrototypeNoLock(
}
// All the fields.
- //
- // TODO(b/31226269): Optimize the order of fields to minimize padding.
+ //
+ // TODO(b/31226269): Optimize the order of fields to minimize padding.
for (int i = 0; i < type->field_count(); i++) {
// Make sure field is aligned to avoid bus errors.
// Oneof fields do not use any space.
@@ -770,14 +770,14 @@ const Message* DynamicMessageFactory::GetPrototypeNoLock(
}
}
- type_info->weak_field_map_offset = -1;
-
+ type_info->weak_field_map_offset = -1;
+
// Align the final size to make sure no clever allocators think that
// alignment is not necessary.
type_info->size = size;
- // Construct the reflection object.
-
+ // Construct the reflection object.
+
// Compute the size of default oneof instance and offsets of default
// oneof fields.
for (int i = 0; i < type->oneof_decl_count(); i++) {
@@ -790,31 +790,31 @@ const Message* DynamicMessageFactory::GetPrototypeNoLock(
// Mark the field to prevent unintentional access through reflection.
// Don't use the top bit because that is for unused fields.
offsets[field->index()] = internal::kInvalidFieldOffsetTag;
- }
- }
+ }
+ }
// Allocate the prototype fields.
void* base = operator new(size);
memset(base, 0, size);
-
- // We have already locked the factory so we should not lock in the constructor
- // of dynamic message to avoid dead lock.
- DynamicMessage* prototype = new (base) DynamicMessage(type_info, false);
-
- internal::ReflectionSchema schema = {
- type_info->prototype,
- type_info->offsets.get(),
- type_info->has_bits_indices.get(),
- type_info->has_bits_offset,
+
+ // We have already locked the factory so we should not lock in the constructor
+ // of dynamic message to avoid dead lock.
+ DynamicMessage* prototype = new (base) DynamicMessage(type_info, false);
+
+ internal::ReflectionSchema schema = {
+ type_info->prototype,
+ type_info->offsets.get(),
+ type_info->has_bits_indices.get(),
+ type_info->has_bits_offset,
PROTOBUF_FIELD_OFFSET(DynamicMessage, _internal_metadata_),
- type_info->extensions_offset,
- type_info->oneof_case_offset,
- type_info->size,
- type_info->weak_field_map_offset};
-
+ type_info->extensions_offset,
+ type_info->oneof_case_offset,
+ type_info->size,
+ type_info->weak_field_map_offset};
+
type_info->reflection.reset(
new Reflection(type_info->type, schema, type_info->pool, this));
-
+
// Cross link prototypes.
prototype->CrossLinkPrototypes();
diff --git a/contrib/libs/protobuf/src/google/protobuf/dynamic_message.h b/contrib/libs/protobuf/src/google/protobuf/dynamic_message.h
index 3982bb692c..b25f8ca0ff 100644
--- a/contrib/libs/protobuf/src/google/protobuf/dynamic_message.h
+++ b/contrib/libs/protobuf/src/google/protobuf/dynamic_message.h
@@ -38,10 +38,10 @@
#ifndef GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__
#define GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__
-#include <algorithm>
+#include <algorithm>
#include <memory>
#include <unordered_map>
-#include <vector>
+#include <vector>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/message.h>
@@ -139,84 +139,84 @@ class PROTOBUF_EXPORT DynamicMessageFactory : public MessageFactory {
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DynamicMessageFactory);
};
-// Helper for computing a sorted list of map entries via reflection.
+// Helper for computing a sorted list of map entries via reflection.
class PROTOBUF_EXPORT DynamicMapSorter {
- public:
+ public:
static std::vector<const Message*> Sort(const Message& message, int map_size,
- const Reflection* reflection,
- const FieldDescriptor* field) {
+ const Reflection* reflection,
+ const FieldDescriptor* field) {
std::vector<const Message*> result;
result.reserve(map_size);
RepeatedFieldRef<Message> map_field =
reflection->GetRepeatedFieldRef<Message>(message, field);
for (auto it = map_field.begin(); it != map_field.end(); ++it) {
result.push_back(&*it);
- }
- MapEntryMessageComparator comparator(field->message_type());
- std::stable_sort(result.begin(), result.end(), comparator);
- // Complain if the keys aren't in ascending order.
-#ifndef NDEBUG
- for (size_t j = 1; j < static_cast<size_t>(map_size); j++) {
- if (!comparator(result[j - 1], result[j])) {
+ }
+ MapEntryMessageComparator comparator(field->message_type());
+ std::stable_sort(result.begin(), result.end(), comparator);
+ // Complain if the keys aren't in ascending order.
+#ifndef NDEBUG
+ for (size_t j = 1; j < static_cast<size_t>(map_size); j++) {
+ if (!comparator(result[j - 1], result[j])) {
GOOGLE_LOG(ERROR) << (comparator(result[j], result[j - 1])
? "internal error in map key sorting"
: "map keys are not unique");
- }
- }
-#endif
- return result;
- }
-
- private:
+ }
+ }
+#endif
+ return result;
+ }
+
+ private:
class PROTOBUF_EXPORT MapEntryMessageComparator {
- public:
- explicit MapEntryMessageComparator(const Descriptor* descriptor)
- : field_(descriptor->field(0)) {}
-
- bool operator()(const Message* a, const Message* b) {
- const Reflection* reflection = a->GetReflection();
- switch (field_->cpp_type()) {
- case FieldDescriptor::CPPTYPE_BOOL: {
- bool first = reflection->GetBool(*a, field_);
- bool second = reflection->GetBool(*b, field_);
- return first < second;
- }
- case FieldDescriptor::CPPTYPE_INT32: {
- int32 first = reflection->GetInt32(*a, field_);
- int32 second = reflection->GetInt32(*b, field_);
- return first < second;
- }
- case FieldDescriptor::CPPTYPE_INT64: {
- int64 first = reflection->GetInt64(*a, field_);
- int64 second = reflection->GetInt64(*b, field_);
- return first < second;
- }
- case FieldDescriptor::CPPTYPE_UINT32: {
- uint32 first = reflection->GetUInt32(*a, field_);
- uint32 second = reflection->GetUInt32(*b, field_);
- return first < second;
- }
- case FieldDescriptor::CPPTYPE_UINT64: {
- uint64 first = reflection->GetUInt64(*a, field_);
- uint64 second = reflection->GetUInt64(*b, field_);
- return first < second;
- }
- case FieldDescriptor::CPPTYPE_STRING: {
+ public:
+ explicit MapEntryMessageComparator(const Descriptor* descriptor)
+ : field_(descriptor->field(0)) {}
+
+ bool operator()(const Message* a, const Message* b) {
+ const Reflection* reflection = a->GetReflection();
+ switch (field_->cpp_type()) {
+ case FieldDescriptor::CPPTYPE_BOOL: {
+ bool first = reflection->GetBool(*a, field_);
+ bool second = reflection->GetBool(*b, field_);
+ return first < second;
+ }
+ case FieldDescriptor::CPPTYPE_INT32: {
+ int32 first = reflection->GetInt32(*a, field_);
+ int32 second = reflection->GetInt32(*b, field_);
+ return first < second;
+ }
+ case FieldDescriptor::CPPTYPE_INT64: {
+ int64 first = reflection->GetInt64(*a, field_);
+ int64 second = reflection->GetInt64(*b, field_);
+ return first < second;
+ }
+ case FieldDescriptor::CPPTYPE_UINT32: {
+ uint32 first = reflection->GetUInt32(*a, field_);
+ uint32 second = reflection->GetUInt32(*b, field_);
+ return first < second;
+ }
+ case FieldDescriptor::CPPTYPE_UINT64: {
+ uint64 first = reflection->GetUInt64(*a, field_);
+ uint64 second = reflection->GetUInt64(*b, field_);
+ return first < second;
+ }
+ case FieldDescriptor::CPPTYPE_STRING: {
TProtoStringType first = reflection->GetString(*a, field_);
TProtoStringType second = reflection->GetString(*b, field_);
- return first < second;
- }
- default:
- GOOGLE_LOG(DFATAL) << "Invalid key for map field.";
- return true;
- }
- }
-
- private:
- const FieldDescriptor* field_;
- };
-};
-
+ return first < second;
+ }
+ default:
+ GOOGLE_LOG(DFATAL) << "Invalid key for map field.";
+ return true;
+ }
+ }
+
+ private:
+ const FieldDescriptor* field_;
+ };
+};
+
} // namespace protobuf
} // namespace google
diff --git a/contrib/libs/protobuf/src/google/protobuf/empty.pb.cc b/contrib/libs/protobuf/src/google/protobuf/empty.pb.cc
index bdeba60a03..96ee74a8e2 100644
--- a/contrib/libs/protobuf/src/google/protobuf/empty.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/empty.pb.cc
@@ -26,28 +26,28 @@ struct EmptyDefaultTypeInternal {
union {
Empty _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EmptyDefaultTypeInternal _Empty_default_instance_;
PROTOBUF_NAMESPACE_CLOSE
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fempty_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fempty_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fempty_2eproto = nullptr;
-
+
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fempty_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Empty, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
-};
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
+};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Empty)},
-};
+};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Empty_default_instance_),
-};
-
+};
+
const char descriptor_table_protodef_google_2fprotobuf_2fempty_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\033google/protobuf/empty.proto\022\017google.pr"
"otobuf\"\007\n\005EmptyB}\n\023com.google.protobufB\n"
@@ -64,8 +64,8 @@ const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_google_2fprotobuf_2fempty_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2fempty_2eproto;
-}
-
+}
+
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fempty_2eproto(&descriptor_table_google_2fprotobuf_2fempty_2eproto);
PROTOBUF_NAMESPACE_OPEN
@@ -118,9 +118,9 @@ void Empty::SetCachedSize(int size) const {
void Empty::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Empty)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -152,19 +152,19 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Empty)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Empty)
return target;
}
-size_t Empty::ByteSizeLong() const {
+size_t Empty::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Empty)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -173,7 +173,7 @@ size_t Empty::ByteSizeLong() const {
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
_internal_metadata_, total_size, &_cached_size_);
- }
+ }
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
@@ -194,10 +194,10 @@ void Empty::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Empty::MergeFrom(const Empty& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Empty)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -205,7 +205,7 @@ void Empty::CopyFrom(const Empty& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Empty)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Empty::IsInitialized() const {
@@ -213,7 +213,7 @@ bool Empty::IsInitialized() const {
}
void Empty::InternalSwap(Empty* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/empty.pb.h b/contrib/libs/protobuf/src/google/protobuf/empty.pb.h
index 884c37343c..64a3bdeda3 100644
--- a/contrib/libs/protobuf/src/google/protobuf/empty.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/empty.pb.h
@@ -51,7 +51,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fempty_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
-};
+};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fempty_2eproto;
PROTOBUF_NAMESPACE_OPEN
class Empty;
@@ -82,19 +82,19 @@ class PROTOBUF_EXPORT Empty final :
CopyFrom(from);
return *this;
}
- inline Empty& operator=(Empty&& from) noexcept {
+ inline Empty& operator=(Empty&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
@@ -104,16 +104,16 @@ class PROTOBUF_EXPORT Empty final :
static const Empty& default_instance() {
return *internal_default_instance();
}
- static inline const Empty* internal_default_instance() {
- return reinterpret_cast<const Empty*>(
- &_Empty_default_instance_);
- }
+ static inline const Empty* internal_default_instance() {
+ return reinterpret_cast<const Empty*>(
+ &_Empty_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 0;
-
- friend void swap(Empty& a, Empty& b) {
- a.Swap(&b);
- }
+ 0;
+
+ friend void swap(Empty& a, Empty& b) {
+ a.Swap(&b);
+ }
inline void Swap(Empty* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -194,20 +194,20 @@ class PROTOBUF_EXPORT Empty final :
// ===================================================================
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
// Empty
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_CLOSE
-
+
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protobuf/src/google/protobuf/extension_set.cc b/contrib/libs/protobuf/src/google/protobuf/extension_set.cc
index 0cea25483e..431b74de37 100644
--- a/contrib/libs/protobuf/src/google/protobuf/extension_set.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/extension_set.cc
@@ -1505,8 +1505,8 @@ uint8* ExtensionSet::InternalSerializeMessageSetWithCachedSizesToArray(
return target;
}
-size_t ExtensionSet::ByteSize() const {
- size_t total_size = 0;
+size_t ExtensionSet::ByteSize() const {
+ size_t total_size = 0;
ForEach([&total_size](int number, const Extension& ext) {
total_size += ext.ByteSize(number);
});
@@ -1573,8 +1573,8 @@ void ExtensionSet::Extension::Clear() {
}
}
-size_t ExtensionSet::Extension::ByteSize(int number) const {
- size_t result = 0;
+size_t ExtensionSet::Extension::ByteSize(int number) const {
+ size_t result = 0;
if (is_repeated) {
if (is_packed) {
@@ -1619,14 +1619,14 @@ size_t ExtensionSet::Extension::ByteSize(int number) const {
break;
}
- cached_size = ToCachedSize(result);
+ cached_size = ToCachedSize(result);
if (result > 0) {
result += io::CodedOutputStream::VarintSize32(result);
result += io::CodedOutputStream::VarintSize32(WireFormatLite::MakeTag(
number, WireFormatLite::WIRETYPE_LENGTH_DELIMITED));
}
} else {
- size_t tag_size = WireFormatLite::TagSize(number, real_type(type));
+ size_t tag_size = WireFormatLite::TagSize(number, real_type(type));
switch (real_type(type)) {
#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \
diff --git a/contrib/libs/protobuf/src/google/protobuf/extension_set.h b/contrib/libs/protobuf/src/google/protobuf/extension_set.h
index 68d12fae52..1b97735f95 100644
--- a/contrib/libs/protobuf/src/google/protobuf/extension_set.h
+++ b/contrib/libs/protobuf/src/google/protobuf/extension_set.h
@@ -490,18 +490,18 @@ class PROTOBUF_EXPORT ExtensionSet {
uint8* target, io::EpsCopyOutputStream* stream) const;
// For backward-compatibility, versions of two of the above methods that
- // serialize deterministically iff SetDefaultSerializationDeterministic()
- // has been called.
+ // serialize deterministically iff SetDefaultSerializationDeterministic()
+ // has been called.
uint8* SerializeWithCachedSizesToArray(int start_field_number,
int end_field_number,
uint8* target) const;
uint8* SerializeMessageSetWithCachedSizesToArray(uint8* target) const;
// Returns the total serialized size of all the extensions.
- size_t ByteSize() const;
+ size_t ByteSize() const;
// Like ByteSize() but uses MessageSet format.
- size_t MessageSetByteSize() const;
+ size_t MessageSetByteSize() const;
// Returns (an estimate of) the total number of bytes used for storing the
// extensions in memory, excluding sizeof(*this). If the ExtensionSet is
@@ -510,13 +510,13 @@ class PROTOBUF_EXPORT ExtensionSet {
// be linked in). It's up to the protocol compiler to avoid calling this on
// such ExtensionSets (easy enough since lite messages don't implement
// SpaceUsed()).
- size_t SpaceUsedExcludingSelfLong() const;
-
- // This method just calls SpaceUsedExcludingSelfLong() but it can not be
- // inlined because the definition of SpaceUsedExcludingSelfLong() is not
- // included in lite runtime and when an inline method refers to it MSVC
- // will complain about unresolved symbols when building the lite runtime
- // as .dll.
+ size_t SpaceUsedExcludingSelfLong() const;
+
+ // This method just calls SpaceUsedExcludingSelfLong() but it can not be
+ // inlined because the definition of SpaceUsedExcludingSelfLong() is not
+ // included in lite runtime and when an inline method refers to it MSVC
+ // will complain about unresolved symbols when building the lite runtime
+ // as .dll.
int SpaceUsedExcludingSelf() const;
private:
@@ -546,7 +546,7 @@ class PROTOBUF_EXPORT ExtensionSet {
PROTOBUF_DEPRECATED_MSG("Please use ByteSizeLong() instead")
virtual int ByteSize() const { return internal::ToIntSize(ByteSizeLong()); }
virtual size_t ByteSizeLong() const = 0;
- virtual size_t SpaceUsedLong() const = 0;
+ virtual size_t SpaceUsedLong() const = 0;
virtual void MergeFrom(const LazyMessageExtension& other) = 0;
virtual void Clear() = 0;
@@ -626,12 +626,12 @@ class PROTOBUF_EXPORT ExtensionSet {
int number, uint8* target, io::EpsCopyOutputStream* stream) const;
uint8* InternalSerializeMessageSetItemWithCachedSizesToArray(
int number, uint8* target, io::EpsCopyOutputStream* stream) const;
- size_t ByteSize(int number) const;
- size_t MessageSetItemByteSize(int number) const;
+ size_t ByteSize(int number) const;
+ size_t MessageSetItemByteSize(int number) const;
void Clear();
int GetSize() const;
void Free();
- size_t SpaceUsedExcludingSelfLong() const;
+ size_t SpaceUsedExcludingSelfLong() const;
bool IsInitialized() const;
};
@@ -825,7 +825,7 @@ class PROTOBUF_EXPORT ExtensionSet {
// class.
// Defined in extension_set_heavy.cc.
- static inline size_t RepeatedMessage_SpaceUsedExcludingSelfLong(
+ static inline size_t RepeatedMessage_SpaceUsedExcludingSelfLong(
RepeatedPtrFieldBase* field);
KeyValue* flat_begin() {
@@ -1353,7 +1353,7 @@ RepeatedMessageTypeTraits<Type>::GetDefaultRepeatedField() {
// parameter, and thus make an instance of ExtensionIdentifier have no
// actual contents. However, if we did that, then using an extension
// identifier would not necessarily cause the compiler to output any sort
-// of reference to any symbol defined in the extension's .pb.o file. Some
+// of reference to any symbol defined in the extension's .pb.o file. Some
// linkers will actually drop object files that are not explicitly referenced,
// but that would be bad because it would cause this extension to not be
// registered at static initialization, and therefore using it would crash.
diff --git a/contrib/libs/protobuf/src/google/protobuf/extension_set_heavy.cc b/contrib/libs/protobuf/src/google/protobuf/extension_set_heavy.cc
index dae80f6b79..76ac0766f6 100644
--- a/contrib/libs/protobuf/src/google/protobuf/extension_set_heavy.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/extension_set_heavy.cc
@@ -400,10 +400,10 @@ bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input,
}
int ExtensionSet::SpaceUsedExcludingSelf() const {
- return internal::FromIntSize(SpaceUsedExcludingSelfLong());
-}
-
-size_t ExtensionSet::SpaceUsedExcludingSelfLong() const {
+ return internal::FromIntSize(SpaceUsedExcludingSelfLong());
+}
+
+size_t ExtensionSet::SpaceUsedExcludingSelfLong() const {
size_t total_size = Size() * sizeof(KeyValue);
ForEach([&total_size](int /* number */, const Extension& ext) {
total_size += ext.SpaceUsedExcludingSelfLong();
@@ -411,20 +411,20 @@ size_t ExtensionSet::SpaceUsedExcludingSelfLong() const {
return total_size;
}
-inline size_t ExtensionSet::RepeatedMessage_SpaceUsedExcludingSelfLong(
+inline size_t ExtensionSet::RepeatedMessage_SpaceUsedExcludingSelfLong(
RepeatedPtrFieldBase* field) {
- return field->SpaceUsedExcludingSelfLong<GenericTypeHandler<Message> >();
+ return field->SpaceUsedExcludingSelfLong<GenericTypeHandler<Message> >();
}
-size_t ExtensionSet::Extension::SpaceUsedExcludingSelfLong() const {
- size_t total_size = 0;
+size_t ExtensionSet::Extension::SpaceUsedExcludingSelfLong() const {
+ size_t total_size = 0;
if (is_repeated) {
switch (cpp_type(type)) {
-#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \
- case FieldDescriptor::CPPTYPE_##UPPERCASE: \
- total_size += sizeof(*repeated_##LOWERCASE##_value) + \
- repeated_##LOWERCASE##_value->SpaceUsedExcludingSelfLong(); \
- break
+#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \
+ case FieldDescriptor::CPPTYPE_##UPPERCASE: \
+ total_size += sizeof(*repeated_##LOWERCASE##_value) + \
+ repeated_##LOWERCASE##_value->SpaceUsedExcludingSelfLong(); \
+ break
HANDLE_TYPE(INT32, int32);
HANDLE_TYPE(INT64, int64);
@@ -439,9 +439,9 @@ size_t ExtensionSet::Extension::SpaceUsedExcludingSelfLong() const {
case FieldDescriptor::CPPTYPE_MESSAGE:
// repeated_message_value is actually a RepeatedPtrField<MessageLite>,
- // but MessageLite has no SpaceUsedLong(), so we must directly call
- // RepeatedPtrFieldBase::SpaceUsedExcludingSelfLong() with a different
- // type handler.
+ // but MessageLite has no SpaceUsedLong(), so we must directly call
+ // RepeatedPtrFieldBase::SpaceUsedExcludingSelfLong() with a different
+ // type handler.
total_size += sizeof(*repeated_message_value) +
RepeatedMessage_SpaceUsedExcludingSelfLong(
reinterpret_cast<internal::RepeatedPtrFieldBase*>(
@@ -452,13 +452,13 @@ size_t ExtensionSet::Extension::SpaceUsedExcludingSelfLong() const {
switch (cpp_type(type)) {
case FieldDescriptor::CPPTYPE_STRING:
total_size += sizeof(*string_value) +
- StringSpaceUsedExcludingSelfLong(*string_value);
+ StringSpaceUsedExcludingSelfLong(*string_value);
break;
case FieldDescriptor::CPPTYPE_MESSAGE:
if (is_lazy) {
- total_size += lazymessage_value->SpaceUsedLong();
+ total_size += lazymessage_value->SpaceUsedLong();
} else {
- total_size += down_cast<Message*>(message_value)->SpaceUsedLong();
+ total_size += down_cast<Message*>(message_value)->SpaceUsedLong();
}
break;
default:
diff --git a/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.cc b/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.cc
index 7afec6b288..d073936d83 100644
--- a/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.cc
@@ -27,29 +27,29 @@ struct FieldMaskDefaultTypeInternal {
union {
FieldMask _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FieldMaskDefaultTypeInternal _FieldMask_default_instance_;
PROTOBUF_NAMESPACE_CLOSE
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
-
+
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldMask, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldMask, paths_),
-};
+};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::FieldMask)},
-};
+};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_FieldMask_default_instance_),
-};
-
+};
+
const char descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n google/protobuf/field_mask.proto\022\017goog"
"le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB"
@@ -67,8 +67,8 @@ const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto;
-}
-
+}
+
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2ffield_5fmask_2eproto(&descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto);
PROTOBUF_NAMESPACE_OPEN
@@ -123,9 +123,9 @@ void FieldMask::SetCachedSize(int size) const {
void FieldMask::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FieldMask)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
paths_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -177,8 +177,8 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (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(i);
@@ -192,21 +192,21 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldMask)
return target;
}
-size_t FieldMask::ByteSizeLong() const {
+size_t FieldMask::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldMask)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated string paths = 1;
- total_size += 1 *
+ total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(paths_.size());
for (int i = 0, n = paths_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
@@ -237,11 +237,11 @@ void FieldMask::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void FieldMask::MergeFrom(const FieldMask& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldMask)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- paths_.MergeFrom(from.paths_);
+ (void) cached_has_bits;
+
+ paths_.MergeFrom(from.paths_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -249,7 +249,7 @@ void FieldMask::CopyFrom(const FieldMask& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FieldMask)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool FieldMask::IsInitialized() const {
@@ -257,9 +257,9 @@ bool FieldMask::IsInitialized() const {
}
void FieldMask::InternalSwap(FieldMask* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- paths_.InternalSwap(&other->paths_);
+ paths_.InternalSwap(&other->paths_);
}
::PROTOBUF_NAMESPACE_ID::Metadata FieldMask::GetMetadata() const {
diff --git a/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.h b/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.h
index 30fd6f993c..c0c7af1a73 100644
--- a/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.h
@@ -51,7 +51,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
-};
+};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto;
PROTOBUF_NAMESPACE_OPEN
class FieldMask;
@@ -82,15 +82,15 @@ class PROTOBUF_EXPORT FieldMask final :
CopyFrom(from);
return *this;
}
- inline FieldMask& operator=(FieldMask&& from) noexcept {
+ inline FieldMask& operator=(FieldMask&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
@@ -104,16 +104,16 @@ class PROTOBUF_EXPORT FieldMask final :
static const FieldMask& default_instance() {
return *internal_default_instance();
}
- static inline const FieldMask* internal_default_instance() {
- return reinterpret_cast<const FieldMask*>(
- &_FieldMask_default_instance_);
- }
+ static inline const FieldMask* internal_default_instance() {
+ return reinterpret_cast<const FieldMask*>(
+ &_FieldMask_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 0;
-
- friend void swap(FieldMask& a, FieldMask& b) {
- a.Swap(&b);
- }
+ 0;
+
+ friend void swap(FieldMask& a, FieldMask& b) {
+ a.Swap(&b);
+ }
inline void Swap(FieldMask* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -191,12 +191,12 @@ class PROTOBUF_EXPORT FieldMask final :
const TProtoStringType& paths(int index) const;
TProtoStringType* mutable_paths(int index);
void set_paths(int index, const TProtoStringType& value);
- void set_paths(int index, TProtoStringType&& value);
+ void set_paths(int index, TProtoStringType&& value);
void set_paths(int index, const char* value);
void set_paths(int index, const char* value, size_t size);
TProtoStringType* add_paths();
void add_paths(const TProtoStringType& value);
- void add_paths(TProtoStringType&& value);
+ void add_paths(TProtoStringType&& value);
void add_paths(const char* value);
void add_paths(const char* value, size_t size);
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>& paths() const;
@@ -222,10 +222,10 @@ class PROTOBUF_EXPORT FieldMask final :
// ===================================================================
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
// FieldMask
// repeated string paths = 1;
@@ -258,10 +258,10 @@ inline void FieldMask::set_paths(int index, const TProtoStringType& value) {
paths_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths)
}
-inline void FieldMask::set_paths(int index, TProtoStringType&& value) {
+inline void FieldMask::set_paths(int index, TProtoStringType&& value) {
paths_.Mutable(index)->assign(std::move(value));
- // @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths)
-}
+ // @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths)
+}
inline void FieldMask::set_paths(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
paths_.Mutable(index)->assign(value);
@@ -279,10 +279,10 @@ inline void FieldMask::add_paths(const TProtoStringType& value) {
paths_.Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths)
}
-inline void FieldMask::add_paths(TProtoStringType&& value) {
- paths_.Add(std::move(value));
- // @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths)
-}
+inline void FieldMask::add_paths(TProtoStringType&& value) {
+ paths_.Add(std::move(value));
+ // @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths)
+}
inline void FieldMask::add_paths(const char* value) {
GOOGLE_DCHECK(value != nullptr);
paths_.Add()->assign(value);
@@ -303,14 +303,14 @@ FieldMask::mutable_paths() {
return &paths_;
}
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_CLOSE
-
+
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protobuf/src/google/protobuf/field_mask.proto b/contrib/libs/protobuf/src/google/protobuf/field_mask.proto
index 84a58f7fd5..6b5104f188 100644
--- a/contrib/libs/protobuf/src/google/protobuf/field_mask.proto
+++ b/contrib/libs/protobuf/src/google/protobuf/field_mask.proto
@@ -83,7 +83,7 @@ option cc_enable_arenas = true;
// }
//
// A repeated field is not allowed except at the last position of a
-// paths string.
+// paths string.
//
// If a FieldMask object is not present in a get operation, the
// operation applies to all fields (as if a FieldMask of all fields
diff --git a/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.cc b/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.cc
index 15188f4b2d..82f48bd1c0 100644
--- a/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.cc
@@ -115,7 +115,7 @@ namespace {
using internal::GetConstPointerAtOffset;
using internal::GetConstRefAtOffset;
using internal::GetPointerAtOffset;
-
+
void ReportReflectionUsageError(const Descriptor* descriptor,
const FieldDescriptor* field,
const char* method, const char* description) {
@@ -131,8 +131,8 @@ void ReportReflectionUsageError(const Descriptor* descriptor,
<< "\n"
" Problem : "
<< description;
-}
-
+}
+
const char* cpptype_names_[FieldDescriptor::MAX_CPPTYPE + 1] = {
"INVALID_CPPTYPE", "CPPTYPE_INT32", "CPPTYPE_INT64", "CPPTYPE_UINT32",
"CPPTYPE_UINT64", "CPPTYPE_DOUBLE", "CPPTYPE_FLOAT", "CPPTYPE_BOOL",
@@ -226,14 +226,14 @@ inline void CheckInvalidAccess(const internal::ReflectionSchema& schema,
Reflection::Reflection(const Descriptor* descriptor,
const internal::ReflectionSchema& schema,
const DescriptorPool* pool, MessageFactory* factory)
- : descriptor_(descriptor),
- schema_(schema),
+ : descriptor_(descriptor),
+ schema_(schema),
descriptor_pool_(
(pool == nullptr) ? DescriptorPool::internal_generated_pool() : pool),
- message_factory_(factory),
- last_non_weak_field_index_(-1) {
- last_non_weak_field_index_ = descriptor_->field_count() - 1;
-}
+ message_factory_(factory),
+ last_non_weak_field_index_(-1) {
+ last_non_weak_field_index_ = descriptor_->field_count() - 1;
+}
const UnknownFieldSet& Reflection::GetUnknownFields(
const Message& message) const {
@@ -260,14 +260,14 @@ size_t Reflection::SpaceUsedLong(const Message& message) const {
// object_size_ already includes the in-memory representation of each field
// in the message, so we only need to account for additional memory used by
// the fields.
- size_t total_size = schema_.GetObjectSize();
+ size_t total_size = schema_.GetObjectSize();
- total_size += GetUnknownFields(message).SpaceUsedExcludingSelfLong();
+ total_size += GetUnknownFields(message).SpaceUsedExcludingSelfLong();
- if (schema_.HasExtensionSet()) {
- total_size += GetExtensionSet(message).SpaceUsedExcludingSelfLong();
+ if (schema_.HasExtensionSet()) {
+ total_size += GetExtensionSet(message).SpaceUsedExcludingSelfLong();
}
- for (int i = 0; i <= last_non_weak_field_index_; i++) {
+ for (int i = 0; i <= last_non_weak_field_index_; i++) {
const FieldDescriptor* field = descriptor_->field(i);
if (field->is_repeated()) {
switch (field->cpp_type()) {
@@ -301,13 +301,13 @@ size_t Reflection::SpaceUsedLong(const Message& message) const {
case FieldDescriptor::CPPTYPE_MESSAGE:
if (IsMapFieldInApi(field)) {
total_size += GetRaw<internal::MapFieldBase>(message, field)
- .SpaceUsedExcludingSelfLong();
+ .SpaceUsedExcludingSelfLong();
} else {
// We don't know which subclass of RepeatedPtrFieldBase the type is,
// so we use RepeatedPtrFieldBase directly.
total_size +=
GetRaw<RepeatedPtrFieldBase>(message, field)
- .SpaceUsedExcludingSelfLong<GenericTypeHandler<Message> >();
+ .SpaceUsedExcludingSelfLong<GenericTypeHandler<Message> >();
}
break;
@@ -344,8 +344,8 @@ size_t Reflection::SpaceUsedLong(const Message& message) const {
ptr != DefaultRaw<ArenaStringPtr>(field).GetPointer()) {
// string fields are represented by just a pointer, so also
// include sizeof(string) as well.
- total_size +=
- sizeof(*ptr) + StringSpaceUsedExcludingSelfLong(*ptr);
+ total_size +=
+ sizeof(*ptr) + StringSpaceUsedExcludingSelfLong(*ptr);
}
break;
}
@@ -354,13 +354,13 @@ size_t Reflection::SpaceUsedLong(const Message& message) const {
}
case FieldDescriptor::CPPTYPE_MESSAGE:
- if (schema_.IsDefaultInstance(message)) {
+ if (schema_.IsDefaultInstance(message)) {
// For singular fields, the prototype just stores a pointer to the
// external type's prototype, so there is no extra memory usage.
} else {
const Message* sub_message = GetRaw<const Message*>(message, field);
if (sub_message != nullptr) {
- total_size += sub_message->SpaceUsedLong();
+ total_size += sub_message->SpaceUsedLong();
}
}
break;
@@ -847,13 +847,13 @@ void Reflection::Swap(Message* message1, Message* message2) const {
}
Message* temp = message1->New(arena);
- temp->MergeFrom(*message2);
- message2->CopyFrom(*message1);
+ temp->MergeFrom(*message2);
+ message2->CopyFrom(*message1);
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
message1->CopyFrom(*temp);
if (arena == nullptr) delete temp;
#else // PROTOBUF_FORCE_COPY_IN_SWAP
- Swap(message1, temp);
+ Swap(message1, temp);
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
return;
}
@@ -874,27 +874,27 @@ void Reflection::Swap(Message* message1, Message* message2) const {
// Swapping bits need to happen after swapping fields, because the latter may
// depend on the has bit information.
- if (schema_.HasHasbits()) {
+ if (schema_.HasHasbits()) {
uint32* has_bits1 = MutableHasBits(message1);
uint32* has_bits2 = MutableHasBits(message2);
- int fields_with_has_bits = 0;
- for (int i = 0; i < descriptor_->field_count(); i++) {
- const FieldDescriptor* field = descriptor_->field(i);
+ int fields_with_has_bits = 0;
+ for (int i = 0; i < descriptor_->field_count(); i++) {
+ const FieldDescriptor* field = descriptor_->field(i);
if (field->is_repeated() || schema_.InRealOneof(field)) {
- continue;
- }
- fields_with_has_bits++;
- }
-
- int has_bits_size = (fields_with_has_bits + 31) / 32;
-
+ continue;
+ }
+ fields_with_has_bits++;
+ }
+
+ int has_bits_size = (fields_with_has_bits + 31) / 32;
+
for (int i = 0; i < has_bits_size; i++) {
std::swap(has_bits1[i], has_bits2[i]);
}
}
- if (schema_.HasExtensionSet()) {
+ if (schema_.HasExtensionSet()) {
MutableExtensionSet(message1)->Swap(MutableExtensionSet(message2));
}
@@ -958,12 +958,12 @@ void Reflection::SwapFieldsImpl(
} else {
SwapField(message1, message2, field);
}
- // Swap has bit for non-repeated fields. We have already checked for
+ // Swap has bit for non-repeated fields. We have already checked for
// oneof already. This has to be done after SwapField, because SwapField
// may depend on the information in has bits.
- if (!field->is_repeated()) {
- SwapBit(message1, message2, field);
- }
+ if (!field->is_repeated()) {
+ SwapBit(message1, message2, field);
+ }
}
}
}
@@ -1277,12 +1277,12 @@ struct FieldNumberSorter {
return left->number() < right->number();
}
};
-
+
bool IsIndexInHasBitSet(const uint32* has_bit_set, uint32 has_bit_index) {
- GOOGLE_DCHECK_NE(has_bit_index, ~0u);
- return ((has_bit_set[has_bit_index / 32] >> (has_bit_index % 32)) &
- static_cast<uint32>(1)) != 0;
-}
+ GOOGLE_DCHECK_NE(has_bit_index, ~0u);
+ return ((has_bit_set[has_bit_index / 32] >> (has_bit_index % 32)) &
+ static_cast<uint32>(1)) != 0;
+}
bool CreateUnknownEnumValues(const FileDescriptor* file) {
return file->syntax() == FileDescriptor::SYNTAX_PROTO3;
@@ -1303,17 +1303,17 @@ void Reflection::ListFieldsMayFailOnStripped(
output->clear();
// Optimization: The default instance never has any fields set.
- if (schema_.IsDefaultInstance(message)) return;
+ if (schema_.IsDefaultInstance(message)) return;
- // Optimization: Avoid calling GetHasBits() and HasOneofField() many times
- // within the field loop. We allow this violation of ReflectionSchema
+ // Optimization: Avoid calling GetHasBits() and HasOneofField() many times
+ // within the field loop. We allow this violation of ReflectionSchema
// encapsulation because this function takes a noticeable about of CPU
- // fleetwide and properly allowing this optimization through public interfaces
- // seems more trouble than it is worth.
- const uint32* const has_bits =
+ // fleetwide and properly allowing this optimization through public interfaces
+ // seems more trouble than it is worth.
+ const uint32* const has_bits =
schema_.HasHasbits() ? GetHasBits(message) : nullptr;
- const uint32* const has_bits_indices = schema_.has_bit_indices_;
- output->reserve(descriptor_->field_count());
+ const uint32* const has_bits_indices = schema_.has_bit_indices_;
+ output->reserve(descriptor_->field_count());
const int last_non_weak_field_index = last_non_weak_field_index_;
for (int i = 0; i <= last_non_weak_field_index; i++) {
const FieldDescriptor* field = descriptor_->field(i);
@@ -1325,27 +1325,27 @@ void Reflection::ListFieldsMayFailOnStripped(
output->push_back(field);
}
} else {
- const OneofDescriptor* containing_oneof = field->containing_oneof();
+ const OneofDescriptor* containing_oneof = field->containing_oneof();
if (schema_.InRealOneof(field)) {
const uint32* const oneof_case_array = GetConstPointerAtOffset<uint32>(
&message, schema_.oneof_case_offset_);
- // Equivalent to: HasOneofField(message, field)
+ // Equivalent to: HasOneofField(message, field)
if (static_cast<int64>(oneof_case_array[containing_oneof->index()]) ==
field->number()) {
output->push_back(field);
}
} else if (has_bits && has_bits_indices[i] != static_cast<uint32>(-1)) {
CheckInvalidAccess(schema_, field);
- // Equivalent to: HasBit(message, field)
- if (IsIndexInHasBitSet(has_bits, has_bits_indices[i])) {
- output->push_back(field);
- }
- } else if (HasBit(message, field)) { // Fall back on proto3-style HasBit.
+ // Equivalent to: HasBit(message, field)
+ if (IsIndexInHasBitSet(has_bits, has_bits_indices[i])) {
+ output->push_back(field);
+ }
+ } else if (HasBit(message, field)) { // Fall back on proto3-style HasBit.
output->push_back(field);
}
}
}
- if (schema_.HasExtensionSet()) {
+ if (schema_.HasExtensionSet()) {
GetExtensionSet(message).AppendToList(descriptor_, descriptor_pool_,
output);
}
@@ -1788,7 +1788,7 @@ const Message& Reflection::GetMessage(const Message& message,
if (schema_.InRealOneof(field) && !HasOneofField(message, field)) {
return *GetDefaultMessageInstance(field);
}
- const Message* result = GetRaw<const Message*>(message, field);
+ const Message* result = GetRaw<const Message*>(message, field);
if (result == nullptr) {
result = GetDefaultMessageInstance(field);
}
@@ -1809,7 +1809,7 @@ Message* Reflection::MutableMessage(Message* message,
MutableExtensionSet(message)->MutableMessage(field, factory));
} else {
Message* result;
-
+
Message** result_holder = MutableRaw<Message*>(message, field);
if (schema_.InRealOneof(field)) {
@@ -1839,7 +1839,7 @@ void Reflection::UnsafeArenaSetAllocatedMessage(
CheckInvalidAccess(schema_, field);
if (field->is_extension()) {
- MutableExtensionSet(message)->UnsafeArenaSetAllocatedMessage(
+ MutableExtensionSet(message)->UnsafeArenaSetAllocatedMessage(
field->number(), field->type(), field, sub_message);
} else {
if (schema_.InRealOneof(field)) {
@@ -1913,8 +1913,8 @@ Message* Reflection::UnsafeArenaReleaseMessage(Message* message,
factory));
} else {
if (!(field->is_repeated() || schema_.InRealOneof(field))) {
- ClearBit(message, field);
- }
+ ClearBit(message, field);
+ }
if (schema_.InRealOneof(field)) {
if (HasOneofField(*message, field)) {
*MutableOneofCase(message, field->containing_oneof()) = 0;
@@ -2072,10 +2072,10 @@ void* Reflection::MutableRawRepeatedField(Message* message,
} else {
// Trigger transform for MapField
if (IsMapFieldInApi(field)) {
- return MutableRawNonOneof<MapFieldBase>(message, field)
+ return MutableRawNonOneof<MapFieldBase>(message, field)
->MutableRepeatedField();
}
- return MutableRawNonOneof<void>(message, field);
+ return MutableRawNonOneof<void>(message, field);
}
}
@@ -2103,9 +2103,9 @@ const void* Reflection::GetRawRepeatedField(const Message& message,
} else {
// Trigger transform for MapField
if (IsMapFieldInApi(field)) {
- return &(GetRawNonOneof<MapFieldBase>(message, field).GetRepeatedField());
+ return &(GetRawNonOneof<MapFieldBase>(message, field).GetRepeatedField());
}
- return &GetRawNonOneof<char>(message, field);
+ return &GetRawNonOneof<char>(message, field);
}
}
@@ -2202,67 +2202,67 @@ bool Reflection::SupportsUnknownEnumValues() const {
// These simple template accessors obtain pointers (or references) to
// the given field.
-
-template <class Type>
+
+template <class Type>
const Type& Reflection::GetRawNonOneof(const Message& message,
const FieldDescriptor* field) const {
- return GetConstRefAtOffset<Type>(message,
- schema_.GetFieldOffsetNonOneof(field));
-}
-
-template <class Type>
+ return GetConstRefAtOffset<Type>(message,
+ schema_.GetFieldOffsetNonOneof(field));
+}
+
+template <class Type>
Type* Reflection::MutableRawNonOneof(Message* message,
const FieldDescriptor* field) const {
- return GetPointerAtOffset<Type>(message,
- schema_.GetFieldOffsetNonOneof(field));
-}
-
+ return GetPointerAtOffset<Type>(message,
+ schema_.GetFieldOffsetNonOneof(field));
+}
+
template <typename Type>
const Type& Reflection::GetRaw(const Message& message,
const FieldDescriptor* field) const {
GOOGLE_DCHECK(!schema_.InRealOneof(field) || HasOneofField(message, field))
<< "Field = " << field->full_name();
- return GetConstRefAtOffset<Type>(message, schema_.GetFieldOffset(field));
+ return GetConstRefAtOffset<Type>(message, schema_.GetFieldOffset(field));
}
template <typename Type>
Type* Reflection::MutableRaw(Message* message,
const FieldDescriptor* field) const {
- return GetPointerAtOffset<Type>(message, schema_.GetFieldOffset(field));
+ return GetPointerAtOffset<Type>(message, schema_.GetFieldOffset(field));
}
const uint32* Reflection::GetHasBits(const Message& message) const {
- GOOGLE_DCHECK(schema_.HasHasbits());
- return &GetConstRefAtOffset<uint32>(message, schema_.HasBitsOffset());
+ GOOGLE_DCHECK(schema_.HasHasbits());
+ return &GetConstRefAtOffset<uint32>(message, schema_.HasBitsOffset());
}
-
+
uint32* Reflection::MutableHasBits(Message* message) const {
- GOOGLE_DCHECK(schema_.HasHasbits());
- return GetPointerAtOffset<uint32>(message, schema_.HasBitsOffset());
+ GOOGLE_DCHECK(schema_.HasHasbits());
+ return GetPointerAtOffset<uint32>(message, schema_.HasBitsOffset());
}
uint32 Reflection::GetOneofCase(const Message& message,
const OneofDescriptor* oneof_descriptor) const {
GOOGLE_DCHECK(!oneof_descriptor->is_synthetic());
- return GetConstRefAtOffset<uint32>(
- message, schema_.GetOneofCaseOffset(oneof_descriptor));
+ return GetConstRefAtOffset<uint32>(
+ message, schema_.GetOneofCaseOffset(oneof_descriptor));
}
uint32* Reflection::MutableOneofCase(
- Message* message, const OneofDescriptor* oneof_descriptor) const {
+ Message* message, const OneofDescriptor* oneof_descriptor) const {
GOOGLE_DCHECK(!oneof_descriptor->is_synthetic());
- return GetPointerAtOffset<uint32>(
- message, schema_.GetOneofCaseOffset(oneof_descriptor));
+ return GetPointerAtOffset<uint32>(
+ message, schema_.GetOneofCaseOffset(oneof_descriptor));
}
const ExtensionSet& Reflection::GetExtensionSet(const Message& message) const {
- return GetConstRefAtOffset<ExtensionSet>(message,
- schema_.GetExtensionSetOffset());
+ return GetConstRefAtOffset<ExtensionSet>(message,
+ schema_.GetExtensionSetOffset());
}
-
+
ExtensionSet* Reflection::MutableExtensionSet(Message* message) const {
- return GetPointerAtOffset<ExtensionSet>(message,
- schema_.GetExtensionSetOffset());
+ return GetPointerAtOffset<ExtensionSet>(message,
+ schema_.GetExtensionSetOffset());
}
const InternalMetadata& Reflection::GetInternalMetadata(
@@ -2279,84 +2279,84 @@ InternalMetadata* Reflection::MutableInternalMetadata(Message* message) const {
// Simple accessors for manipulating has_bits_.
bool Reflection::HasBit(const Message& message,
const FieldDescriptor* field) const {
- GOOGLE_DCHECK(!field->options().weak());
+ GOOGLE_DCHECK(!field->options().weak());
if (schema_.HasBitIndex(field) != static_cast<uint32>(-1)) {
- return IsIndexInHasBitSet(GetHasBits(message), schema_.HasBitIndex(field));
- }
+ return IsIndexInHasBitSet(GetHasBits(message), schema_.HasBitIndex(field));
+ }
// Intentionally check here because HasBitIndex(field) != -1 means valid.
CheckInvalidAccess(schema_, field);
- // proto3: no has-bits. All fields present except messages, which are
+ // proto3: no has-bits. All fields present except messages, which are
// present only if their message-field pointer is non-null.
- if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
- return !schema_.IsDefaultInstance(message) &&
+ if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
+ return !schema_.IsDefaultInstance(message) &&
GetRaw<const Message*>(message, field) != nullptr;
- } else {
- // Non-message field (and non-oneof, since that was handled in HasField()
- // before calling us), and singular (again, checked in HasField). So, this
- // field must be a scalar.
-
- // Scalar primitive (numeric or string/bytes) fields are present if
+ } else {
+ // Non-message field (and non-oneof, since that was handled in HasField()
+ // before calling us), and singular (again, checked in HasField). So, this
+ // field must be a scalar.
+
+ // Scalar primitive (numeric or string/bytes) fields are present if
// their value is non-zero (numeric) or non-empty (string/bytes). N.B.:
- // we must use this definition here, rather than the "scalar fields
- // always present" in the proto3 docs, because MergeFrom() semantics
- // require presence as "present on wire", and reflection-based merge
- // (which uses HasField()) needs to be consistent with this.
- switch (field->cpp_type()) {
- case FieldDescriptor::CPPTYPE_STRING:
- switch (field->options().ctype()) {
- default: {
- return GetField<ArenaStringPtr>(message, field).Get().size() > 0;
+ // we must use this definition here, rather than the "scalar fields
+ // always present" in the proto3 docs, because MergeFrom() semantics
+ // require presence as "present on wire", and reflection-based merge
+ // (which uses HasField()) needs to be consistent with this.
+ switch (field->cpp_type()) {
+ case FieldDescriptor::CPPTYPE_STRING:
+ switch (field->options().ctype()) {
+ default: {
+ return GetField<ArenaStringPtr>(message, field).Get().size() > 0;
}
- }
- return false;
- case FieldDescriptor::CPPTYPE_BOOL:
- return GetRaw<bool>(message, field) != false;
- case FieldDescriptor::CPPTYPE_INT32:
- return GetRaw<int32>(message, field) != 0;
- case FieldDescriptor::CPPTYPE_INT64:
- return GetRaw<int64>(message, field) != 0;
- case FieldDescriptor::CPPTYPE_UINT32:
- return GetRaw<uint32>(message, field) != 0;
- case FieldDescriptor::CPPTYPE_UINT64:
- return GetRaw<uint64>(message, field) != 0;
- case FieldDescriptor::CPPTYPE_FLOAT:
- return GetRaw<float>(message, field) != 0.0;
- case FieldDescriptor::CPPTYPE_DOUBLE:
- return GetRaw<double>(message, field) != 0.0;
- case FieldDescriptor::CPPTYPE_ENUM:
- return GetRaw<int>(message, field) != 0;
- case FieldDescriptor::CPPTYPE_MESSAGE:
- // handled above; avoid warning
- break;
- }
- GOOGLE_LOG(FATAL) << "Reached impossible case in HasBit().";
- return false;
+ }
+ return false;
+ case FieldDescriptor::CPPTYPE_BOOL:
+ return GetRaw<bool>(message, field) != false;
+ case FieldDescriptor::CPPTYPE_INT32:
+ return GetRaw<int32>(message, field) != 0;
+ case FieldDescriptor::CPPTYPE_INT64:
+ return GetRaw<int64>(message, field) != 0;
+ case FieldDescriptor::CPPTYPE_UINT32:
+ return GetRaw<uint32>(message, field) != 0;
+ case FieldDescriptor::CPPTYPE_UINT64:
+ return GetRaw<uint64>(message, field) != 0;
+ case FieldDescriptor::CPPTYPE_FLOAT:
+ return GetRaw<float>(message, field) != 0.0;
+ case FieldDescriptor::CPPTYPE_DOUBLE:
+ return GetRaw<double>(message, field) != 0.0;
+ case FieldDescriptor::CPPTYPE_ENUM:
+ return GetRaw<int>(message, field) != 0;
+ case FieldDescriptor::CPPTYPE_MESSAGE:
+ // handled above; avoid warning
+ break;
+ }
+ GOOGLE_LOG(FATAL) << "Reached impossible case in HasBit().";
+ return false;
}
}
void Reflection::SetBit(Message* message, const FieldDescriptor* field) const {
- GOOGLE_DCHECK(!field->options().weak());
- const uint32 index = schema_.HasBitIndex(field);
+ GOOGLE_DCHECK(!field->options().weak());
+ const uint32 index = schema_.HasBitIndex(field);
if (index == static_cast<uint32>(-1)) return;
- MutableHasBits(message)[index / 32] |=
- (static_cast<uint32>(1) << (index % 32));
+ MutableHasBits(message)[index / 32] |=
+ (static_cast<uint32>(1) << (index % 32));
}
void Reflection::ClearBit(Message* message,
const FieldDescriptor* field) const {
- GOOGLE_DCHECK(!field->options().weak());
- const uint32 index = schema_.HasBitIndex(field);
+ GOOGLE_DCHECK(!field->options().weak());
+ const uint32 index = schema_.HasBitIndex(field);
if (index == static_cast<uint32>(-1)) return;
- MutableHasBits(message)[index / 32] &=
- ~(static_cast<uint32>(1) << (index % 32));
+ MutableHasBits(message)[index / 32] &=
+ ~(static_cast<uint32>(1) << (index % 32));
}
void Reflection::SwapBit(Message* message1, Message* message2,
const FieldDescriptor* field) const {
- GOOGLE_DCHECK(!field->options().weak());
- if (!schema_.HasHasbits()) {
+ GOOGLE_DCHECK(!field->options().weak());
+ if (!schema_.HasHasbits()) {
return;
}
bool temp_has_bit = HasBit(*message1, field);
@@ -2568,7 +2568,7 @@ void* Reflection::RepeatedFieldData(Message* message,
return MutableExtensionSet(message)->MutableRawRepeatedField(
field->number(), field->type(), field->is_packed(), field);
} else {
- return MutableRawNonOneof<char>(message, field);
+ return MutableRawNonOneof<char>(message, field);
}
}
@@ -2586,51 +2586,51 @@ const MapFieldBase* Reflection::GetMapData(const Message& message,
return &(GetRaw<MapFieldBase>(message, field));
}
-namespace {
-
-// Helper function to transform migration schema into reflection schema.
-ReflectionSchema MigrationToReflectionSchema(
- const Message* const* default_instance, const uint32* offsets,
- MigrationSchema migration_schema) {
- ReflectionSchema result;
- result.default_instance_ = *default_instance;
- // First 6 offsets are offsets to the special fields. The following offsets
- // are the proto fields.
- result.offsets_ = offsets + migration_schema.offsets_index + 5;
- result.has_bit_indices_ = offsets + migration_schema.has_bit_indices_index;
- result.has_bits_offset_ = offsets[migration_schema.offsets_index + 0];
- result.metadata_offset_ = offsets[migration_schema.offsets_index + 1];
- result.extensions_offset_ = offsets[migration_schema.offsets_index + 2];
- result.oneof_case_offset_ = offsets[migration_schema.offsets_index + 3];
- result.object_size_ = migration_schema.object_size;
- result.weak_field_map_offset_ = offsets[migration_schema.offsets_index + 4];
- return result;
+namespace {
+
+// Helper function to transform migration schema into reflection schema.
+ReflectionSchema MigrationToReflectionSchema(
+ const Message* const* default_instance, const uint32* offsets,
+ MigrationSchema migration_schema) {
+ ReflectionSchema result;
+ result.default_instance_ = *default_instance;
+ // First 6 offsets are offsets to the special fields. The following offsets
+ // are the proto fields.
+ result.offsets_ = offsets + migration_schema.offsets_index + 5;
+ result.has_bit_indices_ = offsets + migration_schema.has_bit_indices_index;
+ result.has_bits_offset_ = offsets[migration_schema.offsets_index + 0];
+ result.metadata_offset_ = offsets[migration_schema.offsets_index + 1];
+ result.extensions_offset_ = offsets[migration_schema.offsets_index + 2];
+ result.oneof_case_offset_ = offsets[migration_schema.offsets_index + 3];
+ result.object_size_ = migration_schema.object_size;
+ result.weak_field_map_offset_ = offsets[migration_schema.offsets_index + 4];
+ return result;
}
} // namespace
-class AssignDescriptorsHelper {
- public:
- AssignDescriptorsHelper(MessageFactory* factory,
- Metadata* file_level_metadata,
- const EnumDescriptor** file_level_enum_descriptors,
+class AssignDescriptorsHelper {
+ public:
+ AssignDescriptorsHelper(MessageFactory* factory,
+ Metadata* file_level_metadata,
+ const EnumDescriptor** file_level_enum_descriptors,
const MigrationSchema* schemas,
- const Message* const* default_instance_data,
- const uint32* offsets)
- : factory_(factory),
- file_level_metadata_(file_level_metadata),
- file_level_enum_descriptors_(file_level_enum_descriptors),
- schemas_(schemas),
- default_instance_data_(default_instance_data),
- offsets_(offsets) {}
-
- void AssignMessageDescriptor(const Descriptor* descriptor) {
- for (int i = 0; i < descriptor->nested_type_count(); i++) {
- AssignMessageDescriptor(descriptor->nested_type(i));
- }
-
- file_level_metadata_->descriptor = descriptor;
-
+ const Message* const* default_instance_data,
+ const uint32* offsets)
+ : factory_(factory),
+ file_level_metadata_(file_level_metadata),
+ file_level_enum_descriptors_(file_level_enum_descriptors),
+ schemas_(schemas),
+ default_instance_data_(default_instance_data),
+ offsets_(offsets) {}
+
+ void AssignMessageDescriptor(const Descriptor* descriptor) {
+ for (int i = 0; i < descriptor->nested_type_count(); i++) {
+ AssignMessageDescriptor(descriptor->nested_type(i));
+ }
+
+ file_level_metadata_->descriptor = descriptor;
+
file_level_metadata_->reflection =
new Reflection(descriptor,
MigrationToReflectionSchema(default_instance_data_,
@@ -2638,34 +2638,34 @@ class AssignDescriptorsHelper {
DescriptorPool::internal_generated_pool(), factory_);
for (int i = 0; i < descriptor->enum_type_count(); i++) {
AssignEnumDescriptor(descriptor->enum_type(i));
- }
+ }
schemas_++;
- default_instance_data_++;
- file_level_metadata_++;
- }
-
- void AssignEnumDescriptor(const EnumDescriptor* descriptor) {
- *file_level_enum_descriptors_ = descriptor;
- file_level_enum_descriptors_++;
- }
-
- const Metadata* GetCurrentMetadataPtr() const { return file_level_metadata_; }
-
- private:
- MessageFactory* factory_;
- Metadata* file_level_metadata_;
- const EnumDescriptor** file_level_enum_descriptors_;
+ default_instance_data_++;
+ file_level_metadata_++;
+ }
+
+ void AssignEnumDescriptor(const EnumDescriptor* descriptor) {
+ *file_level_enum_descriptors_ = descriptor;
+ file_level_enum_descriptors_++;
+ }
+
+ const Metadata* GetCurrentMetadataPtr() const { return file_level_metadata_; }
+
+ private:
+ MessageFactory* factory_;
+ Metadata* file_level_metadata_;
+ const EnumDescriptor** file_level_enum_descriptors_;
const MigrationSchema* schemas_;
const Message* const* default_instance_data_;
- const uint32* offsets_;
-};
-
+ const uint32* offsets_;
+};
+
namespace {
-// We have the routines that assign descriptors and build reflection
-// automatically delete the allocated reflection. MetadataOwner owns
-// all the allocated reflection instances.
-struct MetadataOwner {
+// We have the routines that assign descriptors and build reflection
+// automatically delete the allocated reflection. MetadataOwner owns
+// all the allocated reflection instances.
+struct MetadataOwner {
~MetadataOwner() {
for (auto range : metadata_arrays_) {
for (const Metadata* m = range.first; m < range.second; m++) {
@@ -2674,26 +2674,26 @@ struct MetadataOwner {
}
}
- void AddArray(const Metadata* begin, const Metadata* end) {
+ void AddArray(const Metadata* begin, const Metadata* end) {
mu_.Lock();
- metadata_arrays_.push_back(std::make_pair(begin, end));
+ metadata_arrays_.push_back(std::make_pair(begin, end));
mu_.Unlock();
- }
-
- static MetadataOwner* Instance() {
+ }
+
+ static MetadataOwner* Instance() {
static MetadataOwner* res = OnShutdownDelete(new MetadataOwner);
- return res;
- }
-
- private:
+ return res;
+ }
+
+ private:
MetadataOwner() = default; // private because singleton
-
+
WrappedMutex mu_;
- std::vector<std::pair<const Metadata*, const Metadata*> > metadata_arrays_;
-};
-
+ std::vector<std::pair<const Metadata*, const Metadata*> > metadata_arrays_;
+};
+
void AddDescriptors(const DescriptorTable* table);
-
+
void AssignDescriptorsImpl(const DescriptorTable* table, bool eager) {
// Ensure the file descriptor is added to the pool.
{
@@ -2722,31 +2722,31 @@ void AssignDescriptorsImpl(const DescriptorTable* table, bool eager) {
if (table->deps[i]) AssignDescriptors(table->deps[i], true);
}
}
-
+
// Fill the arrays with pointers to descriptors and reflection classes.
const FileDescriptor* file =
DescriptorPool::internal_generated_pool()->FindFileByName(
table->filename);
GOOGLE_CHECK(file != nullptr);
-
+
MessageFactory* factory = MessageFactory::generated_factory();
-
+
AssignDescriptorsHelper helper(
factory, table->file_level_metadata, table->file_level_enum_descriptors,
table->schemas, table->default_instances, table->offsets);
- for (int i = 0; i < file->message_type_count(); i++) {
- helper.AssignMessageDescriptor(file->message_type(i));
- }
-
- for (int i = 0; i < file->enum_type_count(); i++) {
- helper.AssignEnumDescriptor(file->enum_type(i));
- }
- if (file->options().cc_generic_services()) {
- for (int i = 0; i < file->service_count(); i++) {
+ for (int i = 0; i < file->message_type_count(); i++) {
+ helper.AssignMessageDescriptor(file->message_type(i));
+ }
+
+ for (int i = 0; i < file->enum_type_count(); i++) {
+ helper.AssignEnumDescriptor(file->enum_type(i));
+ }
+ if (file->options().cc_generic_services()) {
+ for (int i = 0; i < file->service_count(); i++) {
table->file_level_service_descriptors[i] = file->service(i);
- }
- }
+ }
+ }
MetadataOwner::Instance()->AddArray(table->file_level_metadata,
helper.GetCurrentMetadataPtr());
}
@@ -2782,15 +2782,15 @@ void AddDescriptors(const DescriptorTable* table) {
// Separate function because it needs to be a friend of
// Reflection
-void RegisterAllTypesInternal(const Metadata* file_level_metadata, int size) {
- for (int i = 0; i < size; i++) {
+void RegisterAllTypesInternal(const Metadata* file_level_metadata, int size) {
+ for (int i = 0; i < size; i++) {
const Reflection* reflection = file_level_metadata[i].reflection;
MessageFactory::InternalRegisterGeneratedMessage(
file_level_metadata[i].descriptor,
reflection->schema_.default_instance_);
- }
-}
-
+ }
+}
+
namespace internal {
Metadata AssignDescriptors(const DescriptorTable* (*table)(),
@@ -2807,8 +2807,8 @@ Metadata AssignDescriptors(const DescriptorTable* (*table)(),
void AssignDescriptors(const DescriptorTable* table, bool eager) {
if (!eager) eager = table->is_eager;
call_once(*table->once, AssignDescriptorsImpl, table, eager);
-}
-
+}
+
AddDescriptorsRunner::AddDescriptorsRunner(const DescriptorTable* table) {
AddDescriptors(table);
}
@@ -2818,19 +2818,19 @@ void RegisterFileLevelMetadata(const DescriptorTable* table) {
RegisterAllTypesInternal(table->file_level_metadata, table->num_messages);
}
-void UnknownFieldSetSerializer(const uint8* base, uint32 offset, uint32 tag,
- uint32 has_offset,
+void UnknownFieldSetSerializer(const uint8* base, uint32 offset, uint32 tag,
+ uint32 has_offset,
io::CodedOutputStream* output) {
- const void* ptr = base + offset;
+ const void* ptr = base + offset;
const InternalMetadata* metadata = static_cast<const InternalMetadata*>(ptr);
- if (metadata->have_unknown_fields()) {
+ if (metadata->have_unknown_fields()) {
internal::WireFormat::SerializeUnknownFields(
metadata->unknown_fields<UnknownFieldSet>(
UnknownFieldSet::default_instance),
output);
- }
-}
-
+ }
+}
+
} // namespace internal
} // namespace protobuf
} // namespace google
diff --git a/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.h b/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.h
index fb5b6cf4e2..1771b474c7 100644
--- a/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.h
+++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.h
@@ -62,7 +62,7 @@ class MapValueRef;
class MessageLayoutInspector;
class Message;
struct Metadata;
-} // namespace protobuf
+} // namespace protobuf
} // namespace google
namespace google {
@@ -73,131 +73,131 @@ class DefaultEmptyOneof;
class ExtensionSet; // extension_set.h
class WeakFieldMap; // weak_field_map.h
-// This struct describes the internal layout of the message, hence this is
-// used to act on the message reflectively.
-// default_instance: The default instance of the message. This is only
-// used to obtain pointers to default instances of embedded
-// messages, which GetMessage() will return if the particular
-// sub-message has not been initialized yet. (Thus, all
+// This struct describes the internal layout of the message, hence this is
+// used to act on the message reflectively.
+// default_instance: The default instance of the message. This is only
+// used to obtain pointers to default instances of embedded
+// messages, which GetMessage() will return if the particular
+// sub-message has not been initialized yet. (Thus, all
// embedded message fields *must* have non-null pointers
-// in the default instance.)
-// offsets: An array of ints giving the byte offsets.
-// For each oneof or weak field, the offset is relative to the
-// default_instance. These can be computed at compile time
-// using the
+// in the default instance.)
+// offsets: An array of ints giving the byte offsets.
+// For each oneof or weak field, the offset is relative to the
+// default_instance. These can be computed at compile time
+// using the
// PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET()
-// macro. For each none oneof field, the offset is related to
-// the start of the message object. These can be computed at
-// compile time using the
+// macro. For each none oneof field, the offset is related to
+// the start of the message object. These can be computed at
+// compile time using the
// PROTO2_GENERATED_MESSAGE_FIELD_OFFSET() macro.
-// Besides offsets for all fields, this array also contains
-// offsets for oneof unions. The offset of the i-th oneof union
-// is offsets[descriptor->field_count() + i].
-// has_bit_indices: Mapping from field indexes to their index in the has
-// bit array.
-// has_bits_offset: Offset in the message of an array of uint32s of size
-// descriptor->field_count()/32, rounded up. This is a
-// bitfield where each bit indicates whether or not the
-// corresponding field of the message has been initialized.
-// The bit for field index i is obtained by the expression:
-// has_bits[i / 32] & (1 << (i % 32))
-// unknown_fields_offset: Offset in the message of the UnknownFieldSet for
-// the message.
-// extensions_offset: Offset in the message of the ExtensionSet for the
-// message, or -1 if the message type has no extension
-// ranges.
-// oneof_case_offset: Offset in the message of an array of uint32s of
-// size descriptor->oneof_decl_count(). Each uint32
-// indicates what field is set for each oneof.
-// object_size: The size of a message object of this type, as measured
-// by sizeof().
-// arena_offset: If a message doesn't have a unknown_field_set that stores
-// the arena, it must have a direct pointer to the arena.
-// weak_field_map_offset: If the message proto has weak fields, this is the
-// offset of _weak_field_map_ in the generated proto. Otherwise
-// -1.
-struct ReflectionSchema {
- public:
- // Size of a google::protobuf::Message object of this type.
- uint32 GetObjectSize() const { return static_cast<uint32>(object_size_); }
-
+// Besides offsets for all fields, this array also contains
+// offsets for oneof unions. The offset of the i-th oneof union
+// is offsets[descriptor->field_count() + i].
+// has_bit_indices: Mapping from field indexes to their index in the has
+// bit array.
+// has_bits_offset: Offset in the message of an array of uint32s of size
+// descriptor->field_count()/32, rounded up. This is a
+// bitfield where each bit indicates whether or not the
+// corresponding field of the message has been initialized.
+// The bit for field index i is obtained by the expression:
+// has_bits[i / 32] & (1 << (i % 32))
+// unknown_fields_offset: Offset in the message of the UnknownFieldSet for
+// the message.
+// extensions_offset: Offset in the message of the ExtensionSet for the
+// message, or -1 if the message type has no extension
+// ranges.
+// oneof_case_offset: Offset in the message of an array of uint32s of
+// size descriptor->oneof_decl_count(). Each uint32
+// indicates what field is set for each oneof.
+// object_size: The size of a message object of this type, as measured
+// by sizeof().
+// arena_offset: If a message doesn't have a unknown_field_set that stores
+// the arena, it must have a direct pointer to the arena.
+// weak_field_map_offset: If the message proto has weak fields, this is the
+// offset of _weak_field_map_ in the generated proto. Otherwise
+// -1.
+struct ReflectionSchema {
+ public:
+ // Size of a google::protobuf::Message object of this type.
+ uint32 GetObjectSize() const { return static_cast<uint32>(object_size_); }
+
bool InRealOneof(const FieldDescriptor* field) const {
return field->containing_oneof() &&
!field->containing_oneof()->is_synthetic();
}
- // Offset of a non-oneof field. Getting a field offset is slightly more
- // efficient when we know statically that it is not a oneof field.
- uint32 GetFieldOffsetNonOneof(const FieldDescriptor* field) const {
+ // Offset of a non-oneof field. Getting a field offset is slightly more
+ // efficient when we know statically that it is not a oneof field.
+ uint32 GetFieldOffsetNonOneof(const FieldDescriptor* field) const {
GOOGLE_DCHECK(!InRealOneof(field));
return OffsetValue(offsets_[field->index()], field->type());
- }
-
- // Offset of any field.
- uint32 GetFieldOffset(const FieldDescriptor* field) const {
+ }
+
+ // Offset of any field.
+ uint32 GetFieldOffset(const FieldDescriptor* field) const {
if (InRealOneof(field)) {
- size_t offset =
- static_cast<size_t>(field->containing_type()->field_count() +
+ size_t offset =
+ static_cast<size_t>(field->containing_type()->field_count() +
field->containing_oneof()->index());
return OffsetValue(offsets_[offset], field->type());
- } else {
- return GetFieldOffsetNonOneof(field);
- }
- }
-
- uint32 GetOneofCaseOffset(const OneofDescriptor* oneof_descriptor) const {
- return static_cast<uint32>(oneof_case_offset_) +
+ } else {
+ return GetFieldOffsetNonOneof(field);
+ }
+ }
+
+ uint32 GetOneofCaseOffset(const OneofDescriptor* oneof_descriptor) const {
+ return static_cast<uint32>(oneof_case_offset_) +
static_cast<uint32>(static_cast<size_t>(oneof_descriptor->index()) *
sizeof(uint32));
- }
-
- bool HasHasbits() const { return has_bits_offset_ != -1; }
-
- // Bit index within the bit array of hasbits. Bit order is low-to-high.
- uint32 HasBitIndex(const FieldDescriptor* field) const {
+ }
+
+ bool HasHasbits() const { return has_bits_offset_ != -1; }
+
+ // Bit index within the bit array of hasbits. Bit order is low-to-high.
+ uint32 HasBitIndex(const FieldDescriptor* field) const {
if (has_bits_offset_ == -1) return static_cast<uint32>(-1);
- GOOGLE_DCHECK(HasHasbits());
- return has_bit_indices_[field->index()];
- }
-
- // Byte offset of the hasbits array.
- uint32 HasBitsOffset() const {
- GOOGLE_DCHECK(HasHasbits());
- return static_cast<uint32>(has_bits_offset_);
- }
-
- // The offset of the InternalMetadataWithArena member.
- // For Lite this will actually be an InternalMetadataWithArenaLite.
- // The schema doesn't contain enough information to distinguish between
- // these two cases.
- uint32 GetMetadataOffset() const {
- return static_cast<uint32>(metadata_offset_);
- }
-
- // Whether this message has an ExtensionSet.
- bool HasExtensionSet() const { return extensions_offset_ != -1; }
-
- // The offset of the ExtensionSet in this message.
- uint32 GetExtensionSetOffset() const {
- GOOGLE_DCHECK(HasExtensionSet());
- return static_cast<uint32>(extensions_offset_);
- }
-
- // The off set of WeakFieldMap when the message contains weak fields.
- // The default is 0 for now.
- int GetWeakFieldMapOffset() const { return weak_field_map_offset_; }
-
- bool IsDefaultInstance(const Message& message) const {
- return &message == default_instance_;
- }
-
- // Returns a pointer to the default value for this field. The size and type
- // of the underlying data depends on the field's type.
+ GOOGLE_DCHECK(HasHasbits());
+ return has_bit_indices_[field->index()];
+ }
+
+ // Byte offset of the hasbits array.
+ uint32 HasBitsOffset() const {
+ GOOGLE_DCHECK(HasHasbits());
+ return static_cast<uint32>(has_bits_offset_);
+ }
+
+ // The offset of the InternalMetadataWithArena member.
+ // For Lite this will actually be an InternalMetadataWithArenaLite.
+ // The schema doesn't contain enough information to distinguish between
+ // these two cases.
+ uint32 GetMetadataOffset() const {
+ return static_cast<uint32>(metadata_offset_);
+ }
+
+ // Whether this message has an ExtensionSet.
+ bool HasExtensionSet() const { return extensions_offset_ != -1; }
+
+ // The offset of the ExtensionSet in this message.
+ uint32 GetExtensionSetOffset() const {
+ GOOGLE_DCHECK(HasExtensionSet());
+ return static_cast<uint32>(extensions_offset_);
+ }
+
+ // The off set of WeakFieldMap when the message contains weak fields.
+ // The default is 0 for now.
+ int GetWeakFieldMapOffset() const { return weak_field_map_offset_; }
+
+ bool IsDefaultInstance(const Message& message) const {
+ return &message == default_instance_;
+ }
+
+ // Returns a pointer to the default value for this field. The size and type
+ // of the underlying data depends on the field's type.
const void* GetFieldDefault(const FieldDescriptor* field) const {
- return reinterpret_cast<const uint8*>(default_instance_) +
+ return reinterpret_cast<const uint8*>(default_instance_) +
OffsetValue(offsets_[field->index()], field->type());
- }
-
+ }
+
// Returns true if the field is implicitly backed by LazyField.
bool IsEagerlyVerifiedLazyField(const FieldDescriptor* field) const {
GOOGLE_DCHECK_EQ(field->type(), FieldDescriptor::TYPE_MESSAGE);
@@ -211,7 +211,7 @@ struct ReflectionSchema {
(void)field;
return true;
}
-
+
bool IsFieldStripped(const FieldDescriptor* field) const {
(void)field;
return false;
@@ -223,23 +223,23 @@ struct ReflectionSchema {
}
- bool HasWeakFields() const { return weak_field_map_offset_ > 0; }
-
- // These members are intended to be private, but we cannot actually make them
- // private because this prevents us from using aggregate initialization of
- // them, ie.
- //
- // ReflectionSchema schema = {a, b, c, d, e, ...};
+ bool HasWeakFields() const { return weak_field_map_offset_ > 0; }
+
+ // These members are intended to be private, but we cannot actually make them
+ // private because this prevents us from using aggregate initialization of
+ // them, ie.
+ //
+ // ReflectionSchema schema = {a, b, c, d, e, ...};
// private:
- const Message* default_instance_;
- const uint32* offsets_;
- const uint32* has_bit_indices_;
- int has_bits_offset_;
- int metadata_offset_;
- int extensions_offset_;
- int oneof_case_offset_;
- int object_size_;
- int weak_field_map_offset_;
+ const Message* default_instance_;
+ const uint32* offsets_;
+ const uint32* has_bit_indices_;
+ int has_bits_offset_;
+ int metadata_offset_;
+ int extensions_offset_;
+ int oneof_case_offset_;
+ int object_size_;
+ int weak_field_map_offset_;
// We tag offset values to provide additional data about fields (such as
// "unused" or "lazy").
@@ -249,20 +249,20 @@ struct ReflectionSchema {
}
return v & 0x7FFFFFFFu;
}
-};
-
-// Structs that the code generator emits directly to describe a message.
-// These should never used directly except to build a ReflectionSchema
-// object.
-//
-// EXPERIMENTAL: these are changing rapidly, and may completely disappear
-// or merge with ReflectionSchema.
-struct MigrationSchema {
- int32 offsets_index;
- int32 has_bit_indices_index;
- int object_size;
-};
-
+};
+
+// Structs that the code generator emits directly to describe a message.
+// These should never used directly except to build a ReflectionSchema
+// object.
+//
+// EXPERIMENTAL: these are changing rapidly, and may completely disappear
+// or merge with ReflectionSchema.
+struct MigrationSchema {
+ int32 offsets_index;
+ int32 has_bit_indices_index;
+ int object_size;
+};
+
// This struct tries to reduce unnecessary padding.
// The num_xxx might not be close to their respective pointer, but this saves
// padding.
diff --git a/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven.cc b/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven.cc
index 9b69fa86e8..56f1a6af84 100644
--- a/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven.cc
@@ -1,103 +1,103 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
#include <google/protobuf/generated_message_table_driven.h>
-
+
#include <type_traits>
-
+
#include <google/protobuf/stubs/casts.h>
#include <google/protobuf/generated_message_table_driven_lite.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/wire_format.h>
#include <google/protobuf/wire_format_lite.h>
-
-namespace google {
-namespace protobuf {
-namespace internal {
-
-namespace {
-
-UnknownFieldSet* MutableUnknownFields(MessageLite* msg, int64 arena_offset) {
+
+namespace google {
+namespace protobuf {
+namespace internal {
+
+namespace {
+
+UnknownFieldSet* MutableUnknownFields(MessageLite* msg, int64 arena_offset) {
return Raw<InternalMetadata>(msg, arena_offset)
->mutable_unknown_fields<UnknownFieldSet>();
-}
-
-struct UnknownFieldHandler {
+}
+
+struct UnknownFieldHandler {
// TODO(mvels): consider renaming UnknownFieldHandler to (TableDrivenTraits?),
// and conflating InternalMetaData into it, simplifying the template.
static constexpr bool IsLite() { return false; }
- static bool Skip(MessageLite* msg, const ParseTable& table,
+ static bool Skip(MessageLite* msg, const ParseTable& table,
io::CodedInputStream* input, int tag) {
- GOOGLE_DCHECK(table.unknown_field_set);
-
- return WireFormat::SkipField(input, tag,
+ GOOGLE_DCHECK(table.unknown_field_set);
+
+ return WireFormat::SkipField(input, tag,
MutableUnknownFields(msg, table.arena_offset));
- }
-
+ }
+
static void Varint(MessageLite* msg, const ParseTable& table, int tag,
int value) {
- GOOGLE_DCHECK(table.unknown_field_set);
-
+ GOOGLE_DCHECK(table.unknown_field_set);
+
MutableUnknownFields(msg, table.arena_offset)
->AddVarint(WireFormatLite::GetTagFieldNumber(tag), value);
- }
-
+ }
+
static bool ParseExtension(MessageLite* msg, const ParseTable& table,
io::CodedInputStream* input, int tag) {
- ExtensionSet* extensions = GetExtensionSet(msg, table.extension_offset);
- if (extensions == NULL) {
- return false;
- }
-
+ ExtensionSet* extensions = GetExtensionSet(msg, table.extension_offset);
+ if (extensions == NULL) {
+ return false;
+ }
+
const Message* prototype =
down_cast<const Message*>(table.default_instance());
-
- GOOGLE_DCHECK(prototype != NULL);
- GOOGLE_DCHECK(table.unknown_field_set);
- UnknownFieldSet* unknown_fields =
- MutableUnknownFields(msg, table.arena_offset);
-
- return extensions->ParseField(tag, input, prototype, unknown_fields);
- }
-};
-
-} // namespace
-
+
+ GOOGLE_DCHECK(prototype != NULL);
+ GOOGLE_DCHECK(table.unknown_field_set);
+ UnknownFieldSet* unknown_fields =
+ MutableUnknownFields(msg, table.arena_offset);
+
+ return extensions->ParseField(tag, input, prototype, unknown_fields);
+ }
+};
+
+} // namespace
+
bool MergePartialFromCodedStream(MessageLite* msg, const ParseTable& table,
io::CodedInputStream* input) {
return MergePartialFromCodedStreamImpl<UnknownFieldHandler>(msg, table,
input);
-}
-
-} // namespace internal
-} // namespace protobuf
-} // namespace google
+}
+
+} // namespace internal
+} // namespace protobuf
+} // namespace google
diff --git a/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven.h b/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven.h
index 687bb16910..def4a1fa2c 100644
--- a/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven.h
+++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven.h
@@ -1,83 +1,83 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef GOOGLE_PROTOBUF_GENERATED_MESSAGE_TABLE_DRIVEN_H__
-#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_TABLE_DRIVEN_H__
-
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_GENERATED_MESSAGE_TABLE_DRIVEN_H__
+#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_TABLE_DRIVEN_H__
+
#include <google/protobuf/map.h>
#include <google/protobuf/map_entry_lite.h>
#include <google/protobuf/map_field_lite.h>
#include <google/protobuf/message_lite.h>
#include <google/protobuf/wire_format_lite.h>
-
-// We require C++11 and Clang to use constexpr for variables, as GCC 4.8
-// requires constexpr to be consistent between declarations of variables
-// unnecessarily (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58541).
+
+// We require C++11 and Clang to use constexpr for variables, as GCC 4.8
+// requires constexpr to be consistent between declarations of variables
+// unnecessarily (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58541).
// VS 2017 Update 3 also supports this usage of constexpr.
#if defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1911)
-#define PROTOBUF_CONSTEXPR_VAR constexpr
-#else // !__clang__
-#define PROTOBUF_CONSTEXPR_VAR
-#endif // !_clang
-
+#define PROTOBUF_CONSTEXPR_VAR constexpr
+#else // !__clang__
+#define PROTOBUF_CONSTEXPR_VAR
+#endif // !_clang
+
#ifdef SWIG
#error "You cannot SWIG proto headers"
-#endif
-
+#endif
+
#include <google/protobuf/port_def.inc>
-namespace google {
-namespace protobuf {
-namespace internal {
-
-// Processing-type masks.
+namespace google {
+namespace protobuf {
+namespace internal {
+
+// Processing-type masks.
static constexpr const unsigned char kOneofMask = 0x40;
static constexpr const unsigned char kRepeatedMask = 0x20;
-// Mask for the raw type: either a WireFormatLite::FieldType or one of the
-// ProcessingTypes below, without the oneof or repeated flag.
+// Mask for the raw type: either a WireFormatLite::FieldType or one of the
+// ProcessingTypes below, without the oneof or repeated flag.
static constexpr const unsigned char kTypeMask = 0x1f;
-
-// Wire type masks.
+
+// Wire type masks.
static constexpr const unsigned char kNotPackedMask = 0x10;
static constexpr const unsigned char kInvalidMask = 0x20;
-
-enum ProcessingTypes {
- TYPE_STRING_CORD = 19,
- TYPE_STRING_STRING_PIECE = 20,
- TYPE_BYTES_CORD = 21,
- TYPE_BYTES_STRING_PIECE = 22,
- TYPE_MAP = 23,
-};
-
-static_assert(TYPE_MAP < kRepeatedMask, "Invalid enum");
-
+
+enum ProcessingTypes {
+ TYPE_STRING_CORD = 19,
+ TYPE_STRING_STRING_PIECE = 20,
+ TYPE_BYTES_CORD = 21,
+ TYPE_BYTES_STRING_PIECE = 22,
+ TYPE_MAP = 23,
+};
+
+static_assert(TYPE_MAP < kRepeatedMask, "Invalid enum");
+
struct PROTOBUF_EXPORT FieldMetadata {
uint32 offset; // offset of this field in the struct
uint32 tag; // field * 8 + wire_type
@@ -111,61 +111,61 @@ struct PROTOBUF_EXPORT FieldMetadata {
static int CalculateType(int fundamental_type, FieldTypeClass type_class);
};
-// TODO(ckennelly): Add a static assertion to ensure that these masks do not
-// conflict with wiretypes.
-
-// ParseTableField is kept small to help simplify instructions for computing
-// offsets, as we will always need this information to parse a field.
-// Additional data, needed for some types, is stored in
+// TODO(ckennelly): Add a static assertion to ensure that these masks do not
+// conflict with wiretypes.
+
+// ParseTableField is kept small to help simplify instructions for computing
+// offsets, as we will always need this information to parse a field.
+// Additional data, needed for some types, is stored in
// AuxiliaryParseTableField.
-struct ParseTableField {
- uint32 offset;
- // The presence_index ordinarily represents a has_bit index, but for fields
- // inside a oneof it represents the index in _oneof_case_.
- uint32 presence_index;
- unsigned char normal_wiretype;
- unsigned char packed_wiretype;
-
- // processing_type is given by:
- // (FieldDescriptor->type() << 1) | FieldDescriptor->is_packed()
- unsigned char processing_type;
-
- unsigned char tag_size;
-};
-
-struct ParseTable;
-
+struct ParseTableField {
+ uint32 offset;
+ // The presence_index ordinarily represents a has_bit index, but for fields
+ // inside a oneof it represents the index in _oneof_case_.
+ uint32 presence_index;
+ unsigned char normal_wiretype;
+ unsigned char packed_wiretype;
+
+ // processing_type is given by:
+ // (FieldDescriptor->type() << 1) | FieldDescriptor->is_packed()
+ unsigned char processing_type;
+
+ unsigned char tag_size;
+};
+
+struct ParseTable;
+
union AuxiliaryParseTableField {
- typedef bool (*EnumValidator)(int);
-
- // Enums
- struct enum_aux {
- EnumValidator validator;
- };
- enum_aux enums;
- // Group, messages
- struct message_aux {
- // ExplicitlyInitialized<T> -> T requires a reinterpret_cast, which prevents
- // the tables from being constructed as a constexpr. We use void to avoid
- // the cast.
- const void* default_message_void;
- const MessageLite* default_message() const {
- return static_cast<const MessageLite*>(default_message_void);
- }
- };
- message_aux messages;
- // Strings
- struct string_aux {
- const void* default_ptr;
- const char* field_name;
- };
- string_aux strings;
-
- struct map_aux {
- bool (*parse_map)(io::CodedInputStream*, void*);
- };
- map_aux maps;
-
+ typedef bool (*EnumValidator)(int);
+
+ // Enums
+ struct enum_aux {
+ EnumValidator validator;
+ };
+ enum_aux enums;
+ // Group, messages
+ struct message_aux {
+ // ExplicitlyInitialized<T> -> T requires a reinterpret_cast, which prevents
+ // the tables from being constructed as a constexpr. We use void to avoid
+ // the cast.
+ const void* default_message_void;
+ const MessageLite* default_message() const {
+ return static_cast<const MessageLite*>(default_message_void);
+ }
+ };
+ message_aux messages;
+ // Strings
+ struct string_aux {
+ const void* default_ptr;
+ const char* field_name;
+ };
+ string_aux strings;
+
+ struct map_aux {
+ bool (*parse_map)(io::CodedInputStream*, void*);
+ };
+ map_aux maps;
+
AuxiliaryParseTableField() = default;
constexpr AuxiliaryParseTableField(AuxiliaryParseTableField::enum_aux e)
: enums(e) {}
@@ -174,35 +174,35 @@ union AuxiliaryParseTableField {
constexpr AuxiliaryParseTableField(AuxiliaryParseTableField::string_aux s)
: strings(s) {}
constexpr AuxiliaryParseTableField(AuxiliaryParseTableField::map_aux m)
- : maps(m) {}
-};
-
-struct ParseTable {
- const ParseTableField* fields;
+ : maps(m) {}
+};
+
+struct ParseTable {
+ const ParseTableField* fields;
const AuxiliaryParseTableField* aux;
- int max_field_number;
- // TODO(ckennelly): Do something with this padding.
-
- // TODO(ckennelly): Vet these for sign extension.
- int64 has_bits_offset;
- int64 oneof_case_offset;
- int64 extension_offset;
- int64 arena_offset;
-
- // ExplicitlyInitialized<T> -> T requires a reinterpret_cast, which prevents
- // the tables from being constructed as a constexpr. We use void to avoid
- // the cast.
- const void* default_instance_void;
- const MessageLite* default_instance() const {
- return static_cast<const MessageLite*>(default_instance_void);
- }
-
- bool unknown_field_set;
-};
-
-static_assert(sizeof(ParseTableField) <= 16, "ParseTableField is too large");
-// The tables must be composed of POD components to ensure link-time
-// initialization.
+ int max_field_number;
+ // TODO(ckennelly): Do something with this padding.
+
+ // TODO(ckennelly): Vet these for sign extension.
+ int64 has_bits_offset;
+ int64 oneof_case_offset;
+ int64 extension_offset;
+ int64 arena_offset;
+
+ // ExplicitlyInitialized<T> -> T requires a reinterpret_cast, which prevents
+ // the tables from being constructed as a constexpr. We use void to avoid
+ // the cast.
+ const void* default_instance_void;
+ const MessageLite* default_instance() const {
+ return static_cast<const MessageLite*>(default_instance_void);
+ }
+
+ bool unknown_field_set;
+};
+
+static_assert(sizeof(ParseTableField) <= 16, "ParseTableField is too large");
+// The tables must be composed of POD components to ensure link-time
+// initialization.
static_assert(std::is_standard_layout<ParseTableField>::value, "");
static_assert(std::is_trivial<ParseTableField>::value, "");
static_assert(std::is_standard_layout<AuxiliaryParseTableField>::value, "");
@@ -219,25 +219,25 @@ static_assert(
static_assert(std::is_trivial<AuxiliaryParseTableField::string_aux>::value, "");
static_assert(std::is_standard_layout<ParseTable>::value, "");
static_assert(std::is_trivial<ParseTable>::value, "");
-
-// TODO(ckennelly): Consolidate these implementations into a single one, using
-// dynamic dispatch to the appropriate unknown field handler.
-bool MergePartialFromCodedStream(MessageLite* msg, const ParseTable& table,
- io::CodedInputStream* input);
-bool MergePartialFromCodedStreamLite(MessageLite* msg, const ParseTable& table,
+
+// TODO(ckennelly): Consolidate these implementations into a single one, using
+// dynamic dispatch to the appropriate unknown field handler.
+bool MergePartialFromCodedStream(MessageLite* msg, const ParseTable& table,
+ io::CodedInputStream* input);
+bool MergePartialFromCodedStreamLite(MessageLite* msg, const ParseTable& table,
io::CodedInputStream* input);
-
-template <typename Entry>
-bool ParseMap(io::CodedInputStream* input, void* map_field) {
- typedef typename MapEntryToMapField<Entry>::MapFieldType MapFieldType;
+
+template <typename Entry>
+bool ParseMap(io::CodedInputStream* input, void* map_field) {
+ typedef typename MapEntryToMapField<Entry>::MapFieldType MapFieldType;
typedef Map<typename Entry::EntryKeyType, typename Entry::EntryValueType>
- MapType;
- typedef typename Entry::template Parser<MapFieldType, MapType> ParserType;
-
- ParserType parser(static_cast<MapFieldType*>(map_field));
+ MapType;
+ typedef typename Entry::template Parser<MapFieldType, MapType> ParserType;
+
+ ParserType parser(static_cast<MapFieldType*>(map_field));
return WireFormatLite::ReadMessageNoVirtual(input, &parser);
-}
-
+}
+
struct SerializationTable {
int num_fields;
const FieldMetadata* field_table;
@@ -337,10 +337,10 @@ void MapFieldSerializer(const uint8* base, uint32 offset, uint32 tag,
}
}
-} // namespace internal
-} // namespace protobuf
+} // namespace internal
+} // namespace protobuf
} // namespace google
-
+
#include <google/protobuf/port_undef.inc>
-#endif // GOOGLE_PROTOBUF_GENERATED_MESSAGE_TABLE_DRIVEN_H__
+#endif // GOOGLE_PROTOBUF_GENERATED_MESSAGE_TABLE_DRIVEN_H__
diff --git a/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven_lite.cc b/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven_lite.cc
index 86f8c46c97..6a7949a993 100644
--- a/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven_lite.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven_lite.cc
@@ -1,106 +1,106 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
#include <google/protobuf/generated_message_table_driven_lite.h>
-
+
#include <type_traits>
-
+
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/wire_format_lite.h>
-
-namespace google {
-namespace protobuf {
-namespace internal {
-
-namespace {
-
+
+namespace google {
+namespace protobuf {
+namespace internal {
+
+namespace {
+
TProtoStringType* MutableUnknownFields(MessageLite* msg, int64 arena_offset) {
return Raw<InternalMetadata>(msg, arena_offset)
->mutable_unknown_fields<TProtoStringType>();
-}
-
-struct UnknownFieldHandlerLite {
+}
+
+struct UnknownFieldHandlerLite {
// TODO(mvels): consider renaming UnknownFieldHandler to (TableDrivenTraits?),
// and conflating InternalMetaData into it, simplifying the template.
static constexpr bool IsLite() { return true; }
- static bool Skip(MessageLite* msg, const ParseTable& table,
+ static bool Skip(MessageLite* msg, const ParseTable& table,
io::CodedInputStream* input, int tag) {
- GOOGLE_DCHECK(!table.unknown_field_set);
+ GOOGLE_DCHECK(!table.unknown_field_set);
io::StringOutputStream unknown_fields_string(
- MutableUnknownFields(msg, table.arena_offset));
+ MutableUnknownFields(msg, table.arena_offset));
io::CodedOutputStream unknown_fields_stream(&unknown_fields_string, false);
-
+
return internal::WireFormatLite::SkipField(input, tag,
&unknown_fields_stream);
- }
-
+ }
+
static void Varint(MessageLite* msg, const ParseTable& table, int tag,
int value) {
- GOOGLE_DCHECK(!table.unknown_field_set);
-
+ GOOGLE_DCHECK(!table.unknown_field_set);
+
io::StringOutputStream unknown_fields_string(
- MutableUnknownFields(msg, table.arena_offset));
+ MutableUnknownFields(msg, table.arena_offset));
io::CodedOutputStream unknown_fields_stream(&unknown_fields_string, false);
- unknown_fields_stream.WriteVarint32(tag);
- unknown_fields_stream.WriteVarint32(value);
- }
-
+ unknown_fields_stream.WriteVarint32(tag);
+ unknown_fields_stream.WriteVarint32(value);
+ }
+
static bool ParseExtension(MessageLite* msg, const ParseTable& table,
io::CodedInputStream* input, int tag) {
- ExtensionSet* extensions = GetExtensionSet(msg, table.extension_offset);
- if (extensions == NULL) {
- return false;
- }
-
- const MessageLite* prototype = table.default_instance();
-
- GOOGLE_DCHECK(!table.unknown_field_set);
+ ExtensionSet* extensions = GetExtensionSet(msg, table.extension_offset);
+ if (extensions == NULL) {
+ return false;
+ }
+
+ const MessageLite* prototype = table.default_instance();
+
+ GOOGLE_DCHECK(!table.unknown_field_set);
io::StringOutputStream unknown_fields_string(
- MutableUnknownFields(msg, table.arena_offset));
+ MutableUnknownFields(msg, table.arena_offset));
io::CodedOutputStream unknown_fields_stream(&unknown_fields_string, false);
return extensions->ParseField(tag, input, prototype,
&unknown_fields_stream);
- }
-};
-
-} // namespace
-
+ }
+};
+
+} // namespace
+
bool MergePartialFromCodedStreamLite(MessageLite* msg, const ParseTable& table,
io::CodedInputStream* input) {
return MergePartialFromCodedStreamImpl<UnknownFieldHandlerLite>(msg, table,
input);
-}
-
-} // namespace internal
-} // namespace protobuf
-} // namespace google
+}
+
+} // namespace internal
+} // namespace protobuf
+} // namespace google
diff --git a/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven_lite.h b/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven_lite.h
index effa6d7be7..706a530e47 100644
--- a/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven_lite.h
+++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven_lite.h
@@ -1,36 +1,36 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef GOOGLE_PROTOBUF_GENERATED_MESSAGE_TABLE_DRIVEN_LITE_H__
-#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_TABLE_DRIVEN_LITE_H__
-
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_GENERATED_MESSAGE_TABLE_DRIVEN_LITE_H__
+#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_TABLE_DRIVEN_LITE_H__
+
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/generated_message_table_driven.h>
@@ -38,176 +38,176 @@
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/wire_format_lite.h>
#include <type_traits>
-
-
+
+
#include <google/protobuf/port_def.inc>
-namespace google {
-namespace protobuf {
-namespace internal {
-
-
-enum StringType {
- StringType_STRING = 0,
-};
-
-// Logically a superset of StringType, consisting of all field types that
-// require special initialization.
-enum ProcessingType {
- ProcessingType_STRING = 0,
- ProcessingType_CORD = 1,
- ProcessingType_STRING_PIECE = 2,
+namespace google {
+namespace protobuf {
+namespace internal {
+
+
+enum StringType {
+ StringType_STRING = 0,
+};
+
+// Logically a superset of StringType, consisting of all field types that
+// require special initialization.
+enum ProcessingType {
+ ProcessingType_STRING = 0,
+ ProcessingType_CORD = 1,
+ ProcessingType_STRING_PIECE = 2,
ProcessingType_MESSAGE = 3,
-};
-
-enum Cardinality {
- Cardinality_SINGULAR = 0,
- Cardinality_REPEATED = 1,
- Cardinality_ONEOF = 3
-};
-
-template <typename Type>
-inline Type* Raw(MessageLite* msg, int64 offset) {
- return reinterpret_cast<Type*>(reinterpret_cast<uint8*>(msg) + offset);
-}
-
-template <typename Type>
-inline const Type* Raw(const MessageLite* msg, int64 offset) {
- return reinterpret_cast<const Type*>(reinterpret_cast<const uint8*>(msg) +
- offset);
-}
-
-inline ExtensionSet* GetExtensionSet(MessageLite* msg, int64 extension_offset) {
- if (extension_offset == -1) {
- return NULL;
- }
-
- return Raw<ExtensionSet>(msg, extension_offset);
-}
-
-template <typename Type>
-inline Type* AddField(MessageLite* msg, int64 offset) {
+};
+
+enum Cardinality {
+ Cardinality_SINGULAR = 0,
+ Cardinality_REPEATED = 1,
+ Cardinality_ONEOF = 3
+};
+
+template <typename Type>
+inline Type* Raw(MessageLite* msg, int64 offset) {
+ return reinterpret_cast<Type*>(reinterpret_cast<uint8*>(msg) + offset);
+}
+
+template <typename Type>
+inline const Type* Raw(const MessageLite* msg, int64 offset) {
+ return reinterpret_cast<const Type*>(reinterpret_cast<const uint8*>(msg) +
+ offset);
+}
+
+inline ExtensionSet* GetExtensionSet(MessageLite* msg, int64 extension_offset) {
+ if (extension_offset == -1) {
+ return NULL;
+ }
+
+ return Raw<ExtensionSet>(msg, extension_offset);
+}
+
+template <typename Type>
+inline Type* AddField(MessageLite* msg, int64 offset) {
static_assert(std::is_trivial<Type>::value, "Do not assign");
-
+
RepeatedField<Type>* repeated = Raw<RepeatedField<Type>>(msg, offset);
- return repeated->Add();
-}
-
-template <>
+ return repeated->Add();
+}
+
+template <>
inline TProtoStringType* AddField<TProtoStringType>(MessageLite* msg, int64 offset) {
RepeatedPtrField<TProtoStringType>* repeated =
Raw<RepeatedPtrField<TProtoStringType>>(msg, offset);
- return repeated->Add();
-}
-
-
-template <typename Type>
-inline void AddField(MessageLite* msg, int64 offset, Type value) {
+ return repeated->Add();
+}
+
+
+template <typename Type>
+inline void AddField(MessageLite* msg, int64 offset, Type value) {
static_assert(std::is_trivial<Type>::value, "Do not assign");
- *AddField<Type>(msg, offset) = value;
-}
-
-inline void SetBit(uint32* has_bits, uint32 has_bit_index) {
+ *AddField<Type>(msg, offset) = value;
+}
+
+inline void SetBit(uint32* has_bits, uint32 has_bit_index) {
GOOGLE_DCHECK(has_bits != nullptr);
-
- uint32 mask = static_cast<uint32>(1u) << (has_bit_index % 32);
- has_bits[has_bit_index / 32u] |= mask;
-}
-
-template <typename Type>
-inline Type* MutableField(MessageLite* msg, uint32* has_bits,
- uint32 has_bit_index, int64 offset) {
- SetBit(has_bits, has_bit_index);
- return Raw<Type>(msg, offset);
-}
-
-template <typename Type>
-inline void SetField(MessageLite* msg, uint32* has_bits, uint32 has_bit_index,
- int64 offset, Type value) {
+
+ uint32 mask = static_cast<uint32>(1u) << (has_bit_index % 32);
+ has_bits[has_bit_index / 32u] |= mask;
+}
+
+template <typename Type>
+inline Type* MutableField(MessageLite* msg, uint32* has_bits,
+ uint32 has_bit_index, int64 offset) {
+ SetBit(has_bits, has_bit_index);
+ return Raw<Type>(msg, offset);
+}
+
+template <typename Type>
+inline void SetField(MessageLite* msg, uint32* has_bits, uint32 has_bit_index,
+ int64 offset, Type value) {
static_assert(std::is_trivial<Type>::value, "Do not assign");
- *MutableField<Type>(msg, has_bits, has_bit_index, offset) = value;
-}
-
-template <typename Type>
-inline void SetOneofField(MessageLite* msg, uint32* oneof_case,
- uint32 oneof_case_index, int64 offset,
- int field_number, Type value) {
- oneof_case[oneof_case_index] = field_number;
- *Raw<Type>(msg, offset) = value;
-}
-
-// Clears a oneof field. The field argument should correspond to the particular
-// field that is currently set in the oneof.
-inline void ClearOneofField(const ParseTableField& field, Arena* arena,
+ *MutableField<Type>(msg, has_bits, has_bit_index, offset) = value;
+}
+
+template <typename Type>
+inline void SetOneofField(MessageLite* msg, uint32* oneof_case,
+ uint32 oneof_case_index, int64 offset,
+ int field_number, Type value) {
+ oneof_case[oneof_case_index] = field_number;
+ *Raw<Type>(msg, offset) = value;
+}
+
+// Clears a oneof field. The field argument should correspond to the particular
+// field that is currently set in the oneof.
+inline void ClearOneofField(const ParseTableField& field, Arena* arena,
MessageLite* msg) {
- switch (field.processing_type & kTypeMask) {
- case WireFormatLite::TYPE_MESSAGE:
- if (arena == NULL) {
- delete *Raw<MessageLite*>(msg, field.offset);
- }
- break;
-
- case WireFormatLite::TYPE_STRING:
- case WireFormatLite::TYPE_BYTES:
- Raw<ArenaStringPtr>(msg, field.offset)
+ switch (field.processing_type & kTypeMask) {
+ case WireFormatLite::TYPE_MESSAGE:
+ if (arena == NULL) {
+ delete *Raw<MessageLite*>(msg, field.offset);
+ }
+ break;
+
+ case WireFormatLite::TYPE_STRING:
+ case WireFormatLite::TYPE_BYTES:
+ Raw<ArenaStringPtr>(msg, field.offset)
->Destroy(ArenaStringPtr::EmptyDefault{}, arena);
- break;
-
- default:
- // No cleanup needed.
- break;
- }
-}
-
-// Clears and reinitializes a oneof field as necessary, in preparation for
-// parsing a new value with type field_type and field number field_number.
-//
-// Note: the oneof_case argument should point directly to the _oneof_case_
-// element corresponding to this particular oneof, not to the beginning of the
-// _oneof_case_ array.
-template <ProcessingType field_type>
-inline void ResetOneofField(const ParseTable& table, int field_number,
- Arena* arena, MessageLite* msg, uint32* oneof_case,
- int64 offset, const void* default_ptr) {
+ break;
+
+ default:
+ // No cleanup needed.
+ break;
+ }
+}
+
+// Clears and reinitializes a oneof field as necessary, in preparation for
+// parsing a new value with type field_type and field number field_number.
+//
+// Note: the oneof_case argument should point directly to the _oneof_case_
+// element corresponding to this particular oneof, not to the beginning of the
+// _oneof_case_ array.
+template <ProcessingType field_type>
+inline void ResetOneofField(const ParseTable& table, int field_number,
+ Arena* arena, MessageLite* msg, uint32* oneof_case,
+ int64 offset, const void* default_ptr) {
if (static_cast<int64>(*oneof_case) == field_number) {
- // The oneof is already set to the right type, so there is no need to clear
- // it.
- return;
- }
-
- if (*oneof_case != 0) {
- ClearOneofField(table.fields[*oneof_case], arena, msg);
- }
- *oneof_case = field_number;
-
- switch (field_type) {
- case ProcessingType_STRING:
- Raw<ArenaStringPtr>(msg, offset)
+ // The oneof is already set to the right type, so there is no need to clear
+ // it.
+ return;
+ }
+
+ if (*oneof_case != 0) {
+ ClearOneofField(table.fields[*oneof_case], arena, msg);
+ }
+ *oneof_case = field_number;
+
+ switch (field_type) {
+ case ProcessingType_STRING:
+ Raw<ArenaStringPtr>(msg, offset)
->UnsafeSetDefault(static_cast<const TProtoStringType*>(default_ptr));
- break;
- case ProcessingType_MESSAGE:
- MessageLite** submessage = Raw<MessageLite*>(msg, offset);
- const MessageLite* prototype =
- table.aux[field_number].messages.default_message();
- *submessage = prototype->New(arena);
- break;
- }
-}
-
+ break;
+ case ProcessingType_MESSAGE:
+ MessageLite** submessage = Raw<MessageLite*>(msg, offset);
+ const MessageLite* prototype =
+ table.aux[field_number].messages.default_message();
+ *submessage = prototype->New(arena);
+ break;
+ }
+}
+
template <typename UnknownFieldHandler, Cardinality cardinality,
bool is_string_type, StringType ctype>
-static inline bool HandleString(io::CodedInputStream* input, MessageLite* msg,
- Arena* arena, uint32* has_bits,
- uint32 has_bit_index, int64 offset,
- const void* default_ptr,
- const char* field_name) {
+static inline bool HandleString(io::CodedInputStream* input, MessageLite* msg,
+ Arena* arena, uint32* has_bits,
+ uint32 has_bit_index, int64 offset,
+ const void* default_ptr,
+ const char* field_name) {
StringPiece utf8_string_data;
-#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
+#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
constexpr bool kValidateUtf8 = is_string_type;
#else
constexpr bool kValidateUtf8 = false;
#endif // GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
-
+
switch (ctype) {
case StringType_STRING: {
switch (cardinality) {
@@ -244,439 +244,439 @@ static inline bool HandleString(io::CodedInputStream* input, MessageLite* msg,
PROTOBUF_ASSUME(false);
}
break;
- }
+ }
default:
PROTOBUF_ASSUME(false);
}
-
+
if (kValidateUtf8) {
// TODO(b/118759213): fail if proto3
WireFormatLite::VerifyUtf8String(utf8_string_data.data(),
utf8_string_data.length(),
WireFormatLite::PARSE, field_name);
- }
- return true;
-}
-
+ }
+ return true;
+}
+
template <typename UnknownFieldHandler, Cardinality cardinality>
-inline bool HandleEnum(const ParseTable& table, io::CodedInputStream* input,
- MessageLite* msg, uint32* presence,
- uint32 presence_index, int64 offset, uint32 tag,
- int field_number) {
- int value;
+inline bool HandleEnum(const ParseTable& table, io::CodedInputStream* input,
+ MessageLite* msg, uint32* presence,
+ uint32 presence_index, int64 offset, uint32 tag,
+ int field_number) {
+ int value;
if (PROTOBUF_PREDICT_FALSE(
- (!WireFormatLite::ReadPrimitive<int, WireFormatLite::TYPE_ENUM>(
- input, &value)))) {
- return false;
- }
-
+ (!WireFormatLite::ReadPrimitive<int, WireFormatLite::TYPE_ENUM>(
+ input, &value)))) {
+ return false;
+ }
+
AuxiliaryParseTableField::EnumValidator validator =
- table.aux[field_number].enums.validator;
+ table.aux[field_number].enums.validator;
if (validator == nullptr || validator(value)) {
- switch (cardinality) {
- case Cardinality_SINGULAR:
- SetField(msg, presence, presence_index, offset, value);
- break;
- case Cardinality_REPEATED:
- AddField(msg, offset, value);
- break;
- case Cardinality_ONEOF:
+ switch (cardinality) {
+ case Cardinality_SINGULAR:
+ SetField(msg, presence, presence_index, offset, value);
+ break;
+ case Cardinality_REPEATED:
+ AddField(msg, offset, value);
+ break;
+ case Cardinality_ONEOF:
ClearOneofField(table.fields[presence[presence_index]], msg->GetArena(),
- msg);
- SetOneofField(msg, presence, presence_index, offset, field_number,
- value);
- break;
+ msg);
+ SetOneofField(msg, presence, presence_index, offset, field_number,
+ value);
+ break;
default:
PROTOBUF_ASSUME(false);
- }
- } else {
- UnknownFieldHandler::Varint(msg, table, tag, value);
- }
-
- return true;
-}
-
-// RepeatedMessageTypeHandler allows us to operate on RepeatedPtrField fields
-// without instantiating the specific template.
-class RepeatedMessageTypeHandler {
- public:
- typedef MessageLite Type;
+ }
+ } else {
+ UnknownFieldHandler::Varint(msg, table, tag, value);
+ }
+
+ return true;
+}
+
+// RepeatedMessageTypeHandler allows us to operate on RepeatedPtrField fields
+// without instantiating the specific template.
+class RepeatedMessageTypeHandler {
+ public:
+ typedef MessageLite Type;
typedef MessageLite WeakType;
- static Arena* GetArena(Type* t) { return t->GetArena(); }
- static void* GetMaybeArenaPointer(Type* t) {
- return t->GetMaybeArenaPointer();
- }
- static inline Type* NewFromPrototype(const Type* prototype,
- Arena* arena = NULL) {
- return prototype->New(arena);
- }
- static void Delete(Type* t, Arena* arena = NULL) {
- if (arena == NULL) {
- delete t;
- }
- }
-};
-
-class MergePartialFromCodedStreamHelper {
- public:
- static MessageLite* Add(RepeatedPtrFieldBase* field,
- const MessageLite* prototype) {
- return field->Add<RepeatedMessageTypeHandler>(
- const_cast<MessageLite*>(prototype));
- }
-};
-
+ static Arena* GetArena(Type* t) { return t->GetArena(); }
+ static void* GetMaybeArenaPointer(Type* t) {
+ return t->GetMaybeArenaPointer();
+ }
+ static inline Type* NewFromPrototype(const Type* prototype,
+ Arena* arena = NULL) {
+ return prototype->New(arena);
+ }
+ static void Delete(Type* t, Arena* arena = NULL) {
+ if (arena == NULL) {
+ delete t;
+ }
+ }
+};
+
+class MergePartialFromCodedStreamHelper {
+ public:
+ static MessageLite* Add(RepeatedPtrFieldBase* field,
+ const MessageLite* prototype) {
+ return field->Add<RepeatedMessageTypeHandler>(
+ const_cast<MessageLite*>(prototype));
+ }
+};
+
template <typename UnknownFieldHandler, uint32 kMaxTag>
bool MergePartialFromCodedStreamInlined(MessageLite* msg,
const ParseTable& table,
io::CodedInputStream* input) {
- // We require that has_bits are present, as to avoid having to check for them
- // for every field.
- //
- // TODO(ckennelly): Make this a compile-time parameter with templates.
- GOOGLE_DCHECK_GE(table.has_bits_offset, 0);
- uint32* has_bits = Raw<uint32>(msg, table.has_bits_offset);
- GOOGLE_DCHECK(has_bits != NULL);
-
- while (true) {
+ // We require that has_bits are present, as to avoid having to check for them
+ // for every field.
+ //
+ // TODO(ckennelly): Make this a compile-time parameter with templates.
+ GOOGLE_DCHECK_GE(table.has_bits_offset, 0);
+ uint32* has_bits = Raw<uint32>(msg, table.has_bits_offset);
+ GOOGLE_DCHECK(has_bits != NULL);
+
+ while (true) {
uint32 tag = input->ReadTagWithCutoffNoLastTag(kMaxTag).first;
- const WireFormatLite::WireType wire_type =
- WireFormatLite::GetTagWireType(tag);
- const int field_number = WireFormatLite::GetTagFieldNumber(tag);
-
+ const WireFormatLite::WireType wire_type =
+ WireFormatLite::GetTagWireType(tag);
+ const int field_number = WireFormatLite::GetTagFieldNumber(tag);
+
if (PROTOBUF_PREDICT_FALSE(field_number > table.max_field_number)) {
- // check for possible extensions
- if (UnknownFieldHandler::ParseExtension(msg, table, input, tag)) {
- // successfully parsed
- continue;
- }
-
+ // check for possible extensions
+ if (UnknownFieldHandler::ParseExtension(msg, table, input, tag)) {
+ // successfully parsed
+ continue;
+ }
+
if (PROTOBUF_PREDICT_FALSE(
!UnknownFieldHandler::Skip(msg, table, input, tag))) {
- return false;
- }
-
- continue;
- }
-
- // We implicitly verify that data points to a valid field as we check the
- // wire types. Entries in table.fields[i] that do not correspond to valid
- // field numbers have their normal_wiretype and packed_wiretype fields set
- // with the kInvalidMask value. As wire_type cannot take on that value, we
- // will never match.
- const ParseTableField* data = table.fields + field_number;
-
- // TODO(ckennelly): Avoid sign extension
- const int64 presence_index = data->presence_index;
- const int64 offset = data->offset;
- const unsigned char processing_type = data->processing_type;
-
- if (data->normal_wiretype == static_cast<unsigned char>(wire_type)) {
- switch (processing_type) {
-#define HANDLE_TYPE(TYPE, CPPTYPE) \
- case (WireFormatLite::TYPE_##TYPE): { \
- CPPTYPE value; \
+ return false;
+ }
+
+ continue;
+ }
+
+ // We implicitly verify that data points to a valid field as we check the
+ // wire types. Entries in table.fields[i] that do not correspond to valid
+ // field numbers have their normal_wiretype and packed_wiretype fields set
+ // with the kInvalidMask value. As wire_type cannot take on that value, we
+ // will never match.
+ const ParseTableField* data = table.fields + field_number;
+
+ // TODO(ckennelly): Avoid sign extension
+ const int64 presence_index = data->presence_index;
+ const int64 offset = data->offset;
+ const unsigned char processing_type = data->processing_type;
+
+ if (data->normal_wiretype == static_cast<unsigned char>(wire_type)) {
+ switch (processing_type) {
+#define HANDLE_TYPE(TYPE, CPPTYPE) \
+ case (WireFormatLite::TYPE_##TYPE): { \
+ CPPTYPE value; \
if (PROTOBUF_PREDICT_FALSE( \
- (!WireFormatLite::ReadPrimitive< \
- CPPTYPE, WireFormatLite::TYPE_##TYPE>(input, &value)))) { \
- return false; \
- } \
- SetField(msg, has_bits, presence_index, offset, value); \
- break; \
- } \
- case (WireFormatLite::TYPE_##TYPE) | kRepeatedMask: { \
+ (!WireFormatLite::ReadPrimitive< \
+ CPPTYPE, WireFormatLite::TYPE_##TYPE>(input, &value)))) { \
+ return false; \
+ } \
+ SetField(msg, has_bits, presence_index, offset, value); \
+ break; \
+ } \
+ case (WireFormatLite::TYPE_##TYPE) | kRepeatedMask: { \
RepeatedField<CPPTYPE>* values = Raw<RepeatedField<CPPTYPE>>(msg, offset); \
if (PROTOBUF_PREDICT_FALSE((!WireFormatLite::ReadRepeatedPrimitive< \
CPPTYPE, WireFormatLite::TYPE_##TYPE>( \
- data->tag_size, tag, input, values)))) { \
- return false; \
- } \
- break; \
- } \
- case (WireFormatLite::TYPE_##TYPE) | kOneofMask: { \
- uint32* oneof_case = Raw<uint32>(msg, table.oneof_case_offset); \
- CPPTYPE value; \
+ data->tag_size, tag, input, values)))) { \
+ return false; \
+ } \
+ break; \
+ } \
+ case (WireFormatLite::TYPE_##TYPE) | kOneofMask: { \
+ uint32* oneof_case = Raw<uint32>(msg, table.oneof_case_offset); \
+ CPPTYPE value; \
if (PROTOBUF_PREDICT_FALSE( \
- (!WireFormatLite::ReadPrimitive< \
- CPPTYPE, WireFormatLite::TYPE_##TYPE>(input, &value)))) { \
- return false; \
- } \
+ (!WireFormatLite::ReadPrimitive< \
+ CPPTYPE, WireFormatLite::TYPE_##TYPE>(input, &value)))) { \
+ return false; \
+ } \
ClearOneofField(table.fields[oneof_case[presence_index]], msg->GetArena(), \
msg); \
- SetOneofField(msg, oneof_case, presence_index, offset, field_number, \
- value); \
- break; \
- }
-
- HANDLE_TYPE(INT32, int32)
- HANDLE_TYPE(INT64, int64)
- HANDLE_TYPE(SINT32, int32)
- HANDLE_TYPE(SINT64, int64)
- HANDLE_TYPE(UINT32, uint32)
- HANDLE_TYPE(UINT64, uint64)
-
- HANDLE_TYPE(FIXED32, uint32)
- HANDLE_TYPE(FIXED64, uint64)
- HANDLE_TYPE(SFIXED32, int32)
- HANDLE_TYPE(SFIXED64, int64)
-
- HANDLE_TYPE(FLOAT, float)
- HANDLE_TYPE(DOUBLE, double)
-
- HANDLE_TYPE(BOOL, bool)
-#undef HANDLE_TYPE
- case WireFormatLite::TYPE_BYTES:
-#ifndef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
- case WireFormatLite::TYPE_STRING:
+ SetOneofField(msg, oneof_case, presence_index, offset, field_number, \
+ value); \
+ break; \
+ }
+
+ HANDLE_TYPE(INT32, int32)
+ HANDLE_TYPE(INT64, int64)
+ HANDLE_TYPE(SINT32, int32)
+ HANDLE_TYPE(SINT64, int64)
+ HANDLE_TYPE(UINT32, uint32)
+ HANDLE_TYPE(UINT64, uint64)
+
+ HANDLE_TYPE(FIXED32, uint32)
+ HANDLE_TYPE(FIXED64, uint64)
+ HANDLE_TYPE(SFIXED32, int32)
+ HANDLE_TYPE(SFIXED64, int64)
+
+ HANDLE_TYPE(FLOAT, float)
+ HANDLE_TYPE(DOUBLE, double)
+
+ HANDLE_TYPE(BOOL, bool)
+#undef HANDLE_TYPE
+ case WireFormatLite::TYPE_BYTES:
+#ifndef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
+ case WireFormatLite::TYPE_STRING:
#endif // GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
- {
+ {
Arena* const arena = msg->GetArena();
- const void* default_ptr = table.aux[field_number].strings.default_ptr;
-
+ const void* default_ptr = table.aux[field_number].strings.default_ptr;
+
if (PROTOBUF_PREDICT_FALSE(
(!HandleString<UnknownFieldHandler, Cardinality_SINGULAR,
false, StringType_STRING>(
- input, msg, arena, has_bits, presence_index, offset,
+ input, msg, arena, has_bits, presence_index, offset,
default_ptr, nullptr)))) {
- return false;
- }
- break;
- }
- case WireFormatLite::TYPE_BYTES | kOneofMask:
-#ifndef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
- case WireFormatLite::TYPE_STRING | kOneofMask:
+ return false;
+ }
+ break;
+ }
+ case WireFormatLite::TYPE_BYTES | kOneofMask:
+#ifndef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
+ case WireFormatLite::TYPE_STRING | kOneofMask:
#endif // !GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
- {
+ {
Arena* const arena = msg->GetArena();
- uint32* oneof_case = Raw<uint32>(msg, table.oneof_case_offset);
- const void* default_ptr = table.aux[field_number].strings.default_ptr;
-
- ResetOneofField<ProcessingType_STRING>(
- table, field_number, arena, msg, oneof_case + presence_index,
- offset, default_ptr);
-
+ uint32* oneof_case = Raw<uint32>(msg, table.oneof_case_offset);
+ const void* default_ptr = table.aux[field_number].strings.default_ptr;
+
+ ResetOneofField<ProcessingType_STRING>(
+ table, field_number, arena, msg, oneof_case + presence_index,
+ offset, default_ptr);
+
if (PROTOBUF_PREDICT_FALSE(
(!HandleString<UnknownFieldHandler, Cardinality_ONEOF, false,
StringType_STRING>(input, msg, arena, has_bits,
presence_index, offset,
default_ptr, nullptr)))) {
- return false;
- }
- break;
- }
- case (WireFormatLite::TYPE_BYTES) | kRepeatedMask:
-#ifndef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
- case (WireFormatLite::TYPE_STRING) | kRepeatedMask:
+ return false;
+ }
+ break;
+ }
+ case (WireFormatLite::TYPE_BYTES) | kRepeatedMask:
+#ifndef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
+ case (WireFormatLite::TYPE_STRING) | kRepeatedMask:
#endif // !GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
- {
+ {
Arena* const arena = msg->GetArena();
const void* default_ptr = table.aux[field_number].strings.default_ptr;
-
+
if (PROTOBUF_PREDICT_FALSE(
(!HandleString<UnknownFieldHandler, Cardinality_REPEATED,
false, StringType_STRING>(
- input, msg, arena, has_bits, presence_index, offset,
+ input, msg, arena, has_bits, presence_index, offset,
default_ptr, nullptr)))) {
- return false;
- }
- break;
- }
-#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
- case (WireFormatLite::TYPE_STRING): {
+ return false;
+ }
+ break;
+ }
+#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
+ case (WireFormatLite::TYPE_STRING): {
Arena* const arena = msg->GetArena();
- const void* default_ptr = table.aux[field_number].strings.default_ptr;
- const char* field_name = table.aux[field_number].strings.field_name;
-
+ const void* default_ptr = table.aux[field_number].strings.default_ptr;
+ const char* field_name = table.aux[field_number].strings.field_name;
+
if (PROTOBUF_PREDICT_FALSE(
(!HandleString<UnknownFieldHandler, Cardinality_SINGULAR,
true, StringType_STRING>(
- input, msg, arena, has_bits, presence_index, offset,
- default_ptr, field_name)))) {
- return false;
- }
- break;
- }
- case (WireFormatLite::TYPE_STRING) | kRepeatedMask: {
+ input, msg, arena, has_bits, presence_index, offset,
+ default_ptr, field_name)))) {
+ return false;
+ }
+ break;
+ }
+ case (WireFormatLite::TYPE_STRING) | kRepeatedMask: {
Arena* const arena = msg->GetArena();
- const void* default_ptr = table.aux[field_number].strings.default_ptr;
- const char* field_name = table.aux[field_number].strings.field_name;
-
+ const void* default_ptr = table.aux[field_number].strings.default_ptr;
+ const char* field_name = table.aux[field_number].strings.field_name;
+
if (PROTOBUF_PREDICT_FALSE(
(!HandleString<UnknownFieldHandler, Cardinality_REPEATED,
true, StringType_STRING>(
- input, msg, arena, has_bits, presence_index, offset,
- default_ptr, field_name)))) {
- return false;
- }
- break;
- }
- case (WireFormatLite::TYPE_STRING) | kOneofMask: {
+ input, msg, arena, has_bits, presence_index, offset,
+ default_ptr, field_name)))) {
+ return false;
+ }
+ break;
+ }
+ case (WireFormatLite::TYPE_STRING) | kOneofMask: {
Arena* const arena = msg->GetArena();
- uint32* oneof_case = Raw<uint32>(msg, table.oneof_case_offset);
- const void* default_ptr = table.aux[field_number].strings.default_ptr;
- const char* field_name = table.aux[field_number].strings.field_name;
-
- ResetOneofField<ProcessingType_STRING>(
- table, field_number, arena, msg, oneof_case + presence_index,
- offset, default_ptr);
-
+ uint32* oneof_case = Raw<uint32>(msg, table.oneof_case_offset);
+ const void* default_ptr = table.aux[field_number].strings.default_ptr;
+ const char* field_name = table.aux[field_number].strings.field_name;
+
+ ResetOneofField<ProcessingType_STRING>(
+ table, field_number, arena, msg, oneof_case + presence_index,
+ offset, default_ptr);
+
if (PROTOBUF_PREDICT_FALSE(
(!HandleString<UnknownFieldHandler, Cardinality_ONEOF, true,
StringType_STRING>(
- input, msg, arena, has_bits, presence_index, offset,
- default_ptr, field_name)))) {
- return false;
- }
- break;
- }
+ input, msg, arena, has_bits, presence_index, offset,
+ default_ptr, field_name)))) {
+ return false;
+ }
+ break;
+ }
#endif // GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
- case WireFormatLite::TYPE_ENUM: {
+ case WireFormatLite::TYPE_ENUM: {
if (PROTOBUF_PREDICT_FALSE(
(!HandleEnum<UnknownFieldHandler, Cardinality_SINGULAR>(
table, input, msg, has_bits, presence_index, offset, tag,
field_number)))) {
- return false;
- }
- break;
- }
- case WireFormatLite::TYPE_ENUM | kRepeatedMask: {
+ return false;
+ }
+ break;
+ }
+ case WireFormatLite::TYPE_ENUM | kRepeatedMask: {
if (PROTOBUF_PREDICT_FALSE(
(!HandleEnum<UnknownFieldHandler, Cardinality_REPEATED>(
table, input, msg, has_bits, presence_index, offset, tag,
field_number)))) {
- return false;
- }
- break;
- }
- case WireFormatLite::TYPE_ENUM | kOneofMask: {
- uint32* oneof_case = Raw<uint32>(msg, table.oneof_case_offset);
+ return false;
+ }
+ break;
+ }
+ case WireFormatLite::TYPE_ENUM | kOneofMask: {
+ uint32* oneof_case = Raw<uint32>(msg, table.oneof_case_offset);
if (PROTOBUF_PREDICT_FALSE(
(!HandleEnum<UnknownFieldHandler, Cardinality_ONEOF>(
table, input, msg, oneof_case, presence_index, offset,
tag, field_number)))) {
- return false;
- }
- break;
- }
- case WireFormatLite::TYPE_GROUP: {
- MessageLite** submsg_holder =
- MutableField<MessageLite*>(msg, has_bits, presence_index, offset);
- MessageLite* submsg = *submsg_holder;
-
- if (submsg == NULL) {
+ return false;
+ }
+ break;
+ }
+ case WireFormatLite::TYPE_GROUP: {
+ MessageLite** submsg_holder =
+ MutableField<MessageLite*>(msg, has_bits, presence_index, offset);
+ MessageLite* submsg = *submsg_holder;
+
+ if (submsg == NULL) {
Arena* const arena = msg->GetArena();
- const MessageLite* prototype =
- table.aux[field_number].messages.default_message();
- submsg = prototype->New(arena);
- *submsg_holder = submsg;
- }
-
+ const MessageLite* prototype =
+ table.aux[field_number].messages.default_message();
+ submsg = prototype->New(arena);
+ *submsg_holder = submsg;
+ }
+
if (PROTOBUF_PREDICT_FALSE(
!WireFormatLite::ReadGroup(field_number, input, submsg))) {
- return false;
- }
-
- break;
- }
- case WireFormatLite::TYPE_GROUP | kRepeatedMask: {
- RepeatedPtrFieldBase* field = Raw<RepeatedPtrFieldBase>(msg, offset);
- const MessageLite* prototype =
- table.aux[field_number].messages.default_message();
- GOOGLE_DCHECK(prototype != NULL);
-
- MessageLite* submsg =
- MergePartialFromCodedStreamHelper::Add(field, prototype);
-
+ return false;
+ }
+
+ break;
+ }
+ case WireFormatLite::TYPE_GROUP | kRepeatedMask: {
+ RepeatedPtrFieldBase* field = Raw<RepeatedPtrFieldBase>(msg, offset);
+ const MessageLite* prototype =
+ table.aux[field_number].messages.default_message();
+ GOOGLE_DCHECK(prototype != NULL);
+
+ MessageLite* submsg =
+ MergePartialFromCodedStreamHelper::Add(field, prototype);
+
if (PROTOBUF_PREDICT_FALSE(
!WireFormatLite::ReadGroup(field_number, input, submsg))) {
- return false;
- }
-
- break;
- }
- case WireFormatLite::TYPE_MESSAGE: {
- MessageLite** submsg_holder =
- MutableField<MessageLite*>(msg, has_bits, presence_index, offset);
- MessageLite* submsg = *submsg_holder;
-
- if (submsg == NULL) {
+ return false;
+ }
+
+ break;
+ }
+ case WireFormatLite::TYPE_MESSAGE: {
+ MessageLite** submsg_holder =
+ MutableField<MessageLite*>(msg, has_bits, presence_index, offset);
+ MessageLite* submsg = *submsg_holder;
+
+ if (submsg == NULL) {
Arena* const arena = msg->GetArena();
- const MessageLite* prototype =
- table.aux[field_number].messages.default_message();
+ const MessageLite* prototype =
+ table.aux[field_number].messages.default_message();
if (prototype == NULL) {
prototype = ImplicitWeakMessage::default_instance();
}
- submsg = prototype->New(arena);
- *submsg_holder = submsg;
- }
-
+ submsg = prototype->New(arena);
+ *submsg_holder = submsg;
+ }
+
if (PROTOBUF_PREDICT_FALSE(
!WireFormatLite::ReadMessage(input, submsg))) {
- return false;
- }
-
- break;
- }
- // TODO(ckennelly): Adapt ReadMessageNoVirtualNoRecursionDepth and
- // manage input->IncrementRecursionDepth() here.
- case WireFormatLite::TYPE_MESSAGE | kRepeatedMask: {
- RepeatedPtrFieldBase* field = Raw<RepeatedPtrFieldBase>(msg, offset);
- const MessageLite* prototype =
- table.aux[field_number].messages.default_message();
+ return false;
+ }
+
+ break;
+ }
+ // TODO(ckennelly): Adapt ReadMessageNoVirtualNoRecursionDepth and
+ // manage input->IncrementRecursionDepth() here.
+ case WireFormatLite::TYPE_MESSAGE | kRepeatedMask: {
+ RepeatedPtrFieldBase* field = Raw<RepeatedPtrFieldBase>(msg, offset);
+ const MessageLite* prototype =
+ table.aux[field_number].messages.default_message();
if (prototype == NULL) {
prototype = ImplicitWeakMessage::default_instance();
}
-
- MessageLite* submsg =
- MergePartialFromCodedStreamHelper::Add(field, prototype);
-
+
+ MessageLite* submsg =
+ MergePartialFromCodedStreamHelper::Add(field, prototype);
+
if (PROTOBUF_PREDICT_FALSE(
!WireFormatLite::ReadMessage(input, submsg))) {
- return false;
- }
-
- break;
- }
- case WireFormatLite::TYPE_MESSAGE | kOneofMask: {
+ return false;
+ }
+
+ break;
+ }
+ case WireFormatLite::TYPE_MESSAGE | kOneofMask: {
Arena* const arena = msg->GetArena();
- uint32* oneof_case = Raw<uint32>(msg, table.oneof_case_offset);
- MessageLite** submsg_holder = Raw<MessageLite*>(msg, offset);
- ResetOneofField<ProcessingType_MESSAGE>(
- table, field_number, arena, msg, oneof_case + presence_index,
- offset, NULL);
- MessageLite* submsg = *submsg_holder;
-
+ uint32* oneof_case = Raw<uint32>(msg, table.oneof_case_offset);
+ MessageLite** submsg_holder = Raw<MessageLite*>(msg, offset);
+ ResetOneofField<ProcessingType_MESSAGE>(
+ table, field_number, arena, msg, oneof_case + presence_index,
+ offset, NULL);
+ MessageLite* submsg = *submsg_holder;
+
if (PROTOBUF_PREDICT_FALSE(
!WireFormatLite::ReadMessage(input, submsg))) {
- return false;
- }
-
- break;
- }
- case TYPE_MAP: {
+ return false;
+ }
+
+ break;
+ }
+ case TYPE_MAP: {
if (PROTOBUF_PREDICT_FALSE(!(*table.aux[field_number].maps.parse_map)(
- input, Raw<void>(msg, offset)))) {
- return false;
- }
- break;
- }
- case 0: {
- // Done.
+ input, Raw<void>(msg, offset)))) {
+ return false;
+ }
+ break;
+ }
+ case 0: {
+ // Done.
input->SetLastTag(tag);
- return true;
- }
- default:
+ return true;
+ }
+ default:
PROTOBUF_ASSUME(false);
- }
- } else if (data->packed_wiretype == static_cast<unsigned char>(wire_type)) {
- // Non-packable fields have their packed_wiretype masked with
- // kNotPackedMask, which is impossible to match here.
- GOOGLE_DCHECK(processing_type & kRepeatedMask);
- GOOGLE_DCHECK_NE(processing_type, kRepeatedMask);
- GOOGLE_DCHECK_EQ(0, processing_type & kOneofMask);
-
-
- // Mask out kRepeatedMask bit, allowing the jump table to be smaller.
+ }
+ } else if (data->packed_wiretype == static_cast<unsigned char>(wire_type)) {
+ // Non-packable fields have their packed_wiretype masked with
+ // kNotPackedMask, which is impossible to match here.
+ GOOGLE_DCHECK(processing_type & kRepeatedMask);
+ GOOGLE_DCHECK_NE(processing_type, kRepeatedMask);
+ GOOGLE_DCHECK_EQ(0, processing_type & kOneofMask);
+
+
+ // Mask out kRepeatedMask bit, allowing the jump table to be smaller.
switch (static_cast<WireFormatLite::FieldType>(processing_type ^
kRepeatedMask)) {
#define HANDLE_PACKED_TYPE(TYPE, CPPTYPE, CPPTYPE_METHOD) \
@@ -688,88 +688,88 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg,
return false; \
} \
break; \
- }
-
- HANDLE_PACKED_TYPE(INT32, int32, Int32)
- HANDLE_PACKED_TYPE(INT64, int64, Int64)
- HANDLE_PACKED_TYPE(SINT32, int32, Int32)
- HANDLE_PACKED_TYPE(SINT64, int64, Int64)
- HANDLE_PACKED_TYPE(UINT32, uint32, UInt32)
- HANDLE_PACKED_TYPE(UINT64, uint64, UInt64)
-
- HANDLE_PACKED_TYPE(FIXED32, uint32, UInt32)
- HANDLE_PACKED_TYPE(FIXED64, uint64, UInt64)
- HANDLE_PACKED_TYPE(SFIXED32, int32, Int32)
- HANDLE_PACKED_TYPE(SFIXED64, int64, Int64)
-
- HANDLE_PACKED_TYPE(FLOAT, float, Float)
- HANDLE_PACKED_TYPE(DOUBLE, double, Double)
-
- HANDLE_PACKED_TYPE(BOOL, bool, Bool)
-#undef HANDLE_PACKED_TYPE
- case WireFormatLite::TYPE_ENUM: {
- // To avoid unnecessarily calling MutableUnknownFields (which mutates
+ }
+
+ HANDLE_PACKED_TYPE(INT32, int32, Int32)
+ HANDLE_PACKED_TYPE(INT64, int64, Int64)
+ HANDLE_PACKED_TYPE(SINT32, int32, Int32)
+ HANDLE_PACKED_TYPE(SINT64, int64, Int64)
+ HANDLE_PACKED_TYPE(UINT32, uint32, UInt32)
+ HANDLE_PACKED_TYPE(UINT64, uint64, UInt64)
+
+ HANDLE_PACKED_TYPE(FIXED32, uint32, UInt32)
+ HANDLE_PACKED_TYPE(FIXED64, uint64, UInt64)
+ HANDLE_PACKED_TYPE(SFIXED32, int32, Int32)
+ HANDLE_PACKED_TYPE(SFIXED64, int64, Int64)
+
+ HANDLE_PACKED_TYPE(FLOAT, float, Float)
+ HANDLE_PACKED_TYPE(DOUBLE, double, Double)
+
+ HANDLE_PACKED_TYPE(BOOL, bool, Bool)
+#undef HANDLE_PACKED_TYPE
+ case WireFormatLite::TYPE_ENUM: {
+ // To avoid unnecessarily calling MutableUnknownFields (which mutates
// InternalMetadata) when all inputs in the repeated series
- // are valid, we implement our own parser rather than call
- // WireFormat::ReadPackedEnumPreserveUnknowns.
- uint32 length;
+ // are valid, we implement our own parser rather than call
+ // WireFormat::ReadPackedEnumPreserveUnknowns.
+ uint32 length;
if (PROTOBUF_PREDICT_FALSE(!input->ReadVarint32(&length))) {
- return false;
- }
-
+ return false;
+ }
+
AuxiliaryParseTableField::EnumValidator validator =
- table.aux[field_number].enums.validator;
+ table.aux[field_number].enums.validator;
RepeatedField<int>* values = Raw<RepeatedField<int>>(msg, offset);
-
- io::CodedInputStream::Limit limit = input->PushLimit(length);
- while (input->BytesUntilLimit() > 0) {
- int value;
+
+ io::CodedInputStream::Limit limit = input->PushLimit(length);
+ while (input->BytesUntilLimit() > 0) {
+ int value;
if (PROTOBUF_PREDICT_FALSE(
(!WireFormatLite::ReadPrimitive<
- int, WireFormatLite::TYPE_ENUM>(input, &value)))) {
- return false;
- }
-
+ int, WireFormatLite::TYPE_ENUM>(input, &value)))) {
+ return false;
+ }
+
if (validator == nullptr || validator(value)) {
- values->Add(value);
- } else {
- // TODO(ckennelly): Consider caching here.
- UnknownFieldHandler::Varint(msg, table, tag, value);
- }
- }
- input->PopLimit(limit);
-
- break;
- }
- case WireFormatLite::TYPE_STRING:
- case WireFormatLite::TYPE_GROUP:
- case WireFormatLite::TYPE_MESSAGE:
- case WireFormatLite::TYPE_BYTES:
- GOOGLE_DCHECK(false);
- return false;
- default:
+ values->Add(value);
+ } else {
+ // TODO(ckennelly): Consider caching here.
+ UnknownFieldHandler::Varint(msg, table, tag, value);
+ }
+ }
+ input->PopLimit(limit);
+
+ break;
+ }
+ case WireFormatLite::TYPE_STRING:
+ case WireFormatLite::TYPE_GROUP:
+ case WireFormatLite::TYPE_MESSAGE:
+ case WireFormatLite::TYPE_BYTES:
+ GOOGLE_DCHECK(false);
+ return false;
+ default:
PROTOBUF_ASSUME(false);
- }
- } else {
- if (wire_type == WireFormatLite::WIRETYPE_END_GROUP) {
- // Must be the end of the message.
+ }
+ } else {
+ if (wire_type == WireFormatLite::WIRETYPE_END_GROUP) {
+ // Must be the end of the message.
input->SetLastTag(tag);
- return true;
- }
-
- // check for possible extensions
- if (UnknownFieldHandler::ParseExtension(msg, table, input, tag)) {
- // successfully parsed
- continue;
- }
-
- // process unknown field.
+ return true;
+ }
+
+ // check for possible extensions
+ if (UnknownFieldHandler::ParseExtension(msg, table, input, tag)) {
+ // successfully parsed
+ continue;
+ }
+
+ // process unknown field.
if (PROTOBUF_PREDICT_FALSE(
!UnknownFieldHandler::Skip(msg, table, input, tag))) {
- return false;
- }
- }
- }
+ return false;
+ }
+ }
+ }
} // NOLINT(readability/fn_size)
template <typename UnknownFieldHandler>
@@ -788,12 +788,12 @@ bool MergePartialFromCodedStreamImpl(MessageLite* msg, const ParseTable& table,
UnknownFieldHandler, std::numeric_limits<uint32>::max()>(msg, table,
input);
}
-}
-
-} // namespace internal
-} // namespace protobuf
+}
+
+} // namespace internal
+} // namespace protobuf
} // namespace google
-
+
#include <google/protobuf/port_undef.inc>
-#endif // GOOGLE_PROTOBUF_GENERATED_MESSAGE_TABLE_DRIVEN_LITE_H__
+#endif // GOOGLE_PROTOBUF_GENERATED_MESSAGE_TABLE_DRIVEN_LITE_H__
diff --git a/contrib/libs/protobuf/src/google/protobuf/generated_message_util.cc b/contrib/libs/protobuf/src/google/protobuf/generated_message_util.cc
index 01ad8b7d2e..7e81ad8e94 100644
--- a/contrib/libs/protobuf/src/google/protobuf/generated_message_util.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_util.cc
@@ -36,7 +36,7 @@
#include <atomic>
#include <limits>
-#include <vector>
+#include <vector>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
@@ -72,7 +72,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_CONSTINIT std::atomic<bool> init_protobuf_defaults_state{false};
static bool InitProtobufDefaultsImpl() {
- fixed_address_empty_string.DefaultConstruct();
+ fixed_address_empty_string.DefaultConstruct();
OnShutdownDestroyString(fixed_address_empty_string.get_mutable());
@@ -101,599 +101,599 @@ size_t StringSpaceUsedExcludingSelfLong(const TProtoStringType& str) {
}
}
-template <typename T>
-const T& Get(const void* ptr) {
- return *static_cast<const T*>(ptr);
-}
-
-// PrimitiveTypeHelper is a wrapper around the interface of WireFormatLite.
-// WireFormatLite has a very inconvenient interface with respect to template
-// meta-programming. This class wraps the different named functions into
-// a single Serialize / SerializeToArray interface.
-template <int type>
-struct PrimitiveTypeHelper;
-
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_BOOL> {
- typedef bool Type;
+template <typename T>
+const T& Get(const void* ptr) {
+ return *static_cast<const T*>(ptr);
+}
+
+// PrimitiveTypeHelper is a wrapper around the interface of WireFormatLite.
+// WireFormatLite has a very inconvenient interface with respect to template
+// meta-programming. This class wraps the different named functions into
+// a single Serialize / SerializeToArray interface.
+template <int type>
+struct PrimitiveTypeHelper;
+
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_BOOL> {
+ typedef bool Type;
static void Serialize(const void* ptr, io::CodedOutputStream* output) {
- WireFormatLite::WriteBoolNoTag(Get<bool>(ptr), output);
- }
- static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
- return WireFormatLite::WriteBoolNoTagToArray(Get<Type>(ptr), buffer);
- }
-};
-
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_INT32> {
- typedef int32 Type;
+ WireFormatLite::WriteBoolNoTag(Get<bool>(ptr), output);
+ }
+ static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
+ return WireFormatLite::WriteBoolNoTagToArray(Get<Type>(ptr), buffer);
+ }
+};
+
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_INT32> {
+ typedef int32 Type;
static void Serialize(const void* ptr, io::CodedOutputStream* output) {
- WireFormatLite::WriteInt32NoTag(Get<int32>(ptr), output);
- }
- static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
- return WireFormatLite::WriteInt32NoTagToArray(Get<Type>(ptr), buffer);
- }
-};
-
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_SINT32> {
- typedef int32 Type;
+ WireFormatLite::WriteInt32NoTag(Get<int32>(ptr), output);
+ }
+ static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
+ return WireFormatLite::WriteInt32NoTagToArray(Get<Type>(ptr), buffer);
+ }
+};
+
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_SINT32> {
+ typedef int32 Type;
static void Serialize(const void* ptr, io::CodedOutputStream* output) {
- WireFormatLite::WriteSInt32NoTag(Get<int32>(ptr), output);
- }
- static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
- return WireFormatLite::WriteSInt32NoTagToArray(Get<Type>(ptr), buffer);
- }
-};
-
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_UINT32> {
- typedef uint32 Type;
+ WireFormatLite::WriteSInt32NoTag(Get<int32>(ptr), output);
+ }
+ static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
+ return WireFormatLite::WriteSInt32NoTagToArray(Get<Type>(ptr), buffer);
+ }
+};
+
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_UINT32> {
+ typedef uint32 Type;
static void Serialize(const void* ptr, io::CodedOutputStream* output) {
- WireFormatLite::WriteUInt32NoTag(Get<uint32>(ptr), output);
- }
- static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
- return WireFormatLite::WriteUInt32NoTagToArray(Get<Type>(ptr), buffer);
- }
-};
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_INT64> {
- typedef int64 Type;
+ WireFormatLite::WriteUInt32NoTag(Get<uint32>(ptr), output);
+ }
+ static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
+ return WireFormatLite::WriteUInt32NoTagToArray(Get<Type>(ptr), buffer);
+ }
+};
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_INT64> {
+ typedef int64 Type;
static void Serialize(const void* ptr, io::CodedOutputStream* output) {
- WireFormatLite::WriteInt64NoTag(Get<int64>(ptr), output);
- }
- static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
- return WireFormatLite::WriteInt64NoTagToArray(Get<Type>(ptr), buffer);
- }
-};
-
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_SINT64> {
- typedef int64 Type;
+ WireFormatLite::WriteInt64NoTag(Get<int64>(ptr), output);
+ }
+ static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
+ return WireFormatLite::WriteInt64NoTagToArray(Get<Type>(ptr), buffer);
+ }
+};
+
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_SINT64> {
+ typedef int64 Type;
static void Serialize(const void* ptr, io::CodedOutputStream* output) {
- WireFormatLite::WriteSInt64NoTag(Get<int64>(ptr), output);
- }
- static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
- return WireFormatLite::WriteSInt64NoTagToArray(Get<Type>(ptr), buffer);
- }
-};
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_UINT64> {
- typedef uint64 Type;
+ WireFormatLite::WriteSInt64NoTag(Get<int64>(ptr), output);
+ }
+ static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
+ return WireFormatLite::WriteSInt64NoTagToArray(Get<Type>(ptr), buffer);
+ }
+};
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_UINT64> {
+ typedef uint64 Type;
static void Serialize(const void* ptr, io::CodedOutputStream* output) {
- WireFormatLite::WriteUInt64NoTag(Get<uint64>(ptr), output);
- }
- static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
- return WireFormatLite::WriteUInt64NoTagToArray(Get<Type>(ptr), buffer);
- }
-};
-
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_FIXED32> {
- typedef uint32 Type;
+ WireFormatLite::WriteUInt64NoTag(Get<uint64>(ptr), output);
+ }
+ static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
+ return WireFormatLite::WriteUInt64NoTagToArray(Get<Type>(ptr), buffer);
+ }
+};
+
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_FIXED32> {
+ typedef uint32 Type;
static void Serialize(const void* ptr, io::CodedOutputStream* output) {
- WireFormatLite::WriteFixed32NoTag(Get<uint32>(ptr), output);
- }
- static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
- return WireFormatLite::WriteFixed32NoTagToArray(Get<Type>(ptr), buffer);
- }
-};
-
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_FIXED64> {
- typedef uint64 Type;
+ WireFormatLite::WriteFixed32NoTag(Get<uint32>(ptr), output);
+ }
+ static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
+ return WireFormatLite::WriteFixed32NoTagToArray(Get<Type>(ptr), buffer);
+ }
+};
+
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_FIXED64> {
+ typedef uint64 Type;
static void Serialize(const void* ptr, io::CodedOutputStream* output) {
- WireFormatLite::WriteFixed64NoTag(Get<uint64>(ptr), output);
- }
- static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
- return WireFormatLite::WriteFixed64NoTagToArray(Get<Type>(ptr), buffer);
- }
-};
-
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_ENUM>
- : PrimitiveTypeHelper<WireFormatLite::TYPE_INT32> {};
-
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_SFIXED32>
- : PrimitiveTypeHelper<WireFormatLite::TYPE_FIXED32> {
- typedef int32 Type;
-};
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_SFIXED64>
- : PrimitiveTypeHelper<WireFormatLite::TYPE_FIXED64> {
- typedef int64 Type;
-};
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_FLOAT>
- : PrimitiveTypeHelper<WireFormatLite::TYPE_FIXED32> {
- typedef float Type;
-};
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_DOUBLE>
- : PrimitiveTypeHelper<WireFormatLite::TYPE_FIXED64> {
- typedef double Type;
-};
-
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_STRING> {
+ WireFormatLite::WriteFixed64NoTag(Get<uint64>(ptr), output);
+ }
+ static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
+ return WireFormatLite::WriteFixed64NoTagToArray(Get<Type>(ptr), buffer);
+ }
+};
+
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_ENUM>
+ : PrimitiveTypeHelper<WireFormatLite::TYPE_INT32> {};
+
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_SFIXED32>
+ : PrimitiveTypeHelper<WireFormatLite::TYPE_FIXED32> {
+ typedef int32 Type;
+};
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_SFIXED64>
+ : PrimitiveTypeHelper<WireFormatLite::TYPE_FIXED64> {
+ typedef int64 Type;
+};
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_FLOAT>
+ : PrimitiveTypeHelper<WireFormatLite::TYPE_FIXED32> {
+ typedef float Type;
+};
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_DOUBLE>
+ : PrimitiveTypeHelper<WireFormatLite::TYPE_FIXED64> {
+ typedef double Type;
+};
+
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_STRING> {
typedef TProtoStringType Type;
static void Serialize(const void* ptr, io::CodedOutputStream* output) {
- const Type& value = *static_cast<const Type*>(ptr);
- output->WriteVarint32(value.size());
- output->WriteRawMaybeAliased(value.data(), value.size());
- }
- static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
- const Type& value = *static_cast<const Type*>(ptr);
- return io::CodedOutputStream::WriteStringWithSizeToArray(value, buffer);
- }
-};
-
-template <>
-struct PrimitiveTypeHelper<WireFormatLite::TYPE_BYTES>
- : PrimitiveTypeHelper<WireFormatLite::TYPE_STRING> {};
-
-
-// We want to serialize to both CodedOutputStream and directly into byte arrays
-// without duplicating the code. In fact we might want extra output channels in
-// the future.
-template <typename O, int type>
-struct OutputHelper;
-
-template <int type, typename O>
-void SerializeTo(const void* ptr, O* output) {
- OutputHelper<O, type>::Serialize(ptr, output);
-}
-
-template <typename O>
-void WriteTagTo(uint32 tag, O* output) {
- SerializeTo<WireFormatLite::TYPE_UINT32>(&tag, output);
-}
-
-template <typename O>
-void WriteLengthTo(uint32 length, O* output) {
- SerializeTo<WireFormatLite::TYPE_UINT32>(&length, output);
-}
-
-// Specialization for coded output stream
-template <int type>
+ const Type& value = *static_cast<const Type*>(ptr);
+ output->WriteVarint32(value.size());
+ output->WriteRawMaybeAliased(value.data(), value.size());
+ }
+ static uint8* SerializeToArray(const void* ptr, uint8* buffer) {
+ const Type& value = *static_cast<const Type*>(ptr);
+ return io::CodedOutputStream::WriteStringWithSizeToArray(value, buffer);
+ }
+};
+
+template <>
+struct PrimitiveTypeHelper<WireFormatLite::TYPE_BYTES>
+ : PrimitiveTypeHelper<WireFormatLite::TYPE_STRING> {};
+
+
+// We want to serialize to both CodedOutputStream and directly into byte arrays
+// without duplicating the code. In fact we might want extra output channels in
+// the future.
+template <typename O, int type>
+struct OutputHelper;
+
+template <int type, typename O>
+void SerializeTo(const void* ptr, O* output) {
+ OutputHelper<O, type>::Serialize(ptr, output);
+}
+
+template <typename O>
+void WriteTagTo(uint32 tag, O* output) {
+ SerializeTo<WireFormatLite::TYPE_UINT32>(&tag, output);
+}
+
+template <typename O>
+void WriteLengthTo(uint32 length, O* output) {
+ SerializeTo<WireFormatLite::TYPE_UINT32>(&length, output);
+}
+
+// Specialization for coded output stream
+template <int type>
struct OutputHelper<io::CodedOutputStream, type> {
static void Serialize(const void* ptr, io::CodedOutputStream* output) {
- PrimitiveTypeHelper<type>::Serialize(ptr, output);
- }
-};
-
-// Specialization for writing into a plain array
-struct ArrayOutput {
- uint8* ptr;
- bool is_deterministic;
-};
-
-template <int type>
-struct OutputHelper<ArrayOutput, type> {
- static void Serialize(const void* ptr, ArrayOutput* output) {
- output->ptr = PrimitiveTypeHelper<type>::SerializeToArray(ptr, output->ptr);
- }
-};
-
-void SerializeMessageNoTable(const MessageLite* msg,
+ PrimitiveTypeHelper<type>::Serialize(ptr, output);
+ }
+};
+
+// Specialization for writing into a plain array
+struct ArrayOutput {
+ uint8* ptr;
+ bool is_deterministic;
+};
+
+template <int type>
+struct OutputHelper<ArrayOutput, type> {
+ static void Serialize(const void* ptr, ArrayOutput* output) {
+ output->ptr = PrimitiveTypeHelper<type>::SerializeToArray(ptr, output->ptr);
+ }
+};
+
+void SerializeMessageNoTable(const MessageLite* msg,
io::CodedOutputStream* output) {
- msg->SerializeWithCachedSizes(output);
-}
-
-void SerializeMessageNoTable(const MessageLite* msg, ArrayOutput* output) {
+ msg->SerializeWithCachedSizes(output);
+}
+
+void SerializeMessageNoTable(const MessageLite* msg, ArrayOutput* output) {
io::ArrayOutputStream array_stream(output->ptr, INT_MAX);
io::CodedOutputStream o(&array_stream);
o.SetSerializationDeterministic(output->is_deterministic);
msg->SerializeWithCachedSizes(&o);
output->ptr += o.ByteCount();
-}
-
-// Helper to branch to fast path if possible
+}
+
+// Helper to branch to fast path if possible
void SerializeMessageDispatch(const MessageLite& msg,
- const FieldMetadata* field_table, int num_fields,
- int32 cached_size,
+ const FieldMetadata* field_table, int num_fields,
+ int32 cached_size,
io::CodedOutputStream* output) {
- const uint8* base = reinterpret_cast<const uint8*>(&msg);
- SerializeInternal(base, field_table, num_fields, output);
-}
-
-// Helper to branch to fast path if possible
+ const uint8* base = reinterpret_cast<const uint8*>(&msg);
+ SerializeInternal(base, field_table, num_fields, output);
+}
+
+// Helper to branch to fast path if possible
void SerializeMessageDispatch(const MessageLite& msg,
- const FieldMetadata* field_table, int num_fields,
- int32 cached_size, ArrayOutput* output) {
- const uint8* base = reinterpret_cast<const uint8*>(&msg);
- output->ptr = SerializeInternalToArray(base, field_table, num_fields,
- output->is_deterministic, output->ptr);
-}
-
-// Serializing messages is special as it's not a primitive type and needs an
-// explicit overload for each output type.
-template <typename O>
-void SerializeMessageTo(const MessageLite* msg, const void* table_ptr,
- O* output) {
- const SerializationTable* table =
- static_cast<const SerializationTable*>(table_ptr);
- if (!table) {
- // Proto1
- WriteLengthTo(msg->GetCachedSize(), output);
- SerializeMessageNoTable(msg, output);
- return;
- }
- const FieldMetadata* field_table = table->field_table;
- const uint8* base = reinterpret_cast<const uint8*>(msg);
- int cached_size = *reinterpret_cast<const int32*>(base + field_table->offset);
- WriteLengthTo(cached_size, output);
- int num_fields = table->num_fields - 1;
- SerializeMessageDispatch(*msg, field_table + 1, num_fields, cached_size,
- output);
-}
-
-// Almost the same as above only it doesn't output the length field.
-template <typename O>
-void SerializeGroupTo(const MessageLite* msg, const void* table_ptr,
- O* output) {
- const SerializationTable* table =
- static_cast<const SerializationTable*>(table_ptr);
- if (!table) {
- // Proto1
- SerializeMessageNoTable(msg, output);
- return;
- }
- const FieldMetadata* field_table = table->field_table;
- const uint8* base = reinterpret_cast<const uint8*>(msg);
- int cached_size = *reinterpret_cast<const int32*>(base + field_table->offset);
- int num_fields = table->num_fields - 1;
- SerializeMessageDispatch(*msg, field_table + 1, num_fields, cached_size,
- output);
-}
-
-template <int type>
-struct SingularFieldHelper {
- template <typename O>
- static void Serialize(const void* field, const FieldMetadata& md, O* output) {
- WriteTagTo(md.tag, output);
- SerializeTo<type>(field, output);
- }
-};
-
-template <>
-struct SingularFieldHelper<WireFormatLite::TYPE_STRING> {
- template <typename O>
- static void Serialize(const void* field, const FieldMetadata& md, O* output) {
- WriteTagTo(md.tag, output);
- SerializeTo<WireFormatLite::TYPE_STRING>(&Get<ArenaStringPtr>(field).Get(),
- output);
- }
-};
-
-template <>
-struct SingularFieldHelper<WireFormatLite::TYPE_BYTES>
- : SingularFieldHelper<WireFormatLite::TYPE_STRING> {};
-
-template <>
-struct SingularFieldHelper<WireFormatLite::TYPE_GROUP> {
- template <typename O>
- static void Serialize(const void* field, const FieldMetadata& md, O* output) {
- WriteTagTo(md.tag, output);
- SerializeGroupTo(Get<const MessageLite*>(field),
- static_cast<const SerializationTable*>(md.ptr), output);
- WriteTagTo(md.tag + 1, output);
- }
-};
-
-template <>
-struct SingularFieldHelper<WireFormatLite::TYPE_MESSAGE> {
- template <typename O>
- static void Serialize(const void* field, const FieldMetadata& md, O* output) {
- WriteTagTo(md.tag, output);
- SerializeMessageTo(Get<const MessageLite*>(field),
- static_cast<const SerializationTable*>(md.ptr), output);
- }
-};
-
-template <int type>
-struct RepeatedFieldHelper {
- template <typename O>
- static void Serialize(const void* field, const FieldMetadata& md, O* output) {
- typedef typename PrimitiveTypeHelper<type>::Type T;
- const RepeatedField<T>& array = Get<RepeatedField<T> >(field);
- for (int i = 0; i < array.size(); i++) {
- WriteTagTo(md.tag, output);
- SerializeTo<type>(&array[i], output);
- }
- }
-};
-
-// We need to use a helper class to get access to the private members
-class AccessorHelper {
- public:
- static int Size(const RepeatedPtrFieldBase& x) { return x.size(); }
- static void const* Get(const RepeatedPtrFieldBase& x, int idx) {
- return x.raw_data()[idx];
- }
-};
-
-template <>
-struct RepeatedFieldHelper<WireFormatLite::TYPE_STRING> {
- template <typename O>
- static void Serialize(const void* field, const FieldMetadata& md, O* output) {
- const internal::RepeatedPtrFieldBase& array =
- Get<internal::RepeatedPtrFieldBase>(field);
- for (int i = 0; i < AccessorHelper::Size(array); i++) {
- WriteTagTo(md.tag, output);
- SerializeTo<WireFormatLite::TYPE_STRING>(AccessorHelper::Get(array, i),
- output);
- }
- }
-};
-
-template <>
-struct RepeatedFieldHelper<WireFormatLite::TYPE_BYTES>
- : RepeatedFieldHelper<WireFormatLite::TYPE_STRING> {};
-
-template <>
-struct RepeatedFieldHelper<WireFormatLite::TYPE_GROUP> {
- template <typename O>
- static void Serialize(const void* field, const FieldMetadata& md, O* output) {
- const internal::RepeatedPtrFieldBase& array =
- Get<internal::RepeatedPtrFieldBase>(field);
- for (int i = 0; i < AccessorHelper::Size(array); i++) {
- WriteTagTo(md.tag, output);
- SerializeGroupTo(
- static_cast<const MessageLite*>(AccessorHelper::Get(array, i)),
- static_cast<const SerializationTable*>(md.ptr), output);
- WriteTagTo(md.tag + 1, output);
- }
- }
-};
-
-template <>
-struct RepeatedFieldHelper<WireFormatLite::TYPE_MESSAGE> {
- template <typename O>
- static void Serialize(const void* field, const FieldMetadata& md, O* output) {
- const internal::RepeatedPtrFieldBase& array =
- Get<internal::RepeatedPtrFieldBase>(field);
- for (int i = 0; i < AccessorHelper::Size(array); i++) {
- WriteTagTo(md.tag, output);
- SerializeMessageTo(
+ const FieldMetadata* field_table, int num_fields,
+ int32 cached_size, ArrayOutput* output) {
+ const uint8* base = reinterpret_cast<const uint8*>(&msg);
+ output->ptr = SerializeInternalToArray(base, field_table, num_fields,
+ output->is_deterministic, output->ptr);
+}
+
+// Serializing messages is special as it's not a primitive type and needs an
+// explicit overload for each output type.
+template <typename O>
+void SerializeMessageTo(const MessageLite* msg, const void* table_ptr,
+ O* output) {
+ const SerializationTable* table =
+ static_cast<const SerializationTable*>(table_ptr);
+ if (!table) {
+ // Proto1
+ WriteLengthTo(msg->GetCachedSize(), output);
+ SerializeMessageNoTable(msg, output);
+ return;
+ }
+ const FieldMetadata* field_table = table->field_table;
+ const uint8* base = reinterpret_cast<const uint8*>(msg);
+ int cached_size = *reinterpret_cast<const int32*>(base + field_table->offset);
+ WriteLengthTo(cached_size, output);
+ int num_fields = table->num_fields - 1;
+ SerializeMessageDispatch(*msg, field_table + 1, num_fields, cached_size,
+ output);
+}
+
+// Almost the same as above only it doesn't output the length field.
+template <typename O>
+void SerializeGroupTo(const MessageLite* msg, const void* table_ptr,
+ O* output) {
+ const SerializationTable* table =
+ static_cast<const SerializationTable*>(table_ptr);
+ if (!table) {
+ // Proto1
+ SerializeMessageNoTable(msg, output);
+ return;
+ }
+ const FieldMetadata* field_table = table->field_table;
+ const uint8* base = reinterpret_cast<const uint8*>(msg);
+ int cached_size = *reinterpret_cast<const int32*>(base + field_table->offset);
+ int num_fields = table->num_fields - 1;
+ SerializeMessageDispatch(*msg, field_table + 1, num_fields, cached_size,
+ output);
+}
+
+template <int type>
+struct SingularFieldHelper {
+ template <typename O>
+ static void Serialize(const void* field, const FieldMetadata& md, O* output) {
+ WriteTagTo(md.tag, output);
+ SerializeTo<type>(field, output);
+ }
+};
+
+template <>
+struct SingularFieldHelper<WireFormatLite::TYPE_STRING> {
+ template <typename O>
+ static void Serialize(const void* field, const FieldMetadata& md, O* output) {
+ WriteTagTo(md.tag, output);
+ SerializeTo<WireFormatLite::TYPE_STRING>(&Get<ArenaStringPtr>(field).Get(),
+ output);
+ }
+};
+
+template <>
+struct SingularFieldHelper<WireFormatLite::TYPE_BYTES>
+ : SingularFieldHelper<WireFormatLite::TYPE_STRING> {};
+
+template <>
+struct SingularFieldHelper<WireFormatLite::TYPE_GROUP> {
+ template <typename O>
+ static void Serialize(const void* field, const FieldMetadata& md, O* output) {
+ WriteTagTo(md.tag, output);
+ SerializeGroupTo(Get<const MessageLite*>(field),
+ static_cast<const SerializationTable*>(md.ptr), output);
+ WriteTagTo(md.tag + 1, output);
+ }
+};
+
+template <>
+struct SingularFieldHelper<WireFormatLite::TYPE_MESSAGE> {
+ template <typename O>
+ static void Serialize(const void* field, const FieldMetadata& md, O* output) {
+ WriteTagTo(md.tag, output);
+ SerializeMessageTo(Get<const MessageLite*>(field),
+ static_cast<const SerializationTable*>(md.ptr), output);
+ }
+};
+
+template <int type>
+struct RepeatedFieldHelper {
+ template <typename O>
+ static void Serialize(const void* field, const FieldMetadata& md, O* output) {
+ typedef typename PrimitiveTypeHelper<type>::Type T;
+ const RepeatedField<T>& array = Get<RepeatedField<T> >(field);
+ for (int i = 0; i < array.size(); i++) {
+ WriteTagTo(md.tag, output);
+ SerializeTo<type>(&array[i], output);
+ }
+ }
+};
+
+// We need to use a helper class to get access to the private members
+class AccessorHelper {
+ public:
+ static int Size(const RepeatedPtrFieldBase& x) { return x.size(); }
+ static void const* Get(const RepeatedPtrFieldBase& x, int idx) {
+ return x.raw_data()[idx];
+ }
+};
+
+template <>
+struct RepeatedFieldHelper<WireFormatLite::TYPE_STRING> {
+ template <typename O>
+ static void Serialize(const void* field, const FieldMetadata& md, O* output) {
+ const internal::RepeatedPtrFieldBase& array =
+ Get<internal::RepeatedPtrFieldBase>(field);
+ for (int i = 0; i < AccessorHelper::Size(array); i++) {
+ WriteTagTo(md.tag, output);
+ SerializeTo<WireFormatLite::TYPE_STRING>(AccessorHelper::Get(array, i),
+ output);
+ }
+ }
+};
+
+template <>
+struct RepeatedFieldHelper<WireFormatLite::TYPE_BYTES>
+ : RepeatedFieldHelper<WireFormatLite::TYPE_STRING> {};
+
+template <>
+struct RepeatedFieldHelper<WireFormatLite::TYPE_GROUP> {
+ template <typename O>
+ static void Serialize(const void* field, const FieldMetadata& md, O* output) {
+ const internal::RepeatedPtrFieldBase& array =
+ Get<internal::RepeatedPtrFieldBase>(field);
+ for (int i = 0; i < AccessorHelper::Size(array); i++) {
+ WriteTagTo(md.tag, output);
+ SerializeGroupTo(
+ static_cast<const MessageLite*>(AccessorHelper::Get(array, i)),
+ static_cast<const SerializationTable*>(md.ptr), output);
+ WriteTagTo(md.tag + 1, output);
+ }
+ }
+};
+
+template <>
+struct RepeatedFieldHelper<WireFormatLite::TYPE_MESSAGE> {
+ template <typename O>
+ static void Serialize(const void* field, const FieldMetadata& md, O* output) {
+ const internal::RepeatedPtrFieldBase& array =
+ Get<internal::RepeatedPtrFieldBase>(field);
+ for (int i = 0; i < AccessorHelper::Size(array); i++) {
+ WriteTagTo(md.tag, output);
+ SerializeMessageTo(
static_cast<const MessageLite*>(AccessorHelper::Get(array, i)),
md.ptr, output);
- }
- }
-};
-
-
-template <int type>
-struct PackedFieldHelper {
- template <typename O>
- static void Serialize(const void* field, const FieldMetadata& md, O* output) {
- typedef typename PrimitiveTypeHelper<type>::Type T;
- const RepeatedField<T>& array = Get<RepeatedField<T> >(field);
- if (array.empty()) return;
- WriteTagTo(md.tag, output);
- int cached_size =
- Get<int>(static_cast<const uint8*>(field) + sizeof(RepeatedField<T>));
- WriteLengthTo(cached_size, output);
- for (int i = 0; i < array.size(); i++) {
- SerializeTo<type>(&array[i], output);
- }
- }
-};
-
-template <>
-struct PackedFieldHelper<WireFormatLite::TYPE_STRING> {
- template <typename O>
- static void Serialize(const void* field, const FieldMetadata& md, O* output) {
- GOOGLE_LOG(FATAL) << "Not implemented field number " << md.tag << " with type "
- << md.type;
- }
-};
-
-template <>
-struct PackedFieldHelper<WireFormatLite::TYPE_BYTES>
- : PackedFieldHelper<WireFormatLite::TYPE_STRING> {};
-template <>
-struct PackedFieldHelper<WireFormatLite::TYPE_GROUP>
- : PackedFieldHelper<WireFormatLite::TYPE_STRING> {};
-template <>
-struct PackedFieldHelper<WireFormatLite::TYPE_MESSAGE>
- : PackedFieldHelper<WireFormatLite::TYPE_STRING> {};
-
-template <int type>
-struct OneOfFieldHelper {
- template <typename O>
- static void Serialize(const void* field, const FieldMetadata& md, O* output) {
- SingularFieldHelper<type>::Serialize(field, md, output);
- }
-};
-
-
-void SerializeNotImplemented(int field) {
- GOOGLE_LOG(FATAL) << "Not implemented field number " << field;
-}
-
-// When switching to c++11 we should make these constexpr functions
-#define SERIALIZE_TABLE_OP(type, type_class) \
- ((type - 1) + static_cast<int>(type_class) * FieldMetadata::kNumTypes)
-
-int FieldMetadata::CalculateType(int type,
- FieldMetadata::FieldTypeClass type_class) {
- return SERIALIZE_TABLE_OP(type, type_class);
-}
-
-template <int type>
-bool IsNull(const void* ptr) {
- return *static_cast<const typename PrimitiveTypeHelper<type>::Type*>(ptr) ==
- 0;
-}
-
-template <>
-bool IsNull<WireFormatLite::TYPE_STRING>(const void* ptr) {
- return static_cast<const ArenaStringPtr*>(ptr)->Get().size() == 0;
-}
-
-template <>
-bool IsNull<WireFormatLite::TYPE_BYTES>(const void* ptr) {
- return static_cast<const ArenaStringPtr*>(ptr)->Get().size() == 0;
-}
-
-template <>
-bool IsNull<WireFormatLite::TYPE_GROUP>(const void* ptr) {
- return Get<const MessageLite*>(ptr) == NULL;
-}
-
-template <>
-bool IsNull<WireFormatLite::TYPE_MESSAGE>(const void* ptr) {
- return Get<const MessageLite*>(ptr) == NULL;
-}
-
-
-#define SERIALIZERS_FOR_TYPE(type) \
- case SERIALIZE_TABLE_OP(type, FieldMetadata::kPresence): \
- if (!IsPresent(base, field_metadata.has_offset)) continue; \
- SingularFieldHelper<type>::Serialize(ptr, field_metadata, output); \
- break; \
- case SERIALIZE_TABLE_OP(type, FieldMetadata::kNoPresence): \
- if (IsNull<type>(ptr)) continue; \
- SingularFieldHelper<type>::Serialize(ptr, field_metadata, output); \
- break; \
- case SERIALIZE_TABLE_OP(type, FieldMetadata::kRepeated): \
- RepeatedFieldHelper<type>::Serialize(ptr, field_metadata, output); \
- break; \
- case SERIALIZE_TABLE_OP(type, FieldMetadata::kPacked): \
- PackedFieldHelper<type>::Serialize(ptr, field_metadata, output); \
- break; \
- case SERIALIZE_TABLE_OP(type, FieldMetadata::kOneOf): \
- if (!IsOneofPresent(base, field_metadata.has_offset, field_metadata.tag)) \
- continue; \
- OneOfFieldHelper<type>::Serialize(ptr, field_metadata, output); \
- break
-
-void SerializeInternal(const uint8* base,
- const FieldMetadata* field_metadata_table,
+ }
+ }
+};
+
+
+template <int type>
+struct PackedFieldHelper {
+ template <typename O>
+ static void Serialize(const void* field, const FieldMetadata& md, O* output) {
+ typedef typename PrimitiveTypeHelper<type>::Type T;
+ const RepeatedField<T>& array = Get<RepeatedField<T> >(field);
+ if (array.empty()) return;
+ WriteTagTo(md.tag, output);
+ int cached_size =
+ Get<int>(static_cast<const uint8*>(field) + sizeof(RepeatedField<T>));
+ WriteLengthTo(cached_size, output);
+ for (int i = 0; i < array.size(); i++) {
+ SerializeTo<type>(&array[i], output);
+ }
+ }
+};
+
+template <>
+struct PackedFieldHelper<WireFormatLite::TYPE_STRING> {
+ template <typename O>
+ static void Serialize(const void* field, const FieldMetadata& md, O* output) {
+ GOOGLE_LOG(FATAL) << "Not implemented field number " << md.tag << " with type "
+ << md.type;
+ }
+};
+
+template <>
+struct PackedFieldHelper<WireFormatLite::TYPE_BYTES>
+ : PackedFieldHelper<WireFormatLite::TYPE_STRING> {};
+template <>
+struct PackedFieldHelper<WireFormatLite::TYPE_GROUP>
+ : PackedFieldHelper<WireFormatLite::TYPE_STRING> {};
+template <>
+struct PackedFieldHelper<WireFormatLite::TYPE_MESSAGE>
+ : PackedFieldHelper<WireFormatLite::TYPE_STRING> {};
+
+template <int type>
+struct OneOfFieldHelper {
+ template <typename O>
+ static void Serialize(const void* field, const FieldMetadata& md, O* output) {
+ SingularFieldHelper<type>::Serialize(field, md, output);
+ }
+};
+
+
+void SerializeNotImplemented(int field) {
+ GOOGLE_LOG(FATAL) << "Not implemented field number " << field;
+}
+
+// When switching to c++11 we should make these constexpr functions
+#define SERIALIZE_TABLE_OP(type, type_class) \
+ ((type - 1) + static_cast<int>(type_class) * FieldMetadata::kNumTypes)
+
+int FieldMetadata::CalculateType(int type,
+ FieldMetadata::FieldTypeClass type_class) {
+ return SERIALIZE_TABLE_OP(type, type_class);
+}
+
+template <int type>
+bool IsNull(const void* ptr) {
+ return *static_cast<const typename PrimitiveTypeHelper<type>::Type*>(ptr) ==
+ 0;
+}
+
+template <>
+bool IsNull<WireFormatLite::TYPE_STRING>(const void* ptr) {
+ return static_cast<const ArenaStringPtr*>(ptr)->Get().size() == 0;
+}
+
+template <>
+bool IsNull<WireFormatLite::TYPE_BYTES>(const void* ptr) {
+ return static_cast<const ArenaStringPtr*>(ptr)->Get().size() == 0;
+}
+
+template <>
+bool IsNull<WireFormatLite::TYPE_GROUP>(const void* ptr) {
+ return Get<const MessageLite*>(ptr) == NULL;
+}
+
+template <>
+bool IsNull<WireFormatLite::TYPE_MESSAGE>(const void* ptr) {
+ return Get<const MessageLite*>(ptr) == NULL;
+}
+
+
+#define SERIALIZERS_FOR_TYPE(type) \
+ case SERIALIZE_TABLE_OP(type, FieldMetadata::kPresence): \
+ if (!IsPresent(base, field_metadata.has_offset)) continue; \
+ SingularFieldHelper<type>::Serialize(ptr, field_metadata, output); \
+ break; \
+ case SERIALIZE_TABLE_OP(type, FieldMetadata::kNoPresence): \
+ if (IsNull<type>(ptr)) continue; \
+ SingularFieldHelper<type>::Serialize(ptr, field_metadata, output); \
+ break; \
+ case SERIALIZE_TABLE_OP(type, FieldMetadata::kRepeated): \
+ RepeatedFieldHelper<type>::Serialize(ptr, field_metadata, output); \
+ break; \
+ case SERIALIZE_TABLE_OP(type, FieldMetadata::kPacked): \
+ PackedFieldHelper<type>::Serialize(ptr, field_metadata, output); \
+ break; \
+ case SERIALIZE_TABLE_OP(type, FieldMetadata::kOneOf): \
+ if (!IsOneofPresent(base, field_metadata.has_offset, field_metadata.tag)) \
+ continue; \
+ OneOfFieldHelper<type>::Serialize(ptr, field_metadata, output); \
+ break
+
+void SerializeInternal(const uint8* base,
+ const FieldMetadata* field_metadata_table,
int32 num_fields, io::CodedOutputStream* output) {
SpecialSerializer func = nullptr;
- for (int i = 0; i < num_fields; i++) {
- const FieldMetadata& field_metadata = field_metadata_table[i];
- const uint8* ptr = base + field_metadata.offset;
- switch (field_metadata.type) {
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_DOUBLE);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_FLOAT);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_INT64);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_UINT64);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_INT32);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_FIXED64);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_FIXED32);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_BOOL);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_STRING);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_GROUP);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_MESSAGE);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_BYTES);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_UINT32);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_ENUM);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SFIXED32);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SFIXED64);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SINT32);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SINT64);
-
- // Special cases
- case FieldMetadata::kSpecial:
+ for (int i = 0; i < num_fields; i++) {
+ const FieldMetadata& field_metadata = field_metadata_table[i];
+ const uint8* ptr = base + field_metadata.offset;
+ switch (field_metadata.type) {
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_DOUBLE);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_FLOAT);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_INT64);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_UINT64);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_INT32);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_FIXED64);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_FIXED32);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_BOOL);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_STRING);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_GROUP);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_MESSAGE);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_BYTES);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_UINT32);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_ENUM);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SFIXED32);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SFIXED64);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SINT32);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SINT64);
+
+ // Special cases
+ case FieldMetadata::kSpecial:
func = reinterpret_cast<SpecialSerializer>(
const_cast<void*>(field_metadata.ptr));
func(base, field_metadata.offset, field_metadata.tag,
field_metadata.has_offset, output);
- break;
- default:
- // __builtin_unreachable()
- SerializeNotImplemented(field_metadata.type);
- }
- }
-}
-
-uint8* SerializeInternalToArray(const uint8* base,
- const FieldMetadata* field_metadata_table,
+ break;
+ default:
+ // __builtin_unreachable()
+ SerializeNotImplemented(field_metadata.type);
+ }
+ }
+}
+
+uint8* SerializeInternalToArray(const uint8* base,
+ const FieldMetadata* field_metadata_table,
int32 num_fields, bool is_deterministic,
- uint8* buffer) {
- ArrayOutput array_output = {buffer, is_deterministic};
- ArrayOutput* output = &array_output;
+ uint8* buffer) {
+ ArrayOutput array_output = {buffer, is_deterministic};
+ ArrayOutput* output = &array_output;
SpecialSerializer func = nullptr;
- for (int i = 0; i < num_fields; i++) {
- const FieldMetadata& field_metadata = field_metadata_table[i];
- const uint8* ptr = base + field_metadata.offset;
- switch (field_metadata.type) {
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_DOUBLE);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_FLOAT);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_INT64);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_UINT64);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_INT32);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_FIXED64);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_FIXED32);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_BOOL);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_STRING);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_GROUP);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_MESSAGE);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_BYTES);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_UINT32);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_ENUM);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SFIXED32);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SFIXED64);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SINT32);
- SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SINT64);
- // Special cases
- case FieldMetadata::kSpecial: {
- io::ArrayOutputStream array_stream(array_output.ptr, INT_MAX);
- io::CodedOutputStream output(&array_stream);
- output.SetSerializationDeterministic(is_deterministic);
+ for (int i = 0; i < num_fields; i++) {
+ const FieldMetadata& field_metadata = field_metadata_table[i];
+ const uint8* ptr = base + field_metadata.offset;
+ switch (field_metadata.type) {
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_DOUBLE);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_FLOAT);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_INT64);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_UINT64);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_INT32);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_FIXED64);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_FIXED32);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_BOOL);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_STRING);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_GROUP);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_MESSAGE);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_BYTES);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_UINT32);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_ENUM);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SFIXED32);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SFIXED64);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SINT32);
+ SERIALIZERS_FOR_TYPE(WireFormatLite::TYPE_SINT64);
+ // Special cases
+ case FieldMetadata::kSpecial: {
+ io::ArrayOutputStream array_stream(array_output.ptr, INT_MAX);
+ io::CodedOutputStream output(&array_stream);
+ output.SetSerializationDeterministic(is_deterministic);
func = reinterpret_cast<SpecialSerializer>(
const_cast<void*>(field_metadata.ptr));
func(base, field_metadata.offset, field_metadata.tag,
field_metadata.has_offset, &output);
- array_output.ptr += output.ByteCount();
- } break;
- default:
- // __builtin_unreachable()
- SerializeNotImplemented(field_metadata.type);
- }
- }
- return array_output.ptr;
-}
-#undef SERIALIZERS_FOR_TYPE
-
-void ExtensionSerializer(const uint8* ptr, uint32 offset, uint32 tag,
+ array_output.ptr += output.ByteCount();
+ } break;
+ default:
+ // __builtin_unreachable()
+ SerializeNotImplemented(field_metadata.type);
+ }
+ }
+ return array_output.ptr;
+}
+#undef SERIALIZERS_FOR_TYPE
+
+void ExtensionSerializer(const uint8* ptr, uint32 offset, uint32 tag,
uint32 has_offset, io::CodedOutputStream* output) {
- reinterpret_cast<const ExtensionSet*>(ptr + offset)
- ->SerializeWithCachedSizes(tag, has_offset, output);
-}
-
-void UnknownFieldSerializerLite(const uint8* ptr, uint32 offset, uint32 tag,
- uint32 has_offset,
+ reinterpret_cast<const ExtensionSet*>(ptr + offset)
+ ->SerializeWithCachedSizes(tag, has_offset, output);
+}
+
+void UnknownFieldSerializerLite(const uint8* ptr, uint32 offset, uint32 tag,
+ uint32 has_offset,
io::CodedOutputStream* output) {
- output->WriteString(
+ output->WriteString(
reinterpret_cast<const InternalMetadata*>(ptr + offset)
->unknown_fields<TProtoStringType>(&internal::GetEmptyString));
-}
-
+}
+
MessageLite* DuplicateIfNonNullInternal(MessageLite* message) {
if (message) {
MessageLite* ret = message->New();
diff --git a/contrib/libs/protobuf/src/google/protobuf/generated_message_util.h b/contrib/libs/protobuf/src/google/protobuf/generated_message_util.h
index 5ce8af148c..2f111602ec 100644
--- a/contrib/libs/protobuf/src/google/protobuf/generated_message_util.h
+++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_util.h
@@ -41,9 +41,9 @@
#include <assert.h>
#include <atomic>
-#include <climits>
+#include <climits>
#include <string>
-#include <vector>
+#include <vector>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/any.h>
@@ -68,7 +68,7 @@ namespace protobuf {
class Arena;
class Message;
-
+
namespace io {
class CodedInputStream;
}
@@ -103,7 +103,7 @@ PROTOBUF_EXPORT inline const TProtoStringType& GetEmptyString() {
return GetEmptyStringAlreadyInited();
}
-
+
// True if IsInitialized() is true for all elements of t. Type is expected
// to be a RepeatedPtrField<some message type>. It's useful to have this
// helper here to keep the protobuf compiler from ever having to emit loops in
@@ -132,21 +132,21 @@ bool AllAreInitializedWeak(const RepeatedPtrField<T>& t) {
return true;
}
-inline bool IsPresent(const void* base, uint32 hasbit) {
- const uint32* has_bits_array = static_cast<const uint32*>(base);
+inline bool IsPresent(const void* base, uint32 hasbit) {
+ const uint32* has_bits_array = static_cast<const uint32*>(base);
return (has_bits_array[hasbit / 32] & (1u << (hasbit & 31))) != 0;
-}
-
-inline bool IsOneofPresent(const void* base, uint32 offset, uint32 tag) {
- const uint32* oneof =
- reinterpret_cast<const uint32*>(static_cast<const uint8*>(base) + offset);
- return *oneof == tag >> 3;
-}
-
-typedef void (*SpecialSerializer)(const uint8* base, uint32 offset, uint32 tag,
- uint32 has_offset,
+}
+
+inline bool IsOneofPresent(const void* base, uint32 offset, uint32 tag) {
+ const uint32* oneof =
+ reinterpret_cast<const uint32*>(static_cast<const uint8*>(base) + offset);
+ return *oneof == tag >> 3;
+}
+
+typedef void (*SpecialSerializer)(const uint8* base, uint32 offset, uint32 tag,
+ uint32 has_offset,
io::CodedOutputStream* output);
-
+
PROTOBUF_EXPORT void ExtensionSerializer(const uint8* base, uint32 offset,
uint32 tag, uint32 has_offset,
io::CodedOutputStream* output);
@@ -154,7 +154,7 @@ PROTOBUF_EXPORT void UnknownFieldSerializerLite(const uint8* base,
uint32 offset, uint32 tag,
uint32 has_offset,
io::CodedOutputStream* output);
-
+
PROTOBUF_EXPORT MessageLite* DuplicateIfNonNullInternal(MessageLite* message);
PROTOBUF_EXPORT MessageLite* GetOwnedMessageInternal(Arena* message_arena,
MessageLite* submessage,
@@ -162,15 +162,15 @@ PROTOBUF_EXPORT MessageLite* GetOwnedMessageInternal(Arena* message_arena,
PROTOBUF_EXPORT void GenericSwap(MessageLite* m1, MessageLite* m2);
// We specialize GenericSwap for non-lite messages to benefit from reflection.
PROTOBUF_EXPORT void GenericSwap(Message* m1, Message* m2);
-
+
template <typename T>
T* DuplicateIfNonNull(T* message) {
// The casts must be reinterpret_cast<> because T might be a forward-declared
// type that the compiler doesn't know is related to MessageLite.
return reinterpret_cast<T*>(
DuplicateIfNonNullInternal(reinterpret_cast<MessageLite*>(message)));
-}
-
+}
+
template <typename T>
T* GetOwnedMessage(Arena* message_arena, T* submessage,
Arena* submessage_arena) {
@@ -179,30 +179,30 @@ T* GetOwnedMessage(Arena* message_arena, T* submessage,
return reinterpret_cast<T*>(GetOwnedMessageInternal(
message_arena, reinterpret_cast<MessageLite*>(submessage),
submessage_arena));
-}
-
+}
+
// Hide atomic from the public header and allow easy change to regular int
// on platforms where the atomic might have a perf impact.
class PROTOBUF_EXPORT CachedSize {
public:
int Get() const { return size_.load(std::memory_order_relaxed); }
void Set(int size) { size_.store(size, std::memory_order_relaxed); }
-
+
private:
std::atomic<int> size_{0};
-};
-
+};
+
PROTOBUF_EXPORT void DestroyMessage(const void* message);
PROTOBUF_EXPORT void DestroyString(const void* s);
// Destroy (not delete) the message
inline void OnShutdownDestroyMessage(const void* ptr) {
OnShutdownRun(DestroyMessage, ptr);
-}
+}
// Destroy the string (call TProtoStringType destructor)
inline void OnShutdownDestroyString(const TProtoStringType* ptr) {
OnShutdownRun(DestroyString, ptr);
}
-
+
} // namespace internal
} // namespace protobuf
} // namespace google
diff --git a/contrib/libs/protobuf/src/google/protobuf/has_bits.h b/contrib/libs/protobuf/src/google/protobuf/has_bits.h
index ee47f60f33..66d3cd4968 100644
--- a/contrib/libs/protobuf/src/google/protobuf/has_bits.h
+++ b/contrib/libs/protobuf/src/google/protobuf/has_bits.h
@@ -1,116 +1,116 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef GOOGLE_PROTOBUF_HAS_BITS_H__
-#define GOOGLE_PROTOBUF_HAS_BITS_H__
-
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_HAS_BITS_H__
+#define GOOGLE_PROTOBUF_HAS_BITS_H__
+
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/port.h>
-
+
#include <google/protobuf/port_def.inc>
#ifdef SWIG
#error "You cannot SWIG proto headers"
#endif
-namespace google {
-namespace protobuf {
-namespace internal {
-
+namespace google {
+namespace protobuf {
+namespace internal {
+
template <size_t doublewords>
-class HasBits {
- public:
+class HasBits {
+ public:
PROTOBUF_NDEBUG_INLINE constexpr HasBits() : has_bits_{} {}
-
+
PROTOBUF_NDEBUG_INLINE void Clear() {
- memset(has_bits_, 0, sizeof(has_bits_));
- }
-
+ memset(has_bits_, 0, sizeof(has_bits_));
+ }
+
PROTOBUF_NDEBUG_INLINE uint32& operator[](int index) {
- return has_bits_[index];
- }
-
+ return has_bits_[index];
+ }
+
PROTOBUF_NDEBUG_INLINE const uint32& operator[](int index) const {
- return has_bits_[index];
- }
-
- bool operator==(const HasBits<doublewords>& rhs) const {
- return memcmp(has_bits_, rhs.has_bits_, sizeof(has_bits_)) == 0;
- }
-
- bool operator!=(const HasBits<doublewords>& rhs) const {
- return !(*this == rhs);
- }
-
+ return has_bits_[index];
+ }
+
+ bool operator==(const HasBits<doublewords>& rhs) const {
+ return memcmp(has_bits_, rhs.has_bits_, sizeof(has_bits_)) == 0;
+ }
+
+ bool operator!=(const HasBits<doublewords>& rhs) const {
+ return !(*this == rhs);
+ }
+
void Or(const HasBits<doublewords>& rhs) {
for (size_t i = 0; i < doublewords; i++) has_bits_[i] |= rhs[i];
}
- bool empty() const;
-
- private:
+ bool empty() const;
+
+ private:
uint32 has_bits_[doublewords];
-};
-
-template <>
-inline bool HasBits<1>::empty() const {
- return !has_bits_[0];
-}
-
-template <>
-inline bool HasBits<2>::empty() const {
- return !(has_bits_[0] | has_bits_[1]);
-}
-
-template <>
-inline bool HasBits<3>::empty() const {
- return !(has_bits_[0] | has_bits_[1] | has_bits_[2]);
-}
-
-template <>
-inline bool HasBits<4>::empty() const {
- return !(has_bits_[0] | has_bits_[1] | has_bits_[2] | has_bits_[3]);
-}
-
-template <size_t doublewords>
-inline bool HasBits<doublewords>::empty() const {
- for (size_t i = 0; i < doublewords; ++i) {
- if (has_bits_[i]) return false;
- }
- return true;
-}
-
-} // namespace internal
-} // namespace protobuf
+};
+
+template <>
+inline bool HasBits<1>::empty() const {
+ return !has_bits_[0];
+}
+
+template <>
+inline bool HasBits<2>::empty() const {
+ return !(has_bits_[0] | has_bits_[1]);
+}
+
+template <>
+inline bool HasBits<3>::empty() const {
+ return !(has_bits_[0] | has_bits_[1] | has_bits_[2]);
+}
+
+template <>
+inline bool HasBits<4>::empty() const {
+ return !(has_bits_[0] | has_bits_[1] | has_bits_[2] | has_bits_[3]);
+}
+
+template <size_t doublewords>
+inline bool HasBits<doublewords>::empty() const {
+ for (size_t i = 0; i < doublewords; ++i) {
+ if (has_bits_[i]) return false;
+ }
+ return true;
+}
+
+} // namespace internal
+} // namespace protobuf
} // namespace google
-
+
#include <google/protobuf/port_undef.inc>
-#endif // GOOGLE_PROTOBUF_HAS_BITS_H__
+#endif // GOOGLE_PROTOBUF_HAS_BITS_H__
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.cc b/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.cc
index 5a4f47f930..43260d5b96 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.cc
@@ -122,13 +122,13 @@ CodedInputStream::Limit CodedInputStream::PushLimit(int byte_limit) {
Limit old_limit = current_limit_;
// security: byte_limit is possibly evil, so check for negative values
- // and overflow. Also check that the new requested limit is before the
- // previous limit; otherwise we continue to enforce the previous limit.
+ // and overflow. Also check that the new requested limit is before the
+ // previous limit; otherwise we continue to enforce the previous limit.
if (PROTOBUF_PREDICT_TRUE(byte_limit >= 0 &&
byte_limit <= INT_MAX - current_position &&
byte_limit < current_limit_ - current_position)) {
current_limit_ = current_position + byte_limit;
- RecomputeBufferLimits();
+ RecomputeBufferLimits();
}
return old_limit;
@@ -199,7 +199,7 @@ void CodedInputStream::PrintTotalBytesLimitError() {
"in third_party/protobuf/src/google/protobuf/io/coded_stream.h.";
}
-bool CodedInputStream::SkipFallback(int count, int original_buffer_size) {
+bool CodedInputStream::SkipFallback(int count, int original_buffer_size) {
if (buffer_size_after_limit_ > 0) {
// We hit a limit inside this buffer. Advance to the limit and fail.
Advance(original_buffer_size);
@@ -574,15 +574,15 @@ bool CodedInputStream::ReadVarint64Slow(uint64* value) {
uint32 b;
do {
- if (count == kMaxVarintBytes) {
- *value = 0;
- return false;
- }
+ if (count == kMaxVarintBytes) {
+ *value = 0;
+ return false;
+ }
while (buffer_ == buffer_end_) {
- if (!Refresh()) {
- *value = 0;
- return false;
- }
+ if (!Refresh()) {
+ *value = 0;
+ return false;
+ }
}
b = *buffer_;
result |= static_cast<uint64>(b & 0x7F) << (7 * count);
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.h b/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.h
index f959cd5148..534627cd50 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.h
+++ b/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.h
@@ -113,7 +113,7 @@
#include <assert.h>
#include <atomic>
-#include <climits>
+#include <climits>
#include <cstddef>
#include <cstring>
#include <string>
@@ -166,7 +166,7 @@ namespace internal {
void MapTestForceDeterministic();
class EpsCopyByteStream;
} // namespace internal
-
+
namespace io {
// Defined in this file.
@@ -209,7 +209,7 @@ class PROTOBUF_EXPORT CodedInputStream {
// Skips a number of bytes. Returns false if an underlying read error
// occurs.
- inline bool Skip(int count);
+ inline bool Skip(int count);
// Sets *data to point directly at the unread part of the CodedInputStream's
// underlying buffer, and *size to the size of that buffer, but does not
@@ -265,17 +265,17 @@ class PROTOBUF_EXPORT CodedInputStream {
bool ReadVarintSizeAsInt(int* value);
// Read a tag. This calls ReadVarint32() and returns the result, or returns
- // zero (which is not a valid tag) if ReadVarint32() fails. Also, ReadTag
- // (but not ReadTagNoLastTag) updates the last tag value, which can be checked
- // with LastTagWas().
- //
+ // zero (which is not a valid tag) if ReadVarint32() fails. Also, ReadTag
+ // (but not ReadTagNoLastTag) updates the last tag value, which can be checked
+ // with LastTagWas().
+ //
// Always inline because this is only called in one place per parse loop
// but it is called for every iteration of said loop, so it should be fast.
// GCC doesn't want to inline this by default.
PROTOBUF_ALWAYS_INLINE uint32 ReadTag() {
- return last_tag_ = ReadTagNoLastTag();
- }
-
+ return last_tag_ = ReadTagNoLastTag();
+ }
+
PROTOBUF_ALWAYS_INLINE uint32 ReadTagNoLastTag();
// This usually a faster alternative to ReadTag() when cutoff is a manifest
@@ -288,11 +288,11 @@ class PROTOBUF_EXPORT CodedInputStream {
// to avoid an extra "is tag == 0?" check here.)
PROTOBUF_ALWAYS_INLINE
std::pair<uint32, bool> ReadTagWithCutoff(uint32 cutoff) {
- std::pair<uint32, bool> result = ReadTagWithCutoffNoLastTag(cutoff);
- last_tag_ = result.first;
- return result;
- }
-
+ std::pair<uint32, bool> result = ReadTagWithCutoffNoLastTag(cutoff);
+ last_tag_ = result.first;
+ return result;
+ }
+
PROTOBUF_ALWAYS_INLINE
std::pair<uint32, bool> ReadTagWithCutoffNoLastTag(uint32 cutoff);
@@ -321,10 +321,10 @@ class PROTOBUF_EXPORT CodedInputStream {
// zero, and ConsumedEntireMessage() will return true.
bool ExpectAtEnd();
- // If the last call to ReadTag() or ReadTagWithCutoff() returned the given
- // value, returns true. Otherwise, returns false.
- // ReadTagNoLastTag/ReadTagWithCutoffNoLastTag do not preserve the last
- // returned value.
+ // If the last call to ReadTag() or ReadTagWithCutoff() returned the given
+ // value, returns true. Otherwise, returns false.
+ // ReadTagNoLastTag/ReadTagWithCutoffNoLastTag do not preserve the last
+ // returned value.
//
// This is needed because parsers for some types of embedded messages
// (with field type TYPE_GROUP) don't actually know that they've reached the
@@ -333,7 +333,7 @@ class PROTOBUF_EXPORT CodedInputStream {
// tag to make sure it had the right number, so it calls LastTagWas() on
// return from the embedded parser to check.
bool LastTagWas(uint32 expected);
- void SetLastTag(uint32 tag) { last_tag_ = tag; }
+ void SetLastTag(uint32 tag) { last_tag_ = tag; }
// When parsing message (but NOT a group), this method must be called
// immediately after MergeFromCodedStream() returns (if it returns true)
@@ -586,9 +586,9 @@ class PROTOBUF_EXPORT CodedInputStream {
// Private member functions.
- // Fallback when Skip() goes past the end of the current buffer.
- bool SkipFallback(int count, int original_buffer_size);
-
+ // Fallback when Skip() goes past the end of the current buffer.
+ bool SkipFallback(int count, int original_buffer_size);
+
// Advance the buffer by a given number of bytes.
void Advance(int amount);
@@ -625,7 +625,7 @@ class PROTOBUF_EXPORT CodedInputStream {
int ReadVarintSizeAsIntSlow();
bool ReadLittleEndian32Fallback(uint32* value);
bool ReadLittleEndian64Fallback(uint64* value);
-
+
// Fallback/slow methods for reading tags. These do not update last_tag_,
// but will set legitimate_message_end_ if we are at the end of the input
// stream.
@@ -636,7 +636,7 @@ class PROTOBUF_EXPORT CodedInputStream {
// Return the size of the buffer.
int BufferSize() const;
- static const int kDefaultTotalBytesLimit = INT_MAX;
+ static const int kDefaultTotalBytesLimit = INT_MAX;
static int default_recursion_limit_; // 100 by default.
@@ -1173,12 +1173,12 @@ class PROTOBUF_EXPORT CodedOutputStream {
static uint8* WriteTagToArray(uint32 value, uint8* target);
// Returns the number of bytes needed to encode the given value as a varint.
- static size_t VarintSize32(uint32 value);
+ static size_t VarintSize32(uint32 value);
// Returns the number of bytes needed to encode the given value as a varint.
- static size_t VarintSize64(uint64 value);
+ static size_t VarintSize64(uint64 value);
// If negative, 10 bytes. Otherwise, same as VarintSize32().
- static size_t VarintSize32SignExtended(int32 value);
+ static size_t VarintSize32SignExtended(int32 value);
// Compile-time equivalent of VarintSize32().
template <uint32 Value>
@@ -1232,15 +1232,15 @@ class PROTOBUF_EXPORT CodedOutputStream {
}
// Return whether the user wants deterministic serialization. See above.
- bool IsSerializationDeterministic() const {
+ bool IsSerializationDeterministic() const {
return impl_.IsSerializationDeterministic();
}
- static bool IsDefaultSerializationDeterministic() {
+ static bool IsDefaultSerializationDeterministic() {
return default_serialization_deterministic_.load(
std::memory_order_relaxed) != 0;
- }
-
+ }
+
template <typename Func>
void Serialize(const Func& func);
@@ -1255,12 +1255,12 @@ class PROTOBUF_EXPORT CodedOutputStream {
static std::atomic<bool> default_serialization_deterministic_;
// See above. Other projects may use "friend" to allow them to call this.
- // After SetDefaultSerializationDeterministic() completes, all protocol
- // buffer serializations will be deterministic by default. Thread safe.
- // However, the meaning of "after" is subtle here: to be safe, each thread
- // that wants deterministic serialization by default needs to call
- // SetDefaultSerializationDeterministic() or ensure on its own that another
- // thread has done so.
+ // After SetDefaultSerializationDeterministic() completes, all protocol
+ // buffer serializations will be deterministic by default. Thread safe.
+ // However, the meaning of "after" is subtle here: to be safe, each thread
+ // that wants deterministic serialization by default needs to call
+ // SetDefaultSerializationDeterministic() or ensure on its own that another
+ // thread has done so.
friend void internal::MapTestForceDeterministic();
static void SetDefaultSerializationDeterministic() {
default_serialization_deterministic_.store(true, std::memory_order_relaxed);
@@ -1350,7 +1350,7 @@ inline const uint8* CodedInputStream::ReadLittleEndian64FromArray(
inline bool CodedInputStream::ReadLittleEndian32(uint32* value) {
#if defined(PROTOBUF_LITTLE_ENDIAN)
if (PROTOBUF_PREDICT_TRUE(BufferSize() >= static_cast<int>(sizeof(*value)))) {
- buffer_ = ReadLittleEndian32FromArray(buffer_, value);
+ buffer_ = ReadLittleEndian32FromArray(buffer_, value);
return true;
} else {
return ReadLittleEndian32Fallback(value);
@@ -1363,7 +1363,7 @@ inline bool CodedInputStream::ReadLittleEndian32(uint32* value) {
inline bool CodedInputStream::ReadLittleEndian64(uint64* value) {
#if defined(PROTOBUF_LITTLE_ENDIAN)
if (PROTOBUF_PREDICT_TRUE(BufferSize() >= static_cast<int>(sizeof(*value)))) {
- buffer_ = ReadLittleEndian64FromArray(buffer_, value);
+ buffer_ = ReadLittleEndian64FromArray(buffer_, value);
return true;
} else {
return ReadLittleEndian64Fallback(value);
@@ -1373,7 +1373,7 @@ inline bool CodedInputStream::ReadLittleEndian64(uint64* value) {
#endif
}
-inline uint32 CodedInputStream::ReadTagNoLastTag() {
+inline uint32 CodedInputStream::ReadTagNoLastTag() {
uint32 v = 0;
if (PROTOBUF_PREDICT_TRUE(buffer_ < buffer_end_)) {
v = *buffer_;
@@ -1382,12 +1382,12 @@ inline uint32 CodedInputStream::ReadTagNoLastTag() {
return v;
}
}
- v = ReadTagFallback(v);
- return v;
+ v = ReadTagFallback(v);
+ return v;
}
-inline std::pair<uint32, bool> CodedInputStream::ReadTagWithCutoffNoLastTag(
- uint32 cutoff) {
+inline std::pair<uint32, bool> CodedInputStream::ReadTagWithCutoffNoLastTag(
+ uint32 cutoff) {
// In performance-sensitive code we can expect cutoff to be a compile-time
// constant, and things like "cutoff >= kMax1ByteVarint" to be evaluated at
// compile time.
@@ -1399,7 +1399,7 @@ inline std::pair<uint32, bool> CodedInputStream::ReadTagWithCutoffNoLastTag(
first_byte_or_zero = buffer_[0];
if (static_cast<int8>(buffer_[0]) > 0) {
const uint32 kMax1ByteVarint = 0x7f;
- uint32 tag = buffer_[0];
+ uint32 tag = buffer_[0];
Advance(1);
return std::make_pair(tag, cutoff >= kMax1ByteVarint || tag <= cutoff);
}
@@ -1409,7 +1409,7 @@ inline std::pair<uint32, bool> CodedInputStream::ReadTagWithCutoffNoLastTag(
if (cutoff >= 0x80 && PROTOBUF_PREDICT_TRUE(buffer_ + 1 < buffer_end_) &&
PROTOBUF_PREDICT_TRUE((buffer_[0] & ~buffer_[1]) >= 0x80)) {
const uint32 kMax2ByteVarint = (0x7f << 7) + 0x7f;
- uint32 tag = (1u << 7) * buffer_[1] + (buffer_[0] - 0x80);
+ uint32 tag = (1u << 7) * buffer_[1] + (buffer_[0] - 0x80);
Advance(2);
// It might make sense to test for tag == 0 now, but it is so rare that
// that we don't bother. A varint-encoded 0 should be one byte unless
@@ -1422,8 +1422,8 @@ inline std::pair<uint32, bool> CodedInputStream::ReadTagWithCutoffNoLastTag(
}
}
// Slow path
- const uint32 tag = ReadTagFallback(first_byte_or_zero);
- return std::make_pair(tag, static_cast<uint32>(tag - 1) < cutoff);
+ const uint32 tag = ReadTagFallback(first_byte_or_zero);
+ return std::make_pair(tag, static_cast<uint32>(tag - 1) < cutoff);
}
inline bool CodedInputStream::LastTagWas(uint32 expected) {
@@ -1607,18 +1607,18 @@ inline uint8* CodedOutputStream::WriteVarint32ToArrayOutOfLine(uint32 value,
}
}
-inline uint8* CodedOutputStream::WriteVarint64ToArray(uint64 value,
- uint8* target) {
+inline uint8* CodedOutputStream::WriteVarint64ToArray(uint64 value,
+ uint8* target) {
return EpsCopyOutputStream::UnsafeVarint(value, target);
}
-inline void CodedOutputStream::WriteVarint32SignExtended(int32 value) {
- WriteVarint64(static_cast<uint64>(value));
-}
-
+inline void CodedOutputStream::WriteVarint32SignExtended(int32 value) {
+ WriteVarint64(static_cast<uint64>(value));
+}
+
inline uint8* CodedOutputStream::WriteVarint32SignExtendedToArray(
int32 value, uint8* target) {
- return WriteVarint64ToArray(static_cast<uint64>(value), target);
+ return WriteVarint64ToArray(static_cast<uint64>(value), target);
}
inline uint8* CodedOutputStream::WriteLittleEndian32ToArray(uint32 value,
@@ -1659,38 +1659,38 @@ inline void CodedOutputStream::WriteVarint32(uint32 value) {
SetCur(WriteVarint32ToArray(value, Cur()));
}
-inline void CodedOutputStream::WriteVarint64(uint64 value) {
+inline void CodedOutputStream::WriteVarint64(uint64 value) {
cur_ = impl_.EnsureSpace(cur_);
SetCur(WriteVarint64ToArray(value, Cur()));
-}
-
+}
+
inline void CodedOutputStream::WriteTag(uint32 value) { WriteVarint32(value); }
inline uint8* CodedOutputStream::WriteTagToArray(uint32 value, uint8* target) {
return WriteVarint32ToArray(value, target);
}
-inline size_t CodedOutputStream::VarintSize32(uint32 value) {
- // This computes value == 0 ? 1 : floor(log2(value)) / 7 + 1
- // Use an explicit multiplication to implement the divide of
- // a number in the 1..31 range.
- // Explicit OR 0x1 to avoid calling Bits::Log2FloorNonZero(0), which is
- // undefined.
- uint32 log2value = Bits::Log2FloorNonZero(value | 0x1);
- return static_cast<size_t>((log2value * 9 + 73) / 64);
+inline size_t CodedOutputStream::VarintSize32(uint32 value) {
+ // This computes value == 0 ? 1 : floor(log2(value)) / 7 + 1
+ // Use an explicit multiplication to implement the divide of
+ // a number in the 1..31 range.
+ // Explicit OR 0x1 to avoid calling Bits::Log2FloorNonZero(0), which is
+ // undefined.
+ uint32 log2value = Bits::Log2FloorNonZero(value | 0x1);
+ return static_cast<size_t>((log2value * 9 + 73) / 64);
+}
+
+inline size_t CodedOutputStream::VarintSize64(uint64 value) {
+ // This computes value == 0 ? 1 : floor(log2(value)) / 7 + 1
+ // Use an explicit multiplication to implement the divide of
+ // a number in the 1..63 range.
+ // Explicit OR 0x1 to avoid calling Bits::Log2FloorNonZero(0), which is
+ // undefined.
+ uint32 log2value = Bits::Log2FloorNonZero64(value | 0x1);
+ return static_cast<size_t>((log2value * 9 + 73) / 64);
}
-inline size_t CodedOutputStream::VarintSize64(uint64 value) {
- // This computes value == 0 ? 1 : floor(log2(value)) / 7 + 1
- // Use an explicit multiplication to implement the divide of
- // a number in the 1..63 range.
- // Explicit OR 0x1 to avoid calling Bits::Log2FloorNonZero(0), which is
- // undefined.
- uint32 log2value = Bits::Log2FloorNonZero64(value | 0x1);
- return static_cast<size_t>((log2value * 9 + 73) / 64);
-}
-
-inline size_t CodedOutputStream::VarintSize32SignExtended(int32 value) {
+inline size_t CodedOutputStream::VarintSize32SignExtended(int32 value) {
if (value < 0) {
return 10; // TODO(kenton): Make this a symbolic constant.
} else {
@@ -1722,7 +1722,7 @@ inline uint8* CodedOutputStream::WriteStringToArray(const TProtoStringType& str,
} // namespace protobuf
} // namespace google
-#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
+#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
#pragma runtime_checks("c", restore)
#endif // _MSC_VER && !defined(__INTEL_COMPILER)
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/gzip_stream.cc b/contrib/libs/protobuf/src/google/protobuf/io/gzip_stream.cc
index d36ebee293..ad6bb5f1c4 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/gzip_stream.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/io/gzip_stream.cc
@@ -174,7 +174,7 @@ void GzipInputStream::BackUp(int count) {
}
bool GzipInputStream::Skip(int count) {
const void* data;
- int size = 0;
+ int size = 0;
bool ok = Next(&data, &size);
while (ok && (size < count)) {
count -= size;
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/io_win32.cc b/contrib/libs/protobuf/src/google/protobuf/io/io_win32.cc
index 4767634504..c2684e5ac3 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/io_win32.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/io/io_win32.cc
@@ -1,226 +1,226 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Author: laszlocsomor@google.com (Laszlo Csomor)
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: laszlocsomor@google.com (Laszlo Csomor)
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
// Implementation for long-path-aware open/mkdir/access/etc. on Windows, as well
// as for the supporting utility functions.
-//
-// These functions convert the input path to an absolute Windows path
+//
+// These functions convert the input path to an absolute Windows path
// with "\\?\" prefix, then pass that to _wopen/_wmkdir/_waccess/etc.
-// (declared in <io.h>) respectively. This allows working with files/directories
-// whose paths are longer than MAX_PATH (260 chars).
-//
-// This file is only used on Windows, it's empty on other platforms.
-
+// (declared in <io.h>) respectively. This allows working with files/directories
+// whose paths are longer than MAX_PATH (260 chars).
+//
+// This file is only used on Windows, it's empty on other platforms.
+
#if defined(_WIN32) && !defined(_XBOX_ONE)
-
-// Comment this out to fall back to using the ANSI versions (open, mkdir, ...)
-// instead of the Unicode ones (_wopen, _wmkdir, ...). Doing so can be useful to
-// debug failing tests if that's caused by the long path support.
-#define SUPPORT_LONGPATHS
-
+
+// Comment this out to fall back to using the ANSI versions (open, mkdir, ...)
+// instead of the Unicode ones (_wopen, _wmkdir, ...). Doing so can be useful to
+// debug failing tests if that's caused by the long path support.
+#define SUPPORT_LONGPATHS
+
#include <google/protobuf/io/io_win32.h>
-#include <ctype.h>
-#include <direct.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <io.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <wctype.h>
+#include <ctype.h>
+#include <direct.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <io.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <wctype.h>
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
-#include <windows.h>
-
-#include <memory>
-#include <sstream>
+#include <windows.h>
+
+#include <memory>
+#include <sstream>
#include <string>
-#include <vector>
-
-namespace google {
-namespace protobuf {
+#include <vector>
+
+namespace google {
+namespace protobuf {
namespace io {
-namespace win32 {
-namespace {
-
+namespace win32 {
+namespace {
+
using string = TProtoStringType;
-using std::wstring;
-
-template <typename char_type>
-struct CharTraits {
- static bool is_alpha(char_type ch);
-};
-
-template <>
-struct CharTraits<char> {
- static bool is_alpha(char ch) { return isalpha(ch); }
-};
-
-template <>
-struct CharTraits<wchar_t> {
- static bool is_alpha(wchar_t ch) { return iswalpha(ch); }
-};
-
+using std::wstring;
+
+template <typename char_type>
+struct CharTraits {
+ static bool is_alpha(char_type ch);
+};
+
+template <>
+struct CharTraits<char> {
+ static bool is_alpha(char ch) { return isalpha(ch); }
+};
+
+template <>
+struct CharTraits<wchar_t> {
+ static bool is_alpha(wchar_t ch) { return iswalpha(ch); }
+};
+
template <typename char_type>
bool null_or_empty(const char_type* s) {
return s == nullptr || *s == 0;
}
-// Returns true if the path starts with a drive letter, e.g. "c:".
-// Note that this won't check for the "\" after the drive letter, so this also
-// returns true for "c:foo" (which is "c:\${PWD}\foo").
-// This check requires that a path not have a longpath prefix ("\\?\").
-template <typename char_type>
-bool has_drive_letter(const char_type* ch) {
- return CharTraits<char_type>::is_alpha(ch[0]) && ch[1] == ':';
-}
-
-// Returns true if the path starts with a longpath prefix ("\\?\").
-template <typename char_type>
-bool has_longpath_prefix(const char_type* path) {
- return path[0] == '\\' && path[1] == '\\' && path[2] == '?' &&
- path[3] == '\\';
-}
-
-template <typename char_type>
-bool is_separator(char_type c) {
- return c == '/' || c == '\\';
-}
-
-// Returns true if the path starts with a drive specifier (e.g. "c:\").
-template <typename char_type>
-bool is_path_absolute(const char_type* path) {
- return has_drive_letter(path) && is_separator(path[2]);
-}
-
-template <typename char_type>
-bool is_drive_relative(const char_type* path) {
- return has_drive_letter(path) && (path[2] == 0 || !is_separator(path[2]));
-}
-
+// Returns true if the path starts with a drive letter, e.g. "c:".
+// Note that this won't check for the "\" after the drive letter, so this also
+// returns true for "c:foo" (which is "c:\${PWD}\foo").
+// This check requires that a path not have a longpath prefix ("\\?\").
+template <typename char_type>
+bool has_drive_letter(const char_type* ch) {
+ return CharTraits<char_type>::is_alpha(ch[0]) && ch[1] == ':';
+}
+
+// Returns true if the path starts with a longpath prefix ("\\?\").
+template <typename char_type>
+bool has_longpath_prefix(const char_type* path) {
+ return path[0] == '\\' && path[1] == '\\' && path[2] == '?' &&
+ path[3] == '\\';
+}
+
+template <typename char_type>
+bool is_separator(char_type c) {
+ return c == '/' || c == '\\';
+}
+
+// Returns true if the path starts with a drive specifier (e.g. "c:\").
+template <typename char_type>
+bool is_path_absolute(const char_type* path) {
+ return has_drive_letter(path) && is_separator(path[2]);
+}
+
+template <typename char_type>
+bool is_drive_relative(const char_type* path) {
+ return has_drive_letter(path) && (path[2] == 0 || !is_separator(path[2]));
+}
+
wstring join_paths(const wstring& path1, const wstring& path2) {
- if (path1.empty() || is_path_absolute(path2.c_str()) ||
- has_longpath_prefix(path2.c_str())) {
- return path2;
- }
- if (path2.empty()) {
- return path1;
- }
-
+ if (path1.empty() || is_path_absolute(path2.c_str()) ||
+ has_longpath_prefix(path2.c_str())) {
+ return path2;
+ }
+ if (path2.empty()) {
+ return path1;
+ }
+
if (is_separator(path1[path1.size() - 1])) {
return is_separator(path2[0]) ? (path1 + path2.substr(1))
- : (path1 + path2);
- } else {
+ : (path1 + path2);
+ } else {
return is_separator(path2[0]) ? (path1 + path2)
: (path1 + L'\\' + path2);
- }
-}
-
+ }
+}
+
wstring normalize(wstring path) {
- if (has_longpath_prefix(path.c_str())) {
- path = path.substr(4);
- }
-
+ if (has_longpath_prefix(path.c_str())) {
+ path = path.substr(4);
+ }
+
static const wstring dot(L".");
static const wstring dotdot(L"..");
const WCHAR* p = path.c_str();
-
+
std::vector<wstring> segments;
- int segment_start = -1;
- // Find the path segments in `path` (separated by "/").
- for (int i = 0;; ++i) {
+ int segment_start = -1;
+ // Find the path segments in `path` (separated by "/").
+ for (int i = 0;; ++i) {
if (!is_separator(p[i]) && p[i] != L'\0') {
- // The current character does not end a segment, so start one unless it's
- // already started.
- if (segment_start < 0) {
- segment_start = i;
- }
- } else if (segment_start >= 0 && i > segment_start) {
- // The current character is "/" or "\0", so this ends a segment.
- // Add that to `segments` if there's anything to add; handle "." and "..".
+ // The current character does not end a segment, so start one unless it's
+ // already started.
+ if (segment_start < 0) {
+ segment_start = i;
+ }
+ } else if (segment_start >= 0 && i > segment_start) {
+ // The current character is "/" or "\0", so this ends a segment.
+ // Add that to `segments` if there's anything to add; handle "." and "..".
wstring segment(p, segment_start, i - segment_start);
- segment_start = -1;
- if (segment == dotdot) {
- if (!segments.empty() &&
- (!has_drive_letter(segments[0].c_str()) || segments.size() > 1)) {
- segments.pop_back();
- }
- } else if (segment != dot && !segment.empty()) {
- segments.push_back(segment);
- }
- }
+ segment_start = -1;
+ if (segment == dotdot) {
+ if (!segments.empty() &&
+ (!has_drive_letter(segments[0].c_str()) || segments.size() > 1)) {
+ segments.pop_back();
+ }
+ } else if (segment != dot && !segment.empty()) {
+ segments.push_back(segment);
+ }
+ }
if (p[i] == L'\0') {
- break;
- }
- }
-
- // Handle the case when `path` is just a drive specifier (or some degenerate
- // form of it, e.g. "c:\..").
- if (segments.size() == 1 && segments[0].size() == 2 &&
- has_drive_letter(segments[0].c_str())) {
+ break;
+ }
+ }
+
+ // Handle the case when `path` is just a drive specifier (or some degenerate
+ // form of it, e.g. "c:\..").
+ if (segments.size() == 1 && segments[0].size() == 2 &&
+ has_drive_letter(segments[0].c_str())) {
return segments[0] + L'\\';
- }
-
- // Join all segments.
- bool first = true;
+ }
+
+ // Join all segments.
+ bool first = true;
std::wstringstream result;
for (int i = 0; i < segments.size(); ++i) {
- if (!first) {
+ if (!first) {
result << L'\\';
- }
- first = false;
+ }
+ first = false;
result << segments[i];
- }
- // Preserve trailing separator if the input contained it.
+ }
+ // Preserve trailing separator if the input contained it.
if (!path.empty() && is_separator(p[path.size() - 1])) {
result << L'\\';
- }
+ }
return result.str();
-}
-
+}
+
bool as_windows_path(const char* path, wstring* result) {
if (null_or_empty(path)) {
- result->clear();
- return true;
- }
+ result->clear();
+ return true;
+ }
wstring wpath;
if (!strings::utf8_to_wcs(path, &wpath)) {
- return false;
- }
+ return false;
+ }
if (has_longpath_prefix(wpath.c_str())) {
*result = wpath;
return true;
@@ -228,7 +228,7 @@ bool as_windows_path(const char* path, wstring* result) {
if (is_separator(path[0]) || is_drive_relative(path)) {
return false;
}
-
+
if (!is_path_absolute(wpath.c_str())) {
int size = ::GetCurrentDirectoryW(0, nullptr);
@@ -238,129 +238,129 @@ bool as_windows_path(const char* path, wstring* result) {
std::unique_ptr<WCHAR[]> wcwd(new WCHAR[size]);
::GetCurrentDirectoryW(size, wcwd.get());
wpath = join_paths(wcwd.get(), wpath);
- }
+ }
wpath = normalize(wpath);
if (!has_longpath_prefix(wpath.c_str())) {
- // Add the "\\?\" prefix unconditionally. This way we prevent the Win32 API
- // from processing the path and "helpfully" removing trailing dots from the
- // path, for example.
- // See https://github.com/bazelbuild/bazel/issues/2935
+ // Add the "\\?\" prefix unconditionally. This way we prevent the Win32 API
+ // from processing the path and "helpfully" removing trailing dots from the
+ // path, for example.
+ // See https://github.com/bazelbuild/bazel/issues/2935
wpath = wstring(L"\\\\?\\") + wpath;
- }
+ }
*result = wpath;
- return true;
-}
-
-} // namespace
-
-int open(const char* path, int flags, int mode) {
-#ifdef SUPPORT_LONGPATHS
- wstring wpath;
- if (!as_windows_path(path, &wpath)) {
- errno = ENOENT;
- return -1;
- }
- return ::_wopen(wpath.c_str(), flags, mode);
-#else
- return ::_open(path, flags, mode);
-#endif
-}
-
-int mkdir(const char* path, int _mode) {
-#ifdef SUPPORT_LONGPATHS
- wstring wpath;
- if (!as_windows_path(path, &wpath)) {
- errno = ENOENT;
- return -1;
- }
- return ::_wmkdir(wpath.c_str());
-#else // not SUPPORT_LONGPATHS
- return ::_mkdir(path);
-#endif // not SUPPORT_LONGPATHS
-}
-
-int access(const char* path, int mode) {
-#ifdef SUPPORT_LONGPATHS
- wstring wpath;
- if (!as_windows_path(path, &wpath)) {
- errno = ENOENT;
- return -1;
- }
- return ::_waccess(wpath.c_str(), mode);
-#else
- return ::_access(path, mode);
-#endif
-}
-
-int chdir(const char* path) {
-#ifdef SUPPORT_LONGPATHS
- wstring wpath;
- if (!as_windows_path(path, &wpath)) {
- errno = ENOENT;
- return -1;
- }
- return ::_wchdir(wpath.c_str());
-#else
- return ::_chdir(path);
-#endif
-}
-
-int stat(const char* path, struct _stat* buffer) {
-#ifdef SUPPORT_LONGPATHS
- wstring wpath;
- if (!as_windows_path(path, &wpath)) {
- errno = ENOENT;
- return -1;
- }
- return ::_wstat(wpath.c_str(), buffer);
-#else // not SUPPORT_LONGPATHS
- return ::_stat(path, buffer);
-#endif // not SUPPORT_LONGPATHS
-}
-
-FILE* fopen(const char* path, const char* mode) {
-#ifdef SUPPORT_LONGPATHS
+ return true;
+}
+
+} // namespace
+
+int open(const char* path, int flags, int mode) {
+#ifdef SUPPORT_LONGPATHS
+ wstring wpath;
+ if (!as_windows_path(path, &wpath)) {
+ errno = ENOENT;
+ return -1;
+ }
+ return ::_wopen(wpath.c_str(), flags, mode);
+#else
+ return ::_open(path, flags, mode);
+#endif
+}
+
+int mkdir(const char* path, int _mode) {
+#ifdef SUPPORT_LONGPATHS
+ wstring wpath;
+ if (!as_windows_path(path, &wpath)) {
+ errno = ENOENT;
+ return -1;
+ }
+ return ::_wmkdir(wpath.c_str());
+#else // not SUPPORT_LONGPATHS
+ return ::_mkdir(path);
+#endif // not SUPPORT_LONGPATHS
+}
+
+int access(const char* path, int mode) {
+#ifdef SUPPORT_LONGPATHS
+ wstring wpath;
+ if (!as_windows_path(path, &wpath)) {
+ errno = ENOENT;
+ return -1;
+ }
+ return ::_waccess(wpath.c_str(), mode);
+#else
+ return ::_access(path, mode);
+#endif
+}
+
+int chdir(const char* path) {
+#ifdef SUPPORT_LONGPATHS
+ wstring wpath;
+ if (!as_windows_path(path, &wpath)) {
+ errno = ENOENT;
+ return -1;
+ }
+ return ::_wchdir(wpath.c_str());
+#else
+ return ::_chdir(path);
+#endif
+}
+
+int stat(const char* path, struct _stat* buffer) {
+#ifdef SUPPORT_LONGPATHS
+ wstring wpath;
+ if (!as_windows_path(path, &wpath)) {
+ errno = ENOENT;
+ return -1;
+ }
+ return ::_wstat(wpath.c_str(), buffer);
+#else // not SUPPORT_LONGPATHS
+ return ::_stat(path, buffer);
+#endif // not SUPPORT_LONGPATHS
+}
+
+FILE* fopen(const char* path, const char* mode) {
+#ifdef SUPPORT_LONGPATHS
if (null_or_empty(path)) {
errno = EINVAL;
return nullptr;
}
- wstring wpath;
- if (!as_windows_path(path, &wpath)) {
- errno = ENOENT;
+ wstring wpath;
+ if (!as_windows_path(path, &wpath)) {
+ errno = ENOENT;
return nullptr;
- }
+ }
wstring wmode;
if (!strings::utf8_to_wcs(mode, &wmode)) {
errno = EINVAL;
return nullptr;
}
return ::_wfopen(wpath.c_str(), wmode.c_str());
-#else
- return ::fopen(path, mode);
-#endif
-}
-
+#else
+ return ::fopen(path, mode);
+#endif
+}
+
int close(int fd) { return ::_close(fd); }
-
-int dup(int fd) { return ::_dup(fd); }
-
-int dup2(int fd1, int fd2) { return ::_dup2(fd1, fd2); }
-
-int read(int fd, void* buffer, size_t size) {
- return ::_read(fd, buffer, size);
-}
-
-int setmode(int fd, int mode) { return ::_setmode(fd, mode); }
-
-int write(int fd, const void* buffer, size_t size) {
- return ::_write(fd, buffer, size);
-}
-
+
+int dup(int fd) { return ::_dup(fd); }
+
+int dup2(int fd1, int fd2) { return ::_dup2(fd1, fd2); }
+
+int read(int fd, void* buffer, size_t size) {
+ return ::_read(fd, buffer, size);
+}
+
+int setmode(int fd, int mode) { return ::_setmode(fd, mode); }
+
+int write(int fd, const void* buffer, size_t size) {
+ return ::_write(fd, buffer, size);
+}
+
wstring testonly_utf8_to_winpath(const char* path) {
- wstring wpath;
+ wstring wpath;
return as_windows_path(path, &wpath) ? wpath : wstring();
-}
-
+}
+
ExpandWildcardsResult ExpandWildcards(
const string& path, std::function<void(const string&)> consume) {
if (path.find_first_of("*?") == string::npos) {
@@ -462,9 +462,9 @@ bool wcs_to_utf8(const wchar_t* input, string* out) {
}
} // namespace strings
-} // namespace win32
+} // namespace win32
} // namespace io
-} // namespace protobuf
-} // namespace google
-
+} // namespace protobuf
+} // namespace google
+
#endif // defined(_WIN32)
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/io_win32.h b/contrib/libs/protobuf/src/google/protobuf/io/io_win32.h
index 1fab1addb4..8fb782f753 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/io_win32.h
+++ b/contrib/libs/protobuf/src/google/protobuf/io/io_win32.h
@@ -1,68 +1,68 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Author: laszlocsomor@google.com (Laszlo Csomor)
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: laszlocsomor@google.com (Laszlo Csomor)
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-// This file contains the declarations for Windows implementations of
-// commonly used POSIX functions such as open(2) and access(2), as well
-// as macro definitions for flags of these functions.
-//
-// By including this file you'll redefine open/access/etc. to
+// This file contains the declarations for Windows implementations of
+// commonly used POSIX functions such as open(2) and access(2), as well
+// as macro definitions for flags of these functions.
+//
+// By including this file you'll redefine open/access/etc. to
// ::google::protobuf::io::win32::{open/access/etc.}.
-// Make sure you don't include a header that attempts to redeclare or
-// redefine these functions, that'll lead to confusing compilation
-// errors. It's best to #include this file as the last one to ensure that.
-//
-// This file is only used on Windows, it's empty on other platforms.
-
+// Make sure you don't include a header that attempts to redeclare or
+// redefine these functions, that'll lead to confusing compilation
+// errors. It's best to #include this file as the last one to ensure that.
+//
+// This file is only used on Windows, it's empty on other platforms.
+
#ifndef GOOGLE_PROTOBUF_IO_IO_WIN32_H__
#define GOOGLE_PROTOBUF_IO_IO_WIN32_H__
-
-#if defined(_WIN32)
-
+
+#if defined(_WIN32)
+
#include <functional>
-#include <string>
+#include <string>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/port.h>
#include <google/protobuf/port_def.inc>
-
-// Compilers on Windows other than MSVC (e.g. Cygwin, MinGW32) define the
-// following functions already, except for mkdir.
-namespace google {
-namespace protobuf {
+
+// Compilers on Windows other than MSVC (e.g. Cygwin, MinGW32) define the
+// following functions already, except for mkdir.
+namespace google {
+namespace protobuf {
namespace io {
-namespace win32 {
-
+namespace win32 {
+
PROTOBUF_EXPORT FILE* fopen(const char* path, const char* mode);
PROTOBUF_EXPORT int access(const char* path, int mode);
PROTOBUF_EXPORT int chdir(const char* path);
@@ -76,7 +76,7 @@ PROTOBUF_EXPORT int setmode(int fd, int mode);
PROTOBUF_EXPORT int stat(const char* path, struct _stat* buffer);
PROTOBUF_EXPORT int write(int fd, const void* buffer, size_t size);
PROTOBUF_EXPORT std::wstring testonly_utf8_to_winpath(const char* path);
-
+
enum class ExpandWildcardsResult {
kSuccess = 0,
kErrorNoMatchingFile = 1,
@@ -112,29 +112,29 @@ PROTOBUF_EXPORT bool wcs_to_utf8(const wchar_t* input, TProtoStringType* out);
} // namespace strings
-} // namespace win32
+} // namespace win32
} // namespace io
-} // namespace protobuf
-} // namespace google
-
-#ifndef W_OK
-#define W_OK 02 // not defined by MSVC for whatever reason
-#endif
-
-#ifndef F_OK
-#define F_OK 00 // not defined by MSVC for whatever reason
-#endif
-
-#ifndef STDIN_FILENO
-#define STDIN_FILENO 0
-#endif
-
-#ifndef STDOUT_FILENO
-#define STDOUT_FILENO 1
-#endif
-
+} // namespace protobuf
+} // namespace google
+
+#ifndef W_OK
+#define W_OK 02 // not defined by MSVC for whatever reason
+#endif
+
+#ifndef F_OK
+#define F_OK 00 // not defined by MSVC for whatever reason
+#endif
+
+#ifndef STDIN_FILENO
+#define STDIN_FILENO 0
+#endif
+
+#ifndef STDOUT_FILENO
+#define STDOUT_FILENO 1
+#endif
+
#include <google/protobuf/port_undef.inc>
-#endif // defined(_WIN32)
-
+#endif // defined(_WIN32)
+
#endif // GOOGLE_PROTOBUF_IO_IO_WIN32_H__
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/printer.cc b/contrib/libs/protobuf/src/google/protobuf/io/printer.cc
index f03aff97fe..83ed7d1f69 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/printer.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/io/printer.cc
@@ -111,11 +111,11 @@ void Printer::Annotate(const char* begin_varname, const char* end_varname,
}
void Printer::Print(const std::map<TProtoStringType, TProtoStringType>& variables,
- const char* text) {
+ const char* text) {
int size = strlen(text);
int pos = 0; // The number of bytes we've written so far.
substitutions_.clear();
- line_start_variables_.clear();
+ line_start_variables_.clear();
for (int i = 0; i < size; i++) {
if (text[i] == '\n') {
@@ -127,7 +127,7 @@ void Printer::Print(const std::map<TProtoStringType, TProtoStringType>& variable
// Setting this true will cause the next WriteRaw() to insert an indent
// first.
at_start_of_line_ = true;
- line_start_variables_.clear();
+ line_start_variables_.clear();
} else if (text[i] == variable_delimiter_) {
// Saw the start of a variable name.
@@ -155,15 +155,15 @@ void Printer::Print(const std::map<TProtoStringType, TProtoStringType>& variable
if (iter == variables.end()) {
GOOGLE_LOG(DFATAL) << " Undefined variable: " << varname;
} else {
- if (at_start_of_line_ && iter->second.empty()) {
- line_start_variables_.push_back(varname);
- }
+ if (at_start_of_line_ && iter->second.empty()) {
+ line_start_variables_.push_back(varname);
+ }
WriteRaw(iter->second.data(), iter->second.size());
std::pair<std::map<TProtoStringType, std::pair<size_t, size_t> >::iterator,
- bool>
- inserted = substitutions_.insert(std::make_pair(
- varname,
- std::make_pair(offset_ - iter->second.size(), offset_)));
+ bool>
+ inserted = substitutions_.insert(std::make_pair(
+ varname,
+ std::make_pair(offset_ - iter->second.size(), offset_)));
if (!inserted.second) {
// This variable was used multiple times. Make its span have
// negative length so we can detect it if it gets used in an
@@ -210,25 +210,25 @@ void Printer::WriteRaw(const char* data, int size) {
if (at_start_of_line_ && (size > 0) && (data[0] != '\n')) {
// Insert an indent.
at_start_of_line_ = false;
- CopyToBuffer(indent_.data(), indent_.size());
+ CopyToBuffer(indent_.data(), indent_.size());
if (failed_) return;
- // Fix up empty variables (e.g., "{") that should be annotated as
- // coming after the indent.
+ // Fix up empty variables (e.g., "{") that should be annotated as
+ // coming after the indent.
for (std::vector<TProtoStringType>::iterator i = line_start_variables_.begin();
- i != line_start_variables_.end(); ++i) {
- substitutions_[*i].first += indent_.size();
- substitutions_[*i].second += indent_.size();
- }
+ i != line_start_variables_.end(); ++i) {
+ substitutions_[*i].first += indent_.size();
+ substitutions_[*i].second += indent_.size();
+ }
}
- // If we're going to write any data, clear line_start_variables_, since
- // we've either updated them in the block above or they no longer refer to
- // the current line.
- line_start_variables_.clear();
-
- CopyToBuffer(data, size);
-}
-
+ // If we're going to write any data, clear line_start_variables_, since
+ // we've either updated them in the block above or they no longer refer to
+ // the current line.
+ line_start_variables_.clear();
+
+ CopyToBuffer(data, size);
+}
+
bool Printer::Next() {
do {
void* void_buffer;
@@ -241,10 +241,10 @@ bool Printer::Next() {
return true;
}
-void Printer::CopyToBuffer(const char* data, int size) {
- if (failed_) return;
- if (size == 0) return;
-
+void Printer::CopyToBuffer(const char* data, int size) {
+ if (failed_) return;
+ if (size == 0) return;
+
while (size > buffer_size_) {
// Data exceeds space in the buffer. Copy what we can and request a
// new buffer.
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/printer.h b/contrib/libs/protobuf/src/google/protobuf/io/printer.h
index d688c62ae3..0f8c3b130c 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/printer.h
+++ b/contrib/libs/protobuf/src/google/protobuf/io/printer.h
@@ -84,7 +84,7 @@ class AnnotationProtoCollector : public AnnotationCollector {
// Override for AnnotationCollector::AddAnnotation.
virtual void AddAnnotation(size_t begin_offset, size_t end_offset,
const TProtoStringType& file_path,
- const std::vector<int>& path) {
+ const std::vector<int>& path) {
typename AnnotationProto::Annotation* annotation =
annotation_proto_->add_annotation();
for (int i = 0; i < path.size(); ++i) {
@@ -174,7 +174,7 @@ class AnnotationProtoCollector : public AnnotationCollector {
// vars["function"] = "call";
// vars["mark"] = "";
// printer.Print(vars, "$function$($foo$,$foo$)$mark$");
-// printer.Annotate("function", "mark", call_);
+// printer.Annotate("function", "mark", call_);
//
// This code associates the span covering "call(bar,bar)" in the output with the
// call_ descriptor.
@@ -312,9 +312,9 @@ class PROTOBUF_EXPORT Printer {
PrintInternal(vars, text, args...);
}
- // Copy size worth of bytes from data to buffer_.
- void CopyToBuffer(const char* data, int size);
-
+ // Copy size worth of bytes from data to buffer_.
+ void CopyToBuffer(const char* data, int size);
+
void push_back(char c) {
if (failed_) return;
if (buffer_size_ == 0) {
@@ -357,17 +357,17 @@ class PROTOBUF_EXPORT Printer {
// length of the substituted string).
std::map<TProtoStringType, std::pair<size_t, size_t> > substitutions_;
- // Keeps track of the keys in substitutions_ that need to be updated when
- // indents are inserted. These are keys that refer to the beginning of the
- // current line.
+ // Keeps track of the keys in substitutions_ that need to be updated when
+ // indents are inserted. These are keys that refer to the beginning of the
+ // current line.
std::vector<TProtoStringType> line_start_variables_;
-
+
// Returns true and sets range to the substitution range in the output for
// varname if varname was used once in the last call to Print. If varname
// was not used, or if it was used multiple times, returns false (and
// fails a debug assertion).
- bool GetSubstitutionRange(const char* varname,
- std::pair<size_t, size_t>* range);
+ bool GetSubstitutionRange(const char* varname,
+ std::pair<size_t, size_t>* range);
// If non-null, annotation_collector_ is used to store annotations about
// generated code.
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream.h b/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream.h
index 31d120c528..d3bd6daed3 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream.h
+++ b/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream.h
@@ -126,8 +126,8 @@ class ZeroCopyOutputStream;
// copying.
class PROTOBUF_EXPORT ZeroCopyInputStream {
public:
- ZeroCopyInputStream() {}
- virtual ~ZeroCopyInputStream() {}
+ ZeroCopyInputStream() {}
+ virtual ~ZeroCopyInputStream() {}
// Obtains a chunk of data from the stream.
//
@@ -183,8 +183,8 @@ class PROTOBUF_EXPORT ZeroCopyInputStream {
// copying.
class PROTOBUF_EXPORT ZeroCopyOutputStream {
public:
- ZeroCopyOutputStream() {}
- virtual ~ZeroCopyOutputStream() {}
+ ZeroCopyOutputStream() {}
+ virtual ~ZeroCopyOutputStream() {}
// Obtains a buffer into which data can be written. Any data written
// into this buffer will eventually (maybe instantly, maybe later on)
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc b/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc
index 87b2d502dd..52617e9efe 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc
@@ -58,15 +58,15 @@ namespace io {
// Win32 lseek is broken: If invoked on a non-seekable file descriptor, its
// return value is undefined. We re-define it to always produce an error.
#define lseek(fd, offset, origin) ((off_t)-1)
-// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
-// them like we do below.
+// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
+// them like we do below.
using google::protobuf::io::win32::access;
using google::protobuf::io::win32::close;
using google::protobuf::io::win32::open;
using google::protobuf::io::win32::read;
using google::protobuf::io::win32::write;
-#endif
-
+#endif
+
namespace {
// EINTR sucks.
@@ -243,7 +243,7 @@ bool FileOutputStream::CopyingFileOutputStream::Write(const void* buffer,
// ===================================================================
IstreamInputStream::IstreamInputStream(std::istream* input, int block_size)
- : copying_input_(input), impl_(&copying_input_, block_size) {}
+ : copying_input_(input), impl_(&copying_input_, block_size) {}
bool IstreamInputStream::Next(const void** data, int* size) {
return impl_.Next(data, size);
@@ -257,7 +257,7 @@ int64_t IstreamInputStream::ByteCount() const { return impl_.ByteCount(); }
IstreamInputStream::CopyingIstreamInputStream::CopyingIstreamInputStream(
std::istream* input)
- : input_(input) {}
+ : input_(input) {}
IstreamInputStream::CopyingIstreamInputStream::~CopyingIstreamInputStream() {}
@@ -274,7 +274,7 @@ int IstreamInputStream::CopyingIstreamInputStream::Read(void* buffer,
// ===================================================================
OstreamOutputStream::OstreamOutputStream(std::ostream* output, int block_size)
- : copying_output_(output), impl_(&copying_output_, block_size) {}
+ : copying_output_(output), impl_(&copying_output_, block_size) {}
OstreamOutputStream::~OstreamOutputStream() { impl_.Flush(); }
@@ -288,7 +288,7 @@ int64_t OstreamOutputStream::ByteCount() const { return impl_.ByteCount(); }
OstreamOutputStream::CopyingOstreamOutputStream::CopyingOstreamOutputStream(
std::ostream* output)
- : output_(output) {}
+ : output_(output) {}
OstreamOutputStream::CopyingOstreamOutputStream::~CopyingOstreamOutputStream() {
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h b/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h
index 526c3f1b13..f20630d8f5 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h
+++ b/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h
@@ -176,7 +176,7 @@ class PROTOBUF_EXPORT StringOutputStream : public ZeroCopyOutputStream {
// in large blocks.
class PROTOBUF_EXPORT CopyingInputStream {
public:
- virtual ~CopyingInputStream() {}
+ virtual ~CopyingInputStream() {}
// Reads up to "size" bytes into the given buffer. Returns the number of
// bytes read. Read() waits until at least one byte is available, or
@@ -270,7 +270,7 @@ class PROTOBUF_EXPORT CopyingInputStreamAdaptor : public ZeroCopyInputStream {
// in large blocks.
class PROTOBUF_EXPORT CopyingOutputStream {
public:
- virtual ~CopyingOutputStream() {}
+ virtual ~CopyingOutputStream() {}
// Writes "size" bytes from the given buffer to the output. Returns true
// if successful, false on a write error.
diff --git a/contrib/libs/protobuf/src/google/protobuf/map.h b/contrib/libs/protobuf/src/google/protobuf/map.h
index 0fd71b9593..6f317af017 100644
--- a/contrib/libs/protobuf/src/google/protobuf/map.h
+++ b/contrib/libs/protobuf/src/google/protobuf/map.h
@@ -28,12 +28,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// This file defines the map container and its helpers to support protobuf maps.
-//
-// The Map and MapIterator types are provided by this header file.
-// Please avoid using other types defined here, unless they are public
-// types within Map or MapIterator, such as Map::value_type.
-
+// This file defines the map container and its helpers to support protobuf maps.
+//
+// The Map and MapIterator types are provided by this header file.
+// Please avoid using other types defined here, unless they are public
+// types within Map or MapIterator, such as Map::value_type.
+
#ifndef GOOGLE_PROTOBUF_MAP_H__
#define GOOGLE_PROTOBUF_MAP_H__
@@ -74,12 +74,12 @@ template <typename Enum>
struct is_proto_enum;
namespace internal {
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType key_wire_type,
WireFormatLite::FieldType value_wire_type>
class MapFieldLite;
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType key_wire_type,
WireFormatLite::FieldType value_wire_type>
class MapField;
@@ -384,9 +384,9 @@ class Map {
constexpr Map() : elements_(nullptr) {}
explicit Map(Arena* arena) : elements_(arena) {}
-
+
Map(const Map& other) : Map() { insert(other.begin(), other.end()); }
-
+
Map(Map&& other) noexcept : Map() {
if (other.arena() != nullptr) {
*this = other;
@@ -513,15 +513,15 @@ class Map {
// can convert to const_iterator" is OK but the reverse direction is not.
template <typename U>
explicit iterator_base(const iterator_base<U>& it)
- : node_(it.node_), m_(it.m_), bucket_index_(it.bucket_index_) {}
+ : node_(it.node_), m_(it.m_), bucket_index_(it.bucket_index_) {}
iterator_base(Node* n, const InnerMap* m, size_type index)
- : node_(n), m_(m), bucket_index_(index) {}
+ : node_(n), m_(m), bucket_index_(index) {}
iterator_base(TreeIterator tree_it, const InnerMap* m, size_type index)
: node_(NodeFromTreeIterator(tree_it)), m_(m), bucket_index_(index) {
- // Invariant: iterators that use buckets with trees have an even
- // bucket_index_.
+ // Invariant: iterators that use buckets with trees have an even
+ // bucket_index_.
GOOGLE_DCHECK_EQ(bucket_index_ % 2, 0u);
}
@@ -557,14 +557,14 @@ class Map {
iterator_base& operator++() {
if (node_->next == nullptr) {
- TreeIterator tree_it;
- const bool is_list = revalidate_if_necessary(&tree_it);
+ TreeIterator tree_it;
+ const bool is_list = revalidate_if_necessary(&tree_it);
if (is_list) {
SearchFrom(bucket_index_ + 1);
} else {
GOOGLE_DCHECK_EQ(bucket_index_ & 1, 0u);
Tree* tree = static_cast<Tree*>(m_->table_[bucket_index_]);
- if (++tree_it == tree->end()) {
+ if (++tree_it == tree->end()) {
SearchFrom(bucket_index_ + 2);
} else {
node_ = NodeFromTreeIterator(tree_it);
@@ -584,9 +584,9 @@ class Map {
// Assumes node_ and m_ are correct and non-null, but other fields may be
// stale. Fix them as needed. Then return true iff node_ points to a
- // Node in a list. If false is returned then *it is modified to be
- // a valid iterator for node_.
- bool revalidate_if_necessary(TreeIterator* it) {
+ // Node in a list. If false is returned then *it is modified to be
+ // a valid iterator for node_.
+ bool revalidate_if_necessary(TreeIterator* it) {
GOOGLE_DCHECK(node_ != nullptr && m_ != nullptr);
// Force bucket_index_ to be in range.
bucket_index_ &= (m_->num_buckets_ - 1);
@@ -726,8 +726,8 @@ class Map {
void erase(iterator it) {
GOOGLE_DCHECK_EQ(it.m_, this);
- typename Tree::iterator tree_it;
- const bool is_list = it.revalidate_if_necessary(&tree_it);
+ typename Tree::iterator tree_it;
+ const bool is_list = it.revalidate_if_necessary(&tree_it);
size_type b = it.bucket_index_;
Node* const item = it.node_;
if (is_list) {
@@ -763,16 +763,16 @@ class Map {
}
private:
- const_iterator find(const Key& k, TreeIterator* it) const {
- return FindHelper(k, it).first;
- }
+ const_iterator find(const Key& k, TreeIterator* it) const {
+ return FindHelper(k, it).first;
+ }
template <typename K>
std::pair<const_iterator, size_type> FindHelper(const K& k) const {
return FindHelper(k, nullptr);
- }
+ }
template <typename K>
std::pair<const_iterator, size_type> FindHelper(const K& k,
- TreeIterator* it) const {
+ TreeIterator* it) const {
size_type b = BucketNumber(k);
if (TableEntryIsNonEmptyList(b)) {
Node* node = static_cast<Node*>(table_[b]);
@@ -826,9 +826,9 @@ class Map {
// index_of_first_non_null_, so we skip the code to update it.
return InsertUniqueInTree(b, node);
}
- // parentheses around (std::min) prevents macro expansion of min(...)
+ // parentheses around (std::min) prevents macro expansion of min(...)
index_of_first_non_null_ =
- (std::min)(index_of_first_non_null_, result.bucket_index_);
+ (std::min)(index_of_first_non_null_, result.bucket_index_);
return result;
}
@@ -1038,9 +1038,9 @@ class Map {
// Return a power of two no less than max(kMinTableSize, n).
// Assumes either n < kMinTableSize or n is a power of two.
size_type TableSize(size_type n) {
- return n < static_cast<size_type>(kMinTableSize)
- ? static_cast<size_type>(kMinTableSize)
- : n;
+ return n < static_cast<size_type>(kMinTableSize)
+ ? static_cast<size_type>(kMinTableSize)
+ : n;
}
// Use alloc_ to allocate an array of n objects of type U.
@@ -1111,7 +1111,7 @@ class Map {
public:
// Iterators
- class const_iterator {
+ class const_iterator {
using InnerIt = typename InnerMap::const_iterator;
public:
@@ -1120,21 +1120,21 @@ class Map {
using difference_type = ptrdiff_t;
using pointer = const value_type*;
using reference = const value_type&;
-
- const_iterator() {}
- explicit const_iterator(const InnerIt& it) : it_(it) {}
+
+ const_iterator() {}
+ explicit const_iterator(const InnerIt& it) : it_(it) {}
const_reference operator*() const { return *it_; }
const_pointer operator->() const { return &(operator*()); }
const_iterator& operator++() {
- ++it_;
+ ++it_;
return *this;
}
- const_iterator operator++(int) { return const_iterator(it_++); }
+ const_iterator operator++(int) { return const_iterator(it_++); }
friend bool operator==(const const_iterator& a, const const_iterator& b) {
- return a.it_ == b.it_;
+ return a.it_ == b.it_;
}
friend bool operator!=(const const_iterator& a, const const_iterator& b) {
return !(a == b);
@@ -1144,7 +1144,7 @@ class Map {
InnerIt it_;
};
- class iterator {
+ class iterator {
using InnerIt = typename InnerMap::iterator;
public:
@@ -1153,26 +1153,26 @@ class Map {
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;
-
- iterator() {}
- explicit iterator(const InnerIt& it) : it_(it) {}
+
+ iterator() {}
+ explicit iterator(const InnerIt& it) : it_(it) {}
reference operator*() const { return *it_; }
pointer operator->() const { return &(operator*()); }
iterator& operator++() {
- ++it_;
+ ++it_;
return *this;
}
- iterator operator++(int) { return iterator(it_++); }
+ iterator operator++(int) { return iterator(it_++); }
// Allow implicit conversion to const_iterator.
operator const_iterator() const { // NOLINT(runtime/explicit)
- return const_iterator(typename InnerMap::const_iterator(it_));
+ return const_iterator(typename InnerMap::const_iterator(it_));
}
friend bool operator==(const iterator& a, const iterator& b) {
- return a.it_ == b.it_;
+ return a.it_ == b.it_;
}
friend bool operator!=(const iterator& a, const iterator& b) {
return !(a == b);
@@ -1267,12 +1267,12 @@ class Map {
// insert
std::pair<iterator, bool> insert(const value_type& value) {
- std::pair<typename InnerMap::iterator, bool> p =
+ std::pair<typename InnerMap::iterator, bool> p =
elements_.insert(value.first);
- if (p.second) {
+ if (p.second) {
p.first->second = value.second;
}
- return std::pair<iterator, bool>(iterator(p.first), p.second);
+ return std::pair<iterator, bool>(iterator(p.first), p.second);
}
template <class InputIt>
void insert(InputIt first, InputIt last) {
@@ -1350,7 +1350,7 @@ class Map {
friend class Arena;
using InternalArenaConstructable_ = void;
using DestructorSkippable_ = void;
- template <typename Derived, typename K, typename V,
+ template <typename Derived, typename K, typename V,
internal::WireFormatLite::FieldType key_wire_type,
internal::WireFormatLite::FieldType value_wire_type>
friend class internal::MapFieldLite;
@@ -1358,7 +1358,7 @@ class Map {
} // namespace protobuf
} // namespace google
-
+
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_MAP_H__
diff --git a/contrib/libs/protobuf/src/google/protobuf/map_entry.h b/contrib/libs/protobuf/src/google/protobuf/map_entry.h
index f9ec4ce9b6..87bc000374 100644
--- a/contrib/libs/protobuf/src/google/protobuf/map_entry.h
+++ b/contrib/libs/protobuf/src/google/protobuf/map_entry.h
@@ -49,7 +49,7 @@ namespace google {
namespace protobuf {
class Arena;
namespace internal {
-template <typename Derived, typename Key, typename Value,
+template <typename Derived, typename Key, typename Value,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
class MapField;
@@ -87,7 +87,7 @@ namespace internal {
// The in-memory types of primitive types can be inferred from its proto type,
// while we need to explicitly specify the cpp type if proto type is
// TYPE_MESSAGE to infer the in-memory type.
-template <typename Derived, typename Key, typename Value,
+template <typename Derived, typename Key, typename Value,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
class MapEntry : public MapEntryImpl<Derived, Message, Key, Value,
@@ -95,15 +95,15 @@ class MapEntry : public MapEntryImpl<Derived, Message, Key, Value,
public:
constexpr MapEntry() : _internal_metadata_() {}
explicit MapEntry(Arena* arena)
- : MapEntryImpl<Derived, Message, Key, Value, kKeyFieldType,
+ : MapEntryImpl<Derived, Message, Key, Value, kKeyFieldType,
kValueFieldType>(arena),
- _internal_metadata_(arena) {}
+ _internal_metadata_(arena) {}
~MapEntry() {
Message::_internal_metadata_.template Delete<UnknownFieldSet>();
_internal_metadata_.Delete<UnknownFieldSet>();
}
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
typedef typename MapEntryImpl<Derived, Message, Key, Value, kKeyFieldType,
kValueFieldType>::KeyTypeHandler KeyTypeHandler;
@@ -119,38 +119,38 @@ class MapEntry : public MapEntryImpl<Derived, Message, Key, Value,
InternalMetadata _internal_metadata_;
- private:
+ private:
friend class ::PROTOBUF_NAMESPACE_ID::Arena;
- template <typename C, typename K, typename V,
+ template <typename C, typename K, typename V,
WireFormatLite::FieldType k_wire_type, WireFormatLite::FieldType>
friend class internal::MapField;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapEntry);
};
-// Specialization for the full runtime
-template <typename Derived, typename Key, typename Value,
- WireFormatLite::FieldType kKeyFieldType,
+// Specialization for the full runtime
+template <typename Derived, typename Key, typename Value,
+ WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
struct MapEntryHelper<
MapEntry<Derived, Key, Value, kKeyFieldType, kValueFieldType> >
: MapEntryHelper<
MapEntryLite<Derived, Key, Value, kKeyFieldType, kValueFieldType> > {
- explicit MapEntryHelper(const MapPair<Key, Value>& map_pair)
+ explicit MapEntryHelper(const MapPair<Key, Value>& map_pair)
: MapEntryHelper<
MapEntryLite<Derived, Key, Value, kKeyFieldType, kValueFieldType> >(
map_pair) {}
-};
-
-template <typename Derived, typename K, typename V,
+};
+
+template <typename Derived, typename K, typename V,
WireFormatLite::FieldType key, WireFormatLite::FieldType value>
struct DeconstructMapEntry<MapEntry<Derived, K, V, key, value> > {
- typedef K Key;
- typedef V Value;
+ typedef K Key;
+ typedef V Value;
static constexpr WireFormatLite::FieldType kKeyFieldType = key;
static constexpr WireFormatLite::FieldType kValueFieldType = value;
-};
-
+};
+
} // namespace internal
} // namespace protobuf
} // namespace google
diff --git a/contrib/libs/protobuf/src/google/protobuf/map_entry_lite.h b/contrib/libs/protobuf/src/google/protobuf/map_entry_lite.h
index 1aaeb92d8e..a068e414d8 100644
--- a/contrib/libs/protobuf/src/google/protobuf/map_entry_lite.h
+++ b/contrib/libs/protobuf/src/google/protobuf/map_entry_lite.h
@@ -33,7 +33,7 @@
#include <assert.h>
#include <string>
-
+
#include <google/protobuf/stubs/casts.h>
#include <google/protobuf/parse_context.h>
#include <google/protobuf/io/coded_stream.h>
@@ -53,11 +53,11 @@
namespace google {
namespace protobuf {
namespace internal {
-template <typename Derived, typename Key, typename Value,
+template <typename Derived, typename Key, typename Value,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
class MapEntry;
-template <typename Derived, typename Key, typename Value,
+template <typename Derived, typename Key, typename Value,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
class MapFieldLite;
@@ -135,17 +135,17 @@ struct MapEntryFuncs {
}
};
-// MapEntryImpl is used to implement parsing and serialization of map entries.
-// It uses Curious Recursive Template Pattern (CRTP) to provide the type of
-// the eventual code to the template code.
-template <typename Derived, typename Base, typename Key, typename Value,
+// MapEntryImpl is used to implement parsing and serialization of map entries.
+// It uses Curious Recursive Template Pattern (CRTP) to provide the type of
+// the eventual code to the template code.
+template <typename Derived, typename Base, typename Key, typename Value,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
-class MapEntryImpl : public Base {
+class MapEntryImpl : public Base {
public:
typedef MapEntryFuncs<Key, Value, kKeyFieldType, kValueFieldType> Funcs;
- protected:
+ protected:
// Provide utilities to parse/serialize key/value. Provide utilities to
// manipulate internal stored type.
typedef MapTypeHandler<kKeyFieldType, Key> KeyTypeHandler;
@@ -171,29 +171,29 @@ class MapEntryImpl : public Base {
GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG(kKeyFieldNumber, KeyTypeHandler::kWireType);
static const uint8 kValueTag = GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG(
kValueFieldNumber, ValueTypeHandler::kWireType);
- static const size_t kTagSize = 1;
+ static const size_t kTagSize = 1;
public:
- // Work-around for a compiler bug (see repeated_field.h).
- typedef void MapEntryHasMergeTypeTrait;
- typedef Derived EntryType;
- typedef Key EntryKeyType;
- typedef Value EntryValueType;
- static const WireFormatLite::FieldType kEntryKeyFieldType = kKeyFieldType;
- static const WireFormatLite::FieldType kEntryValueFieldType = kValueFieldType;
-
+ // Work-around for a compiler bug (see repeated_field.h).
+ typedef void MapEntryHasMergeTypeTrait;
+ typedef Derived EntryType;
+ typedef Key EntryKeyType;
+ typedef Value EntryValueType;
+ static const WireFormatLite::FieldType kEntryKeyFieldType = kKeyFieldType;
+ static const WireFormatLite::FieldType kEntryValueFieldType = kValueFieldType;
+
constexpr MapEntryImpl()
: key_(KeyTypeHandler::Constinit()),
value_(ValueTypeHandler::Constinit()),
_has_bits_{} {}
-
+
explicit MapEntryImpl(Arena* arena)
: Base(arena),
key_(KeyTypeHandler::Constinit()),
value_(ValueTypeHandler::Constinit()),
_has_bits_{} {}
-
- ~MapEntryImpl() {
+
+ ~MapEntryImpl() {
if (Base::GetArenaForAllocation() != NULL) return;
KeyTypeHandler::DeleteNoArena(key_);
ValueTypeHandler::DeleteNoArena(value_);
@@ -219,7 +219,7 @@ class MapEntryImpl : public Base {
// implements MessageLite =========================================
- // MapEntryImpl is for implementation only and this function isn't called
+ // MapEntryImpl is for implementation only and this function isn't called
// anywhere. Just provide a fake implementation here for MessageLite.
TProtoStringType GetTypeName() const override { return ""; }
@@ -257,7 +257,7 @@ class MapEntryImpl : public Base {
}
size_t ByteSizeLong() const override {
- size_t size = 0;
+ size_t size = 0;
size += kTagSize + static_cast<size_t>(KeyTypeHandler::ByteSize(key()));
size += kTagSize + static_cast<size_t>(ValueTypeHandler::ByteSize(value()));
return size;
@@ -269,8 +269,8 @@ class MapEntryImpl : public Base {
return ValueTypeHandler::Write(kValueFieldNumber, value(), ptr, stream);
}
- // Don't override SerializeWithCachedSizesToArray. Use MessageLite's.
-
+ // Don't override SerializeWithCachedSizesToArray. Use MessageLite's.
+
int GetCachedSize() const override {
int size = 0;
size += has_key() ? static_cast<int>(kTagSize) +
@@ -287,19 +287,19 @@ class MapEntryImpl : public Base {
}
Base* New() const override {
- Derived* entry = new Derived;
+ Derived* entry = new Derived;
return entry;
}
Base* New(Arena* arena) const override {
- Derived* entry = Arena::CreateMessage<Derived>(arena);
+ Derived* entry = Arena::CreateMessage<Derived>(arena);
return entry;
}
- protected:
- // We can't declare this function directly here as it would hide the other
- // overload (const Message&).
- void MergeFromInternal(const MapEntryImpl& from) {
+ protected:
+ // We can't declare this function directly here as it would hide the other
+ // overload (const Message&).
+ void MergeFromInternal(const MapEntryImpl& from) {
if (from._has_bits_[0]) {
if (from.has_key()) {
KeyTypeHandler::EnsureMutable(&key_, Base::GetArenaForAllocation());
@@ -315,7 +315,7 @@ class MapEntryImpl : public Base {
}
}
- public:
+ public:
void Clear() override {
KeyTypeHandler::Clear(&key_, Base::GetArenaForAllocation());
ValueTypeHandler::Clear(&value_, Base::GetArenaForAllocation());
@@ -374,9 +374,9 @@ class MapEntryImpl : public Base {
NewEntry();
*entry_->mutable_key() = key_;
- const bool result = entry_->MergePartialFromCodedStream(input);
- if (result) UseKeyAndValueFromEntry();
- return result;
+ const bool result = entry_->MergePartialFromCodedStream(input);
+ if (result) UseKeyAndValueFromEntry();
+ return result;
}
const char* _InternalParse(const char* ptr, ParseContext* ctx) {
@@ -463,9 +463,9 @@ class MapEntryImpl : public Base {
ValueMover::Move(value_ptr_, entry_->mutable_value());
map_->erase(key_);
KeyMover::Move(&key_, entry_->mutable_key());
- const bool result = entry_->MergePartialFromCodedStream(input);
- if (result) UseKeyAndValueFromEntry();
- return result;
+ const bool result = entry_->MergePartialFromCodedStream(input);
+ if (result) UseKeyAndValueFromEntry();
+ return result;
}
typedef MoveHelper<KeyTypeHandler::kIsEnum, KeyTypeHandler::kIsMessage,
@@ -506,14 +506,14 @@ class MapEntryImpl : public Base {
friend class ::PROTOBUF_NAMESPACE_ID::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- template <typename C, typename K, typename V, WireFormatLite::FieldType,
+ template <typename C, typename K, typename V, WireFormatLite::FieldType,
WireFormatLite::FieldType>
friend class internal::MapEntry;
- template <typename C, typename K, typename V, WireFormatLite::FieldType,
+ template <typename C, typename K, typename V, WireFormatLite::FieldType,
WireFormatLite::FieldType>
friend class internal::MapFieldLite;
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapEntryImpl);
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapEntryImpl);
};
template <typename T, typename Key, typename Value,
@@ -521,33 +521,33 @@ template <typename T, typename Key, typename Value,
WireFormatLite::FieldType kValueFieldType>
class MapEntryLite : public MapEntryImpl<T, MessageLite, Key, Value,
kKeyFieldType, kValueFieldType> {
- public:
+ public:
typedef MapEntryImpl<T, MessageLite, Key, Value, kKeyFieldType,
kValueFieldType>
- SuperType;
+ SuperType;
constexpr MapEntryLite() {}
- explicit MapEntryLite(Arena* arena) : SuperType(arena) {}
+ explicit MapEntryLite(Arena* arena) : SuperType(arena) {}
~MapEntryLite() { MessageLite::_internal_metadata_.template Delete<TProtoStringType>(); }
void MergeFrom(const MapEntryLite& other) { MergeFromInternal(other); }
- private:
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapEntryLite);
-};
-// The completely unprincipled and unwieldy use of template parameters in
-// the map code necessitates wrappers to make the code a little bit more
-// manageable.
-template <typename Derived>
-struct DeconstructMapEntry;
-
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapEntryLite);
+};
+// The completely unprincipled and unwieldy use of template parameters in
+// the map code necessitates wrappers to make the code a little bit more
+// manageable.
+template <typename Derived>
+struct DeconstructMapEntry;
+
template <typename T, typename K, typename V, WireFormatLite::FieldType key,
WireFormatLite::FieldType value>
struct DeconstructMapEntry<MapEntryLite<T, K, V, key, value> > {
- typedef K Key;
- typedef V Value;
- static const WireFormatLite::FieldType kKeyFieldType = key;
- static const WireFormatLite::FieldType kValueFieldType = value;
-};
-
+ typedef K Key;
+ typedef V Value;
+ static const WireFormatLite::FieldType kKeyFieldType = key;
+ static const WireFormatLite::FieldType kValueFieldType = value;
+};
+
// Helpers for deterministic serialization =============================
// This struct can be used with any generic sorting algorithm. If the Key
@@ -573,80 +573,80 @@ struct CompareByDerefFirst {
bool operator()(const T& a, const T& b) const { return a->first < b->first; }
};
-// Helper for table driven serialization
-
-template <WireFormatLite::FieldType FieldType>
-struct FromHelper {
- template <typename T>
- static const T& From(const T& x) {
- return x;
- }
-};
-
-template <>
-struct FromHelper<WireFormatLite::TYPE_STRING> {
+// Helper for table driven serialization
+
+template <WireFormatLite::FieldType FieldType>
+struct FromHelper {
+ template <typename T>
+ static const T& From(const T& x) {
+ return x;
+ }
+};
+
+template <>
+struct FromHelper<WireFormatLite::TYPE_STRING> {
static ArenaStringPtr From(const TProtoStringType& x) {
- ArenaStringPtr res;
+ ArenaStringPtr res;
TaggedPtr<TProtoStringType> ptr;
ptr.Set(const_cast<TProtoStringType*>(&x));
res.UnsafeSetTaggedPointer(ptr);
- return res;
- }
-};
-template <>
-struct FromHelper<WireFormatLite::TYPE_BYTES> {
+ return res;
+ }
+};
+template <>
+struct FromHelper<WireFormatLite::TYPE_BYTES> {
static ArenaStringPtr From(const TProtoStringType& x) {
- ArenaStringPtr res;
+ ArenaStringPtr res;
TaggedPtr<TProtoStringType> ptr;
ptr.Set(const_cast<TProtoStringType*>(&x));
res.UnsafeSetTaggedPointer(ptr);
- return res;
- }
-};
-template <>
-struct FromHelper<WireFormatLite::TYPE_MESSAGE> {
- template <typename T>
- static T* From(const T& x) {
- return const_cast<T*>(&x);
- }
-};
-
-template <typename MapEntryType>
-struct MapEntryHelper;
-
+ return res;
+ }
+};
+template <>
+struct FromHelper<WireFormatLite::TYPE_MESSAGE> {
+ template <typename T>
+ static T* From(const T& x) {
+ return const_cast<T*>(&x);
+ }
+};
+
+template <typename MapEntryType>
+struct MapEntryHelper;
+
template <typename T, typename Key, typename Value,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
struct MapEntryHelper<
MapEntryLite<T, Key, Value, kKeyFieldType, kValueFieldType> > {
- // Provide utilities to parse/serialize key/value. Provide utilities to
- // manipulate internal stored type.
- typedef MapTypeHandler<kKeyFieldType, Key> KeyTypeHandler;
- typedef MapTypeHandler<kValueFieldType, Value> ValueTypeHandler;
-
- // Define internal memory layout. Strings and messages are stored as
- // pointers, while other types are stored as values.
- typedef typename KeyTypeHandler::TypeOnMemory KeyOnMemory;
- typedef typename ValueTypeHandler::TypeOnMemory ValueOnMemory;
-
- explicit MapEntryHelper(const MapPair<Key, Value>& map_pair)
- : _has_bits_(3),
- _cached_size_(2 + KeyTypeHandler::GetCachedSize(map_pair.first) +
- ValueTypeHandler::GetCachedSize(map_pair.second)),
- key_(FromHelper<kKeyFieldType>::From(map_pair.first)),
- value_(FromHelper<kValueFieldType>::From(map_pair.second)) {}
-
+ // Provide utilities to parse/serialize key/value. Provide utilities to
+ // manipulate internal stored type.
+ typedef MapTypeHandler<kKeyFieldType, Key> KeyTypeHandler;
+ typedef MapTypeHandler<kValueFieldType, Value> ValueTypeHandler;
+
+ // Define internal memory layout. Strings and messages are stored as
+ // pointers, while other types are stored as values.
+ typedef typename KeyTypeHandler::TypeOnMemory KeyOnMemory;
+ typedef typename ValueTypeHandler::TypeOnMemory ValueOnMemory;
+
+ explicit MapEntryHelper(const MapPair<Key, Value>& map_pair)
+ : _has_bits_(3),
+ _cached_size_(2 + KeyTypeHandler::GetCachedSize(map_pair.first) +
+ ValueTypeHandler::GetCachedSize(map_pair.second)),
+ key_(FromHelper<kKeyFieldType>::From(map_pair.first)),
+ value_(FromHelper<kValueFieldType>::From(map_pair.second)) {}
+
// Purposely not following the style guide naming. These are the names
- // the proto compiler would generate given the map entry descriptor.
- // The proto compiler generates the offsets in this struct as if this was
- // a regular message. This way the table driven code barely notices it's
- // dealing with a map field.
- uint32 _has_bits_; // NOLINT
- uint32 _cached_size_; // NOLINT
- KeyOnMemory key_; // NOLINT
- ValueOnMemory value_; // NOLINT
-};
-
+ // the proto compiler would generate given the map entry descriptor.
+ // The proto compiler generates the offsets in this struct as if this was
+ // a regular message. This way the table driven code barely notices it's
+ // dealing with a map field.
+ uint32 _has_bits_; // NOLINT
+ uint32 _cached_size_; // NOLINT
+ KeyOnMemory key_; // NOLINT
+ ValueOnMemory value_; // NOLINT
+};
+
} // namespace internal
} // namespace protobuf
} // namespace google
diff --git a/contrib/libs/protobuf/src/google/protobuf/map_field.cc b/contrib/libs/protobuf/src/google/protobuf/map_field.cc
index 6fab9f53cc..4687361adc 100644
--- a/contrib/libs/protobuf/src/google/protobuf/map_field.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/map_field.cc
@@ -76,29 +76,29 @@ void MapFieldBase::InternalSwap(MapFieldBase* other) {
state_.store(other_state, std::memory_order_relaxed);
}
-size_t MapFieldBase::SpaceUsedExcludingSelfLong() const {
+size_t MapFieldBase::SpaceUsedExcludingSelfLong() const {
ConstAccess();
mutex_.Lock();
- size_t size = SpaceUsedExcludingSelfNoLock();
+ size_t size = SpaceUsedExcludingSelfNoLock();
mutex_.Unlock();
ConstAccess();
return size;
}
-size_t MapFieldBase::SpaceUsedExcludingSelfNoLock() const {
+size_t MapFieldBase::SpaceUsedExcludingSelfNoLock() const {
if (repeated_field_ != NULL) {
- return repeated_field_->SpaceUsedExcludingSelfLong();
+ return repeated_field_->SpaceUsedExcludingSelfLong();
} else {
return 0;
}
}
-bool MapFieldBase::IsMapValid() const {
+bool MapFieldBase::IsMapValid() const {
ConstAccess();
- // "Acquire" insures the operation after SyncRepeatedFieldWithMap won't get
- // executed before state_ is checked.
+ // "Acquire" insures the operation after SyncRepeatedFieldWithMap won't get
+ // executed before state_ is checked.
int state = state_.load(std::memory_order_acquire);
- return state != STATE_MODIFIED_REPEATED;
+ return state != STATE_MODIFIED_REPEATED;
}
bool MapFieldBase::IsRepeatedFieldValid() const {
@@ -524,15 +524,15 @@ void DynamicMapField::SyncMapWithRepeatedFieldNoLock() const {
GOOGLE_LOG(FATAL) << "Can't get here.";
break;
}
-
+
if (MapFieldBase::arena_ == nullptr) {
// Remove existing map value with same key.
Map<MapKey, MapValueRef>::iterator iter = map->find(map_key);
if (iter != map->end()) {
iter->second.DeleteData();
}
- }
-
+ }
+
MapValueRef& map_val = (*map)[map_key];
map_val.SetType(val_des->cpp_type());
switch (val_des->cpp_type()) {
@@ -564,13 +564,13 @@ void DynamicMapField::SyncMapWithRepeatedFieldNoLock() const {
}
}
-size_t DynamicMapField::SpaceUsedExcludingSelfNoLock() const {
- size_t size = 0;
+size_t DynamicMapField::SpaceUsedExcludingSelfNoLock() const {
+ size_t size = 0;
if (MapFieldBase::repeated_field_ != NULL) {
- size += MapFieldBase::repeated_field_->SpaceUsedExcludingSelfLong();
+ size += MapFieldBase::repeated_field_->SpaceUsedExcludingSelfLong();
}
size += sizeof(map_);
- size_t map_size = map_.size();
+ size_t map_size = map_.size();
if (map_size) {
Map<MapKey, MapValueRef>::const_iterator it = map_.begin();
size += sizeof(it->first) * map_size;
@@ -599,7 +599,7 @@ size_t DynamicMapField::SpaceUsedExcludingSelfNoLock() const {
case FieldDescriptor::CPPTYPE_MESSAGE: {
while (it != map_.end()) {
const Message& message = it->second.GetMessageValue();
- size += message.GetReflection()->SpaceUsedLong(message);
+ size += message.GetReflection()->SpaceUsedLong(message);
++it;
}
break;
diff --git a/contrib/libs/protobuf/src/google/protobuf/map_field.h b/contrib/libs/protobuf/src/google/protobuf/map_field.h
index 0639578f63..4180e28a82 100644
--- a/contrib/libs/protobuf/src/google/protobuf/map_field.h
+++ b/contrib/libs/protobuf/src/google/protobuf/map_field.h
@@ -358,8 +358,8 @@ class PROTOBUF_EXPORT MapFieldBase {
// Returns whether changes to the map are reflected in the repeated field.
bool IsRepeatedFieldValid() const;
- // Insures operations after won't get executed before calling this.
- bool IsMapValid() const;
+ // Insures operations after won't get executed before calling this.
+ bool IsMapValid() const;
virtual bool DeleteMapValue(const MapKey& map_key) = 0;
virtual bool EqualIterator(const MapIterator& a,
const MapIterator& b) const = 0;
@@ -374,15 +374,15 @@ class PROTOBUF_EXPORT MapFieldBase {
// Returns the number of bytes used by the repeated field, excluding
// sizeof(*this)
- size_t SpaceUsedExcludingSelfLong() const;
+ size_t SpaceUsedExcludingSelfLong() const;
+
+ int SpaceUsedExcludingSelf() const {
+ return internal::ToIntSize(SpaceUsedExcludingSelfLong());
+ }
- int SpaceUsedExcludingSelf() const {
- return internal::ToIntSize(SpaceUsedExcludingSelfLong());
- }
-
protected:
// Gets the size of space used by map field.
- virtual size_t SpaceUsedExcludingSelfNoLock() const;
+ virtual size_t SpaceUsedExcludingSelfNoLock() const;
// Synchronizes the content in Map to RepeatedPtrField if there is any change
// to Map after last synchronization.
@@ -467,7 +467,7 @@ class PROTOBUF_EXPORT MapFieldBase {
// IncreaseIterator() is called by operator++() of MapIterator only.
// It implements the ++ operator of MapIterator.
virtual void IncreaseIterator(MapIterator* map_iter) const = 0;
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapFieldBase);
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapFieldBase);
};
// This class provides common Map Reflection implementations for generated
@@ -503,27 +503,27 @@ class TypeDefinedMapFieldBase : public MapFieldBase {
void IncreaseIterator(MapIterator* map_iter) const override;
virtual void SetMapIteratorValue(MapIterator* map_iter) const = 0;
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeDefinedMapFieldBase);
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeDefinedMapFieldBase);
};
// This class provides access to map field using generated api. It is used for
// internal generated message implementation only. Users should never use this
// directly.
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
-class MapField : public TypeDefinedMapFieldBase<Key, T> {
+class MapField : public TypeDefinedMapFieldBase<Key, T> {
// Provide utilities to parse/serialize key/value. Provide utilities to
// manipulate internal stored type.
typedef MapTypeHandler<kKeyFieldType, Key> KeyTypeHandler;
typedef MapTypeHandler<kValueFieldType, T> ValueTypeHandler;
// Define message type for internal repeated field.
- typedef Derived EntryType;
+ typedef Derived EntryType;
// Define abbreviation for parent MapFieldLite
typedef MapFieldLite<Derived, Key, T, kKeyFieldType, kValueFieldType>
- MapFieldLiteType;
+ MapFieldLiteType;
// Enum needs to be handled differently from other types because it has
// different exposed type in Map's api and repeated field's api. For
@@ -533,18 +533,18 @@ class MapField : public TypeDefinedMapFieldBase<Key, T> {
typedef typename MapIf<kIsValueEnum, T, const T&>::type CastValueType;
public:
- typedef typename Derived::SuperType EntryTypeTrait;
- typedef Map<Key, T> MapType;
-
- MapField() {}
+ typedef typename Derived::SuperType EntryTypeTrait;
+ typedef Map<Key, T> MapType;
+
+ MapField() {}
// This constructor is for constant initialized global instances.
// It uses a linker initialized mutex, so it is not compatible with regular
// runtime instances.
explicit constexpr MapField(ConstantInitialized tag)
: TypeDefinedMapFieldBase<Key, T>(tag), impl_() {}
- explicit MapField(Arena* arena)
- : TypeDefinedMapFieldBase<Key, T>(arena), impl_(arena) {}
+ explicit MapField(Arena* arena)
+ : TypeDefinedMapFieldBase<Key, T>(arena), impl_(arena) {}
// Implement MapFieldBase
bool ContainsMapKey(const MapKey& map_key) const override;
@@ -555,17 +555,17 @@ class MapField : public TypeDefinedMapFieldBase<Key, T> {
bool DeleteMapValue(const MapKey& map_key) override;
const Map<Key, T>& GetMap() const override {
- MapFieldBase::SyncMapWithRepeatedField();
- return impl_.GetMap();
- }
+ MapFieldBase::SyncMapWithRepeatedField();
+ return impl_.GetMap();
+ }
Map<Key, T>* MutableMap() override {
- MapFieldBase::SyncMapWithRepeatedField();
- Map<Key, T>* result = impl_.MutableMap();
- MapFieldBase::SetMapDirty();
- return result;
- }
-
+ MapFieldBase::SyncMapWithRepeatedField();
+ Map<Key, T>* result = impl_.MutableMap();
+ MapFieldBase::SetMapDirty();
+ return result;
+ }
+
int size() const override;
void Clear() override;
void MergeFrom(const MapFieldBase& other) override;
@@ -573,19 +573,19 @@ class MapField : public TypeDefinedMapFieldBase<Key, T> {
void UnsafeShallowSwap(MapFieldBase* other) override;
void InternalSwap(MapField* other);
- // Used in the implementation of parsing. Caller should take the ownership iff
- // arena_ is NULL.
- EntryType* NewEntry() const { return impl_.NewEntry(); }
- // Used in the implementation of serializing enum value type. Caller should
- // take the ownership iff arena_ is NULL.
- EntryType* NewEnumEntryWrapper(const Key& key, const T t) const {
- return impl_.NewEnumEntryWrapper(key, t);
- }
- // Used in the implementation of serializing other value types. Caller should
- // take the ownership iff arena_ is NULL.
- EntryType* NewEntryWrapper(const Key& key, const T& t) const {
- return impl_.NewEntryWrapper(key, t);
- }
+ // Used in the implementation of parsing. Caller should take the ownership iff
+ // arena_ is NULL.
+ EntryType* NewEntry() const { return impl_.NewEntry(); }
+ // Used in the implementation of serializing enum value type. Caller should
+ // take the ownership iff arena_ is NULL.
+ EntryType* NewEnumEntryWrapper(const Key& key, const T t) const {
+ return impl_.NewEnumEntryWrapper(key, t);
+ }
+ // Used in the implementation of serializing other value types. Caller should
+ // take the ownership iff arena_ is NULL.
+ EntryType* NewEntryWrapper(const Key& key, const T& t) const {
+ return impl_.NewEntryWrapper(key, t);
+ }
const char* _InternalParse(const char* ptr, ParseContext* ctx) {
return impl_._InternalParse(ptr, ctx);
@@ -599,8 +599,8 @@ class MapField : public TypeDefinedMapFieldBase<Key, T> {
}
private:
- MapFieldLiteType impl_;
-
+ MapFieldLiteType impl_;
+
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
@@ -612,8 +612,8 @@ class MapField : public TypeDefinedMapFieldBase<Key, T> {
void SetMapIteratorValue(MapIterator* map_iter) const override;
friend class ::PROTOBUF_NAMESPACE_ID::Arena;
- friend class MapFieldStateTest; // For testing, it needs raw access to impl_
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapField);
+ friend class MapFieldStateTest; // For testing, it needs raw access to impl_
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapField);
};
template <typename Derived, typename Key, typename T,
@@ -635,8 +635,8 @@ template <typename T, typename Key, typename Value,
struct MapEntryToMapField<
MapEntry<T, Key, Value, kKeyFieldType, kValueFieldType>> {
typedef MapField<T, Key, Value, kKeyFieldType, kValueFieldType> MapFieldType;
-};
-
+};
+
class PROTOBUF_EXPORT DynamicMapField
: public TypeDefinedMapFieldBase<MapKey, MapValueRef> {
public:
@@ -672,7 +672,7 @@ class PROTOBUF_EXPORT DynamicMapField
void SyncMapWithRepeatedFieldNoLock() const override;
size_t SpaceUsedExcludingSelfNoLock() const override;
void SetMapIteratorValue(MapIterator* map_iter) const override;
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DynamicMapField);
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DynamicMapField);
};
} // namespace internal
@@ -680,59 +680,59 @@ class PROTOBUF_EXPORT DynamicMapField
// MapValueConstRef points to a map value. Users can NOT modify
// the map value.
class PROTOBUF_EXPORT MapValueConstRef {
- public:
+ public:
MapValueConstRef() : data_(nullptr), type_() {}
-
- int64 GetInt64Value() const {
- TYPE_CHECK(FieldDescriptor::CPPTYPE_INT64,
+
+ int64 GetInt64Value() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_INT64,
"MapValueConstRef::GetInt64Value");
return *reinterpret_cast<int64*>(data_);
- }
- uint64 GetUInt64Value() const {
- TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT64,
+ }
+ uint64 GetUInt64Value() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT64,
"MapValueConstRef::GetUInt64Value");
return *reinterpret_cast<uint64*>(data_);
- }
- int32 GetInt32Value() const {
- TYPE_CHECK(FieldDescriptor::CPPTYPE_INT32,
+ }
+ int32 GetInt32Value() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_INT32,
"MapValueConstRef::GetInt32Value");
return *reinterpret_cast<int32*>(data_);
- }
- uint32 GetUInt32Value() const {
- TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT32,
+ }
+ uint32 GetUInt32Value() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT32,
"MapValueConstRef::GetUInt32Value");
return *reinterpret_cast<uint32*>(data_);
- }
- bool GetBoolValue() const {
+ }
+ bool GetBoolValue() const {
TYPE_CHECK(FieldDescriptor::CPPTYPE_BOOL, "MapValueConstRef::GetBoolValue");
return *reinterpret_cast<bool*>(data_);
- }
+ }
int GetEnumValue() const {
TYPE_CHECK(FieldDescriptor::CPPTYPE_ENUM, "MapValueConstRef::GetEnumValue");
return *reinterpret_cast<int*>(data_);
}
const TProtoStringType& GetStringValue() const {
- TYPE_CHECK(FieldDescriptor::CPPTYPE_STRING,
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_STRING,
"MapValueConstRef::GetStringValue");
return *reinterpret_cast<TProtoStringType*>(data_);
- }
+ }
float GetFloatValue() const {
TYPE_CHECK(FieldDescriptor::CPPTYPE_FLOAT,
"MapValueConstRef::GetFloatValue");
return *reinterpret_cast<float*>(data_);
- }
+ }
double GetDoubleValue() const {
TYPE_CHECK(FieldDescriptor::CPPTYPE_DOUBLE,
"MapValueConstRef::GetDoubleValue");
return *reinterpret_cast<double*>(data_);
}
-
+
const Message& GetMessageValue() const {
TYPE_CHECK(FieldDescriptor::CPPTYPE_MESSAGE,
"MapValueConstRef::GetMessageValue");
return *reinterpret_cast<Message*>(data_);
- }
-
+ }
+
protected:
// data_ point to a map value. MapValueConstRef does not
// own this value.
@@ -746,107 +746,107 @@ class PROTOBUF_EXPORT MapValueConstRef {
GOOGLE_LOG(FATAL)
<< "Protocol Buffer map usage error:\n"
<< "MapValueConstRef::type MapValueConstRef is not initialized.";
- }
+ }
return type_;
- }
-
- private:
+ }
+
+ private:
template <typename Derived, typename K, typename V,
internal::WireFormatLite::FieldType key_wire_type,
internal::WireFormatLite::FieldType value_wire_type>
friend class internal::MapField;
- template <typename K, typename V>
- friend class internal::TypeDefinedMapFieldBase;
+ template <typename K, typename V>
+ friend class internal::TypeDefinedMapFieldBase;
friend class ::PROTOBUF_NAMESPACE_ID::MapIterator;
friend class Reflection;
- friend class internal::DynamicMapField;
-
+ friend class internal::DynamicMapField;
+
void SetType(FieldDescriptor::CppType type) { type_ = type; }
void SetValue(const void* val) { data_ = const_cast<void*>(val); }
void CopyFrom(const MapValueConstRef& other) {
type_ = other.type_;
data_ = other.data_;
- }
-};
-
+ }
+};
+
// MapValueRef points to a map value. Users are able to modify
// the map value.
class PROTOBUF_EXPORT MapValueRef final : public MapValueConstRef {
- public:
+ public:
MapValueRef() {}
-
- void SetInt64Value(int64 value) {
+
+ void SetInt64Value(int64 value) {
TYPE_CHECK(FieldDescriptor::CPPTYPE_INT64, "MapValueRef::SetInt64Value");
- *reinterpret_cast<int64*>(data_) = value;
- }
- void SetUInt64Value(uint64 value) {
+ *reinterpret_cast<int64*>(data_) = value;
+ }
+ void SetUInt64Value(uint64 value) {
TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT64, "MapValueRef::SetUInt64Value");
- *reinterpret_cast<uint64*>(data_) = value;
- }
- void SetInt32Value(int32 value) {
+ *reinterpret_cast<uint64*>(data_) = value;
+ }
+ void SetInt32Value(int32 value) {
TYPE_CHECK(FieldDescriptor::CPPTYPE_INT32, "MapValueRef::SetInt32Value");
- *reinterpret_cast<int32*>(data_) = value;
- }
- void SetUInt32Value(uint32 value) {
+ *reinterpret_cast<int32*>(data_) = value;
+ }
+ void SetUInt32Value(uint32 value) {
TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT32, "MapValueRef::SetUInt32Value");
- *reinterpret_cast<uint32*>(data_) = value;
- }
- void SetBoolValue(bool value) {
+ *reinterpret_cast<uint32*>(data_) = value;
+ }
+ void SetBoolValue(bool value) {
TYPE_CHECK(FieldDescriptor::CPPTYPE_BOOL, "MapValueRef::SetBoolValue");
- *reinterpret_cast<bool*>(data_) = value;
- }
- // TODO(jieluo) - Checks that enum is member.
- void SetEnumValue(int value) {
+ *reinterpret_cast<bool*>(data_) = value;
+ }
+ // TODO(jieluo) - Checks that enum is member.
+ void SetEnumValue(int value) {
TYPE_CHECK(FieldDescriptor::CPPTYPE_ENUM, "MapValueRef::SetEnumValue");
- *reinterpret_cast<int*>(data_) = value;
- }
+ *reinterpret_cast<int*>(data_) = value;
+ }
void SetStringValue(const TProtoStringType& value) {
TYPE_CHECK(FieldDescriptor::CPPTYPE_STRING, "MapValueRef::SetStringValue");
*reinterpret_cast<TProtoStringType*>(data_) = value;
- }
- void SetFloatValue(float value) {
+ }
+ void SetFloatValue(float value) {
TYPE_CHECK(FieldDescriptor::CPPTYPE_FLOAT, "MapValueRef::SetFloatValue");
- *reinterpret_cast<float*>(data_) = value;
- }
- void SetDoubleValue(double value) {
+ *reinterpret_cast<float*>(data_) = value;
+ }
+ void SetDoubleValue(double value) {
TYPE_CHECK(FieldDescriptor::CPPTYPE_DOUBLE, "MapValueRef::SetDoubleValue");
- *reinterpret_cast<double*>(data_) = value;
- }
-
- Message* MutableMessageValue() {
- TYPE_CHECK(FieldDescriptor::CPPTYPE_MESSAGE,
- "MapValueRef::MutableMessageValue");
- return reinterpret_cast<Message*>(data_);
- }
-
- private:
- friend class internal::DynamicMapField;
-
- // Only used in DynamicMapField
- void DeleteData() {
- switch (type_) {
+ *reinterpret_cast<double*>(data_) = value;
+ }
+
+ Message* MutableMessageValue() {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_MESSAGE,
+ "MapValueRef::MutableMessageValue");
+ return reinterpret_cast<Message*>(data_);
+ }
+
+ private:
+ friend class internal::DynamicMapField;
+
+ // Only used in DynamicMapField
+ void DeleteData() {
+ switch (type_) {
#define HANDLE_TYPE(CPPTYPE, TYPE) \
case FieldDescriptor::CPPTYPE_##CPPTYPE: { \
delete reinterpret_cast<TYPE*>(data_); \
break; \
}
- HANDLE_TYPE(INT32, int32);
- HANDLE_TYPE(INT64, int64);
- HANDLE_TYPE(UINT32, uint32);
- HANDLE_TYPE(UINT64, uint64);
- HANDLE_TYPE(DOUBLE, double);
- HANDLE_TYPE(FLOAT, float);
- HANDLE_TYPE(BOOL, bool);
+ HANDLE_TYPE(INT32, int32);
+ HANDLE_TYPE(INT64, int64);
+ HANDLE_TYPE(UINT32, uint32);
+ HANDLE_TYPE(UINT64, uint64);
+ HANDLE_TYPE(DOUBLE, double);
+ HANDLE_TYPE(FLOAT, float);
+ HANDLE_TYPE(BOOL, bool);
HANDLE_TYPE(STRING, TProtoStringType);
- HANDLE_TYPE(ENUM, int32);
- HANDLE_TYPE(MESSAGE, Message);
-#undef HANDLE_TYPE
- }
- }
-};
-
-#undef TYPE_CHECK
-
+ HANDLE_TYPE(ENUM, int32);
+ HANDLE_TYPE(MESSAGE, Message);
+#undef HANDLE_TYPE
+ }
+ }
+};
+
+#undef TYPE_CHECK
+
class PROTOBUF_EXPORT MapIterator {
public:
MapIterator(Message* message, const FieldDescriptor* field) {
@@ -862,11 +862,11 @@ class PROTOBUF_EXPORT MapIterator {
map_->CopyIterator(this, other);
}
~MapIterator() { map_->DeleteIterator(this); }
- MapIterator& operator=(const MapIterator& other) {
- map_ = other.map_;
- map_->CopyIterator(this, other);
- return *this;
- }
+ MapIterator& operator=(const MapIterator& other) {
+ map_ = other.map_;
+ map_->CopyIterator(this, other);
+ return *this;
+ }
friend bool operator==(const MapIterator& a, const MapIterator& b) {
return a.map_->EqualIterator(a, b);
}
@@ -895,7 +895,7 @@ class PROTOBUF_EXPORT MapIterator {
template <typename Key, typename T>
friend class internal::TypeDefinedMapFieldBase;
friend class internal::DynamicMapField;
- template <typename Derived, typename Key, typename T,
+ template <typename Derived, typename Key, typename T,
internal::WireFormatLite::FieldType kKeyFieldType,
internal::WireFormatLite::FieldType kValueFieldType>
friend class internal::MapField;
@@ -913,8 +913,8 @@ class PROTOBUF_EXPORT MapIterator {
};
} // namespace protobuf
-} // namespace google
+} // namespace google
#include <google/protobuf/port_undef.inc>
-
+
#endif // GOOGLE_PROTOBUF_MAP_FIELD_H__
diff --git a/contrib/libs/protobuf/src/google/protobuf/map_field_inl.h b/contrib/libs/protobuf/src/google/protobuf/map_field_inl.h
index 45249e450d..32e4a9158b 100644
--- a/contrib/libs/protobuf/src/google/protobuf/map_field_inl.h
+++ b/contrib/libs/protobuf/src/google/protobuf/map_field_inl.h
@@ -162,15 +162,15 @@ void TypeDefinedMapFieldBase<Key, T>::CopyIterator(
// ----------------------------------------------------------------------
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
int MapField<Derived, Key, T, kKeyFieldType, kValueFieldType>::size() const {
MapFieldBase::SyncMapWithRepeatedField();
- return static_cast<int>(impl_.GetMap().size());
+ return static_cast<int>(impl_.GetMap().size());
}
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
void MapField<Derived, Key, T, kKeyFieldType, kValueFieldType>::Clear() {
@@ -181,20 +181,20 @@ void MapField<Derived, Key, T, kKeyFieldType, kValueFieldType>::Clear() {
repeated_field->Clear();
}
- impl_.MutableMap()->clear();
+ impl_.MutableMap()->clear();
// Data in map and repeated field are both empty, but we can't set status
// CLEAN. Because clear is a generated API, we cannot invalidate previous
// reference to map.
MapFieldBase::SetMapDirty();
}
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
void MapField<Derived, Key, T, kKeyFieldType,
kValueFieldType>::SetMapIteratorValue(MapIterator* map_iter)
- const {
- const Map<Key, T>& map = impl_.GetMap();
+ const {
+ const Map<Key, T>& map = impl_.GetMap();
typename Map<Key, T>::const_iterator iter =
TypeDefinedMapFieldBase<Key, T>::InternalGetIterator(map_iter);
if (iter == map.end()) return;
@@ -202,18 +202,18 @@ void MapField<Derived, Key, T, kKeyFieldType,
map_iter->value_.SetValue(&iter->second);
}
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
bool MapField<Derived, Key, T, kKeyFieldType, kValueFieldType>::ContainsMapKey(
const MapKey& map_key) const {
- const Map<Key, T>& map = impl_.GetMap();
+ const Map<Key, T>& map = impl_.GetMap();
const Key& key = UnwrapMapKey<Key>(map_key);
typename Map<Key, T>::const_iterator iter = map.find(key);
return iter != map.end();
}
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
bool MapField<Derived, Key, T, kKeyFieldType,
@@ -234,7 +234,7 @@ bool MapField<Derived, Key, T, kKeyFieldType,
return false;
}
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
bool MapField<Derived, Key, T, kKeyFieldType, kValueFieldType>::LookupMapValue(
@@ -260,7 +260,7 @@ bool MapField<Derived, Key, T, kKeyFieldType, kValueFieldType>::DeleteMapValue(
return MutableMap()->erase(key);
}
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
void MapField<Derived, Key, T, kKeyFieldType, kValueFieldType>::MergeFrom(
@@ -272,7 +272,7 @@ void MapField<Derived, Key, T, kKeyFieldType, kValueFieldType>::MergeFrom(
MapFieldBase::SetMapDirty();
}
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
void MapField<Derived, Key, T, kKeyFieldType, kValueFieldType>::Swap(
@@ -282,7 +282,7 @@ void MapField<Derived, Key, T, kKeyFieldType, kValueFieldType>::Swap(
impl_.Swap(&other_field->impl_);
}
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
void MapField<Derived, Key, T, kKeyFieldType,
@@ -304,44 +304,44 @@ template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType kValueFieldType>
void MapField<Derived, Key, T, kKeyFieldType,
kValueFieldType>::SyncRepeatedFieldWithMapNoLock() const {
- if (this->MapFieldBase::repeated_field_ == NULL) {
+ if (this->MapFieldBase::repeated_field_ == NULL) {
this->MapFieldBase::repeated_field_ =
Arena::CreateMessage<RepeatedPtrField<Message> >(
this->MapFieldBase::arena_);
}
- const Map<Key, T>& map = impl_.GetMap();
+ const Map<Key, T>& map = impl_.GetMap();
RepeatedPtrField<EntryType>* repeated_field =
reinterpret_cast<RepeatedPtrField<EntryType>*>(
- this->MapFieldBase::repeated_field_);
+ this->MapFieldBase::repeated_field_);
repeated_field->Clear();
- // The only way we can get at this point is through reflection and the
- // only way we can get the reflection object is by having called GetReflection
- // on the encompassing field. So that type must have existed and hence we
- // know that this MapEntry default_type has also already been constructed.
- // So it's safe to just call internal_default_instance().
- const Message* default_entry = Derived::internal_default_instance();
+ // The only way we can get at this point is through reflection and the
+ // only way we can get the reflection object is by having called GetReflection
+ // on the encompassing field. So that type must have existed and hence we
+ // know that this MapEntry default_type has also already been constructed.
+ // So it's safe to just call internal_default_instance().
+ const Message* default_entry = Derived::internal_default_instance();
for (typename Map<Key, T>::const_iterator it = map.begin(); it != map.end();
++it) {
EntryType* new_entry =
- down_cast<EntryType*>(default_entry->New(this->MapFieldBase::arena_));
+ down_cast<EntryType*>(default_entry->New(this->MapFieldBase::arena_));
repeated_field->AddAllocated(new_entry);
(*new_entry->mutable_key()) = it->first;
(*new_entry->mutable_value()) = it->second;
}
}
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
void MapField<Derived, Key, T, kKeyFieldType,
kValueFieldType>::SyncMapWithRepeatedFieldNoLock() const {
- Map<Key, T>* map = const_cast<MapField*>(this)->impl_.MutableMap();
+ Map<Key, T>* map = const_cast<MapField*>(this)->impl_.MutableMap();
RepeatedPtrField<EntryType>* repeated_field =
reinterpret_cast<RepeatedPtrField<EntryType>*>(
- this->MapFieldBase::repeated_field_);
- GOOGLE_CHECK(this->MapFieldBase::repeated_field_ != NULL);
+ this->MapFieldBase::repeated_field_);
+ GOOGLE_CHECK(this->MapFieldBase::repeated_field_ != NULL);
map->clear();
for (typename RepeatedPtrField<EntryType>::iterator it =
repeated_field->begin();
@@ -355,14 +355,14 @@ void MapField<Derived, Key, T, kKeyFieldType,
}
}
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType kKeyFieldType,
WireFormatLite::FieldType kValueFieldType>
size_t MapField<Derived, Key, T, kKeyFieldType,
kValueFieldType>::SpaceUsedExcludingSelfNoLock() const {
- size_t size = 0;
- if (this->MapFieldBase::repeated_field_ != NULL) {
- size += this->MapFieldBase::repeated_field_->SpaceUsedExcludingSelfLong();
+ size_t size = 0;
+ if (this->MapFieldBase::repeated_field_ != NULL) {
+ size += this->MapFieldBase::repeated_field_->SpaceUsedExcludingSelfLong();
}
size += impl_.GetMap().SpaceUsedExcludingSelfLong();
diff --git a/contrib/libs/protobuf/src/google/protobuf/map_field_lite.h b/contrib/libs/protobuf/src/google/protobuf/map_field_lite.h
index 5e6d6549a8..46658d4dae 100644
--- a/contrib/libs/protobuf/src/google/protobuf/map_field_lite.h
+++ b/contrib/libs/protobuf/src/google/protobuf/map_field_lite.h
@@ -52,52 +52,52 @@ namespace internal {
// This class provides access to map field using generated api. It is used for
// internal generated message implementation only. Users should never use this
// directly.
-template <typename Derived, typename Key, typename T,
+template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType key_wire_type,
WireFormatLite::FieldType value_wire_type>
class MapFieldLite {
// Define message type for internal repeated field.
- typedef Derived EntryType;
+ typedef Derived EntryType;
public:
- typedef Map<Key, T> MapType;
- typedef EntryType EntryTypeTrait;
-
+ typedef Map<Key, T> MapType;
+ typedef EntryType EntryTypeTrait;
+
constexpr MapFieldLite() {}
explicit MapFieldLite(Arena* arena) : map_(arena) {}
-
+
// Accessors
- const Map<Key, T>& GetMap() const { return map_; }
- Map<Key, T>* MutableMap() { return &map_; }
+ const Map<Key, T>& GetMap() const { return map_; }
+ Map<Key, T>* MutableMap() { return &map_; }
// Convenient methods for generated message implementation.
- int size() const { return static_cast<int>(map_.size()); }
- void Clear() { return map_.clear(); }
- void MergeFrom(const MapFieldLite& other) {
- for (typename Map<Key, T>::const_iterator it = other.map_.begin();
- it != other.map_.end(); ++it) {
- map_[it->first] = it->second;
- }
- }
- void Swap(MapFieldLite* other) { map_.swap(other->map_); }
+ int size() const { return static_cast<int>(map_.size()); }
+ void Clear() { return map_.clear(); }
+ void MergeFrom(const MapFieldLite& other) {
+ for (typename Map<Key, T>::const_iterator it = other.map_.begin();
+ it != other.map_.end(); ++it) {
+ map_[it->first] = it->second;
+ }
+ }
+ void Swap(MapFieldLite* other) { map_.swap(other->map_); }
void InternalSwap(MapFieldLite* other) { map_.InternalSwap(other->map_); }
- // Used in the implementation of parsing. Caller should take the ownership iff
- // arena_ is NULL.
- EntryType* NewEntry() const {
+ // Used in the implementation of parsing. Caller should take the ownership iff
+ // arena_ is NULL.
+ EntryType* NewEntry() const {
return Arena::CreateMessage<EntryType>(map_.arena());
- }
+ }
// Used in the implementation of serializing enum value type. Caller should
- // take the ownership iff arena_ is NULL.
- EntryType* NewEnumEntryWrapper(const Key& key, const T t) const {
+ // take the ownership iff arena_ is NULL.
+ EntryType* NewEnumEntryWrapper(const Key& key, const T t) const {
return EntryType::EnumWrap(key, t, map_.arena_);
- }
+ }
// Used in the implementation of serializing other value types. Caller should
- // take the ownership iff arena_ is NULL.
- EntryType* NewEntryWrapper(const Key& key, const T& t) const {
+ // take the ownership iff arena_ is NULL.
+ EntryType* NewEntryWrapper(const Key& key, const T& t) const {
return EntryType::Wrap(key, t, map_.arena_);
- }
+ }
const char* _InternalParse(const char* ptr, ParseContext* ctx) {
typename Derived::template Parser<MapFieldLite, Map<Key, T>> parser(this);
@@ -116,7 +116,7 @@ class MapFieldLite {
private:
typedef void DestructorSkippable_;
- Map<Key, T> map_;
+ Map<Key, T> map_;
friend class ::PROTOBUF_NAMESPACE_ID::Arena;
};
diff --git a/contrib/libs/protobuf/src/google/protobuf/map_type_handler.h b/contrib/libs/protobuf/src/google/protobuf/map_type_handler.h
index 2bee3f8c9a..e718790ef4 100644
--- a/contrib/libs/protobuf/src/google/protobuf/map_type_handler.h
+++ b/contrib/libs/protobuf/src/google/protobuf/map_type_handler.h
@@ -142,7 +142,7 @@ class MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type> {
MapWireFieldTypeTraits<WireFormatLite::TYPE_MESSAGE, Type>::kIsEnum;
// Functions used in parsing and serialization. ===================
- static inline size_t ByteSize(const MapEntryAccessorType& value);
+ static inline size_t ByteSize(const MapEntryAccessorType& value);
static inline int GetCachedSize(const MapEntryAccessorType& value);
static inline bool Read(io::CodedInputStream* input,
MapEntryAccessorType* value);
@@ -162,7 +162,7 @@ class MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type> {
static inline Type* EnsureMutable(Type** value, Arena* arena);
// SpaceUsedInMapEntry: Return bytes used by value in MapEntry, excluding
// those already calculate in sizeof(MapField).
- static inline size_t SpaceUsedInMapEntryLong(const Type* value);
+ static inline size_t SpaceUsedInMapEntryLong(const Type* value);
// Return default instance if value is not initialized when calling const
// reference accessor.
static inline const Type& DefaultIfNotInitialized(const Type* value);
@@ -202,7 +202,7 @@ class MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type> {
static inline void Merge(const MapEntryAccessorType& from, \
TypeOnMemory* to, Arena* arena); \
static inline void Clear(TypeOnMemory* value, Arena* arena); \
- static inline size_t SpaceUsedInMapEntryLong(const TypeOnMemory& value); \
+ static inline size_t SpaceUsedInMapEntryLong(const TypeOnMemory& value); \
static inline const MapEntryAccessorType& DefaultIfNotInitialized( \
const TypeOnMemory& value); \
static inline bool IsInitialized(const TypeOnMemory& value); \
@@ -239,7 +239,7 @@ inline size_t MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::ByteSize(
template <typename Type> \
inline int MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::ByteSize( \
const MapEntryAccessorType& value) { \
- return static_cast<int>(WireFormatLite::DeclaredType##Size(value)); \
+ return static_cast<int>(WireFormatLite::DeclaredType##Size(value)); \
}
GOOGLE_PROTOBUF_BYTE_SIZE(STRING, String)
@@ -257,7 +257,7 @@ GOOGLE_PROTOBUF_BYTE_SIZE(ENUM, Enum)
#define FIXED_BYTE_SIZE(FieldType, DeclaredType) \
template <typename Type> \
inline int MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::ByteSize( \
- const MapEntryAccessorType& /* value */) { \
+ const MapEntryAccessorType& /* value */) { \
return WireFormatLite::k##DeclaredType##Size; \
}
@@ -283,7 +283,7 @@ inline int MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::GetCachedSize(
inline int \
MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::GetCachedSize( \
const MapEntryAccessorType& value) { \
- return static_cast<int>(WireFormatLite::DeclaredType##Size(value)); \
+ return static_cast<int>(WireFormatLite::DeclaredType##Size(value)); \
}
GET_CACHED_SIZE(STRING, String)
@@ -302,7 +302,7 @@ GET_CACHED_SIZE(ENUM, Enum)
template <typename Type> \
inline int \
MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::GetCachedSize( \
- const MapEntryAccessorType& /* value */) { \
+ const MapEntryAccessorType& /* value */) { \
return WireFormatLite::k##DeclaredType##Size; \
}
@@ -499,19 +499,19 @@ MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::GetExternalReference(
}
template <typename Type>
-inline size_t MapTypeHandler<WireFormatLite::TYPE_MESSAGE,
- Type>::SpaceUsedInMapEntryLong(const Type* value) {
- return value->SpaceUsedLong();
+inline size_t MapTypeHandler<WireFormatLite::TYPE_MESSAGE,
+ Type>::SpaceUsedInMapEntryLong(const Type* value) {
+ return value->SpaceUsedLong();
}
template <typename Type>
inline void MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::Clear(
- Type** value, Arena* /* arena */) {
+ Type** value, Arena* /* arena */) {
if (*value != NULL) (*value)->Clear();
}
template <typename Type>
inline void MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::Merge(
- const Type& from, Type** to, Arena* /* arena */) {
+ const Type& from, Type** to, Arena* /* arena */) {
(*to)->MergeFrom(from);
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/message.cc b/contrib/libs/protobuf/src/google/protobuf/message.cc
index 845eb0362d..c90ff50e72 100644
--- a/contrib/libs/protobuf/src/google/protobuf/message.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/message.cc
@@ -185,7 +185,7 @@ bool Message::ParseFromArcadiaStream(IInputStream* input) {
}
return res && !proxy.HasError();
}
-
+
bool Message::ParsePartialFromArcadiaStream(IInputStream* input) {
bool res = false;
io::TInputStreamProxy proxy(input);
@@ -195,7 +195,7 @@ bool Message::ParsePartialFromArcadiaStream(IInputStream* input) {
}
return res && !proxy.HasError();
}
-
+
bool Message::SerializeToArcadiaStream(IOutputStream* output) const {
bool res = false;
io::TOutputStreamProxy proxy(output);
@@ -205,7 +205,7 @@ bool Message::SerializeToArcadiaStream(IOutputStream* output) const {
}
return res && !proxy.HasError();
}
-
+
bool Message::SerializePartialToArcadiaStream(IOutputStream* output) const {
bool res = false;
io::TOutputStreamProxy proxy(output);
@@ -400,7 +400,7 @@ const internal::RepeatedFieldAccessor* Reflection::RepeatedFieldAccessor(
namespace internal {
template <>
-#if defined(_MSC_VER) && (_MSC_VER >= 1800)
+#if defined(_MSC_VER) && (_MSC_VER >= 1800)
// Note: force noinline to workaround MSVC compiler bug with /Zc:inline, issue
// #240
PROTOBUF_NOINLINE
@@ -411,7 +411,7 @@ PROTOBUF_NOINLINE
return prototype->New(arena);
}
template <>
-#if defined(_MSC_VER) && (_MSC_VER >= 1800)
+#if defined(_MSC_VER) && (_MSC_VER >= 1800)
// Note: force noinline to workaround MSVC compiler bug with /Zc:inline, issue
// #240
PROTOBUF_NOINLINE
diff --git a/contrib/libs/protobuf/src/google/protobuf/message.h b/contrib/libs/protobuf/src/google/protobuf/message.h
index bec937f0e4..37d92ea393 100644
--- a/contrib/libs/protobuf/src/google/protobuf/message.h
+++ b/contrib/libs/protobuf/src/google/protobuf/message.h
@@ -122,7 +122,7 @@
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message_lite.h>
#include <google/protobuf/port.h>
-
+
#include <google/protobuf/json_util.h>
#include <google/protobuf/messagext.h>
@@ -181,14 +181,14 @@ class MessageDifferencer;
}
-namespace internal {
+namespace internal {
class ReflectionAccessor; // message.cc
class ReflectionOps; // reflection_ops.h
class MapKeySorter; // wire_format.cc
class WireFormat; // wire_format.h
-class MapFieldReflectionTest; // map_test.cc
+class MapFieldReflectionTest; // map_test.cc
} // namespace internal
-
+
template <typename T>
class RepeatedField; // repeated_field.h
@@ -302,11 +302,11 @@ class PROTOBUF_EXPORT Message : public MessageLite {
// using reflection (rather than the generated code implementation for
// ByteSize()). Like ByteSize(), its CPU time is linear in the number of
// fields defined for the proto.
- virtual size_t SpaceUsedLong() const;
+ virtual size_t SpaceUsedLong() const;
PROTOBUF_DEPRECATED_MSG("Please use SpaceUsedLong() instead")
- int SpaceUsed() const { return internal::ToIntSize(SpaceUsedLong()); }
-
+ int SpaceUsed() const { return internal::ToIntSize(SpaceUsedLong()); }
+
// Debugging & Testing----------------------------------------------
// Generates a human readable form of this message, useful for debugging
@@ -487,10 +487,10 @@ class PROTOBUF_EXPORT Reflection final {
size_t SpaceUsedLong(const Message& message) const;
PROTOBUF_DEPRECATED_MSG("Please use SpaceUsedLong() instead")
- int SpaceUsed(const Message& message) const {
- return internal::ToIntSize(SpaceUsedLong(message));
- }
-
+ int SpaceUsed(const Message& message) const {
+ return internal::ToIntSize(SpaceUsedLong(message));
+ }
+
// Check if the given non-repeated field is set.
bool HasField(const Message& message, const FieldDescriptor* field) const;
@@ -903,31 +903,31 @@ class PROTOBUF_EXPORT Reflection final {
// downgrade to a compatible value or use the UnknownFieldSet if not. For
// example:
//
- // int new_value = GetValueFromApplicationLogic();
- // if (reflection->SupportsUnknownEnumValues()) {
+ // int new_value = GetValueFromApplicationLogic();
+ // if (reflection->SupportsUnknownEnumValues()) {
// reflection->SetEnumValue(message, field, new_value);
- // } else {
+ // } else {
// if (field_descriptor->enum_type()->
// FindValueByNumber(new_value) != nullptr) {
- // reflection->SetEnumValue(message, field, new_value);
+ // reflection->SetEnumValue(message, field, new_value);
// } else if (emit_unknown_enum_values) {
- // reflection->MutableUnknownFields(message)->AddVarint(
- // field->number(), new_value);
+ // reflection->MutableUnknownFields(message)->AddVarint(
+ // field->number(), new_value);
// } else {
- // // convert value to a compatible/default value.
- // new_value = CompatibleDowngrade(new_value);
- // reflection->SetEnumValue(message, field, new_value);
+ // // convert value to a compatible/default value.
+ // new_value = CompatibleDowngrade(new_value);
+ // reflection->SetEnumValue(message, field, new_value);
// }
- // }
+ // }
bool SupportsUnknownEnumValues() const;
// Returns the MessageFactory associated with this message. This can be
// useful for determining if a message is a generated message or not, for
// example:
- // if (message->GetReflection()->GetMessageFactory() ==
- // google::protobuf::MessageFactory::generated_factory()) {
- // // This is a generated message.
- // }
+ // if (message->GetReflection()->GetMessageFactory() ==
+ // google::protobuf::MessageFactory::generated_factory()) {
+ // // This is a generated message.
+ // }
// It can also be used to create more messages of this type, though
// Message::New() is an easier way to accomplish this.
MessageFactory* GetMessageFactory() const;
@@ -1039,10 +1039,10 @@ class PROTOBUF_EXPORT Reflection final {
friend class util::MessageDifferencer;
#define GOOGLE_PROTOBUF_HAS_CEL_MAP_REFLECTION_FRIEND
friend class expr::CelMapReflectionFriend;
- friend class internal::MapFieldReflectionTest;
- friend class internal::MapKeySorter;
- friend class internal::WireFormat;
- friend class internal::ReflectionOps;
+ friend class internal::MapFieldReflectionTest;
+ friend class internal::MapKeySorter;
+ friend class internal::WireFormat;
+ friend class internal::ReflectionOps;
friend class internal::SwapFieldHelper;
// Needed for implementing text format for map.
friend class internal::MapFieldPrinterHelper;
diff --git a/contrib/libs/protobuf/src/google/protobuf/message_lite.cc b/contrib/libs/protobuf/src/google/protobuf/message_lite.cc
index 19f0af585d..a3f5437556 100644
--- a/contrib/libs/protobuf/src/google/protobuf/message_lite.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/message_lite.cc
@@ -35,10 +35,10 @@
#include <google/protobuf/message_lite.h>
-#include <climits>
+#include <climits>
#include <cstdint>
#include <string>
-
+
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/stringprintf.h>
@@ -77,9 +77,9 @@ namespace {
// protobuf implementation but is more likely caused by concurrent modification
// of the message. This function attempts to distinguish between the two and
// provide a useful error message.
-void ByteSizeConsistencyError(size_t byte_size_before_serialization,
- size_t byte_size_after_serialization,
- size_t bytes_produced_by_serialization,
+void ByteSizeConsistencyError(size_t byte_size_before_serialization,
+ size_t byte_size_after_serialization,
+ size_t bytes_produced_by_serialization,
const MessageLite& message) {
GOOGLE_CHECK_EQ(byte_size_before_serialization, byte_size_after_serialization)
<< message.GetTypeName()
@@ -366,12 +366,12 @@ inline uint8* SerializeToArrayImpl(const MessageLite& msg, uint8* target,
}
}
-uint8* MessageLite::SerializeWithCachedSizesToArray(uint8* target) const {
+uint8* MessageLite::SerializeWithCachedSizesToArray(uint8* target) const {
// We only optimize this when using optimize_for = SPEED. In other cases
// we just use the CodedOutputStream path.
return SerializeToArrayImpl(*this, target, GetCachedSize());
-}
-
+}
+
bool MessageLite::SerializeToCodedStream(io::CodedOutputStream* output) const {
GOOGLE_DCHECK(IsInitialized()) << InitializationErrorMessage("serialize", *this);
return SerializePartialToCodedStream(output);
@@ -379,8 +379,8 @@ bool MessageLite::SerializeToCodedStream(io::CodedOutputStream* output) const {
bool MessageLite::SerializePartialToCodedStream(
io::CodedOutputStream* output) const {
- const size_t size = ByteSizeLong(); // Force size to be cached.
- if (size > INT_MAX) {
+ const size_t size = ByteSizeLong(); // Force size to be cached.
+ if (size > INT_MAX) {
GOOGLE_LOG(ERROR) << GetTypeName()
<< " exceeded maximum protobuf size of 2GB: " << size;
return false;
@@ -455,9 +455,9 @@ bool MessageLite::AppendToString(TProtoStringType* output) const {
}
bool MessageLite::AppendPartialToString(TProtoStringType* output) const {
- size_t old_size = output->size();
- size_t byte_size = ByteSizeLong();
- if (byte_size > INT_MAX) {
+ size_t old_size = output->size();
+ size_t byte_size = ByteSizeLong();
+ if (byte_size > INT_MAX) {
GOOGLE_LOG(ERROR) << GetTypeName()
<< " exceeded maximum protobuf size of 2GB: " << byte_size;
return false;
@@ -522,7 +522,7 @@ void MessageLite::ParseFromStringOrThrow(std::string_view s) {
}
}
#endif
-
+
#if PROTOBUF_USE_EXCEPTIONS
TProtoStringType NProtoBuf::MessageLite::SerializeAsStringOrThrow() const {
TProtoStringType s;
@@ -543,7 +543,7 @@ TProtoStringType NProtoBuf::MessageLite::SerializeAsStringOrThrow() const {
namespace internal {
-
+
template <>
MessageLite* GenericTypeHandler<MessageLite>::NewFromPrototype(
const MessageLite* prototype, Arena* arena) {
@@ -559,19 +559,19 @@ void GenericTypeHandler<TProtoStringType>::Merge(const TProtoStringType& from,
TProtoStringType* to) {
*to = from;
}
-
+
// Non-inline variants of TProtoStringType specializations for
// various InternalMetadata routines.
template <>
void InternalMetadata::DoClear<TProtoStringType>() {
mutable_unknown_fields<TProtoStringType>()->clear();
-}
-
+}
+
template <>
void InternalMetadata::DoMergeFrom<TProtoStringType>(const TProtoStringType& other) {
mutable_unknown_fields<TProtoStringType>()->append(other);
}
-
+
template <>
void InternalMetadata::DoSwap<TProtoStringType>(TProtoStringType* other) {
mutable_unknown_fields<TProtoStringType>()->swap(*other);
diff --git a/contrib/libs/protobuf/src/google/protobuf/message_lite.h b/contrib/libs/protobuf/src/google/protobuf/message_lite.h
index 925ebdad09..0bbf1eb6ed 100644
--- a/contrib/libs/protobuf/src/google/protobuf/message_lite.h
+++ b/contrib/libs/protobuf/src/google/protobuf/message_lite.h
@@ -39,7 +39,7 @@
#ifndef GOOGLE_PROTOBUF_MESSAGE_LITE_H__
#define GOOGLE_PROTOBUF_MESSAGE_LITE_H__
-#include <climits>
+#include <climits>
#include <string>
#include <google/protobuf/stubs/common.h>
@@ -53,31 +53,31 @@
#include <google/protobuf/port_def.inc>
-
+
#ifdef SWIG
#error "You cannot SWIG proto headers"
-#endif
-
+#endif
+
namespace google {
namespace protobuf {
-
+
template <typename T>
class RepeatedPtrField;
-
+
class FastReflectionMessageMutator;
class FastReflectionStringSetter;
class Reflection;
namespace io {
-class CodedInputStream;
-class CodedOutputStream;
-class ZeroCopyInputStream;
-class ZeroCopyOutputStream;
+class CodedInputStream;
+class CodedOutputStream;
+class ZeroCopyInputStream;
+class ZeroCopyOutputStream;
} // namespace io
namespace internal {
-
+
class SwapFieldHelper;
// Tag type used to invoke the constinit constructor overload of some classes.
@@ -93,90 +93,90 @@ class ExtensionSet;
class LazyField;
class RepeatedPtrFieldBase;
class TcParserBase;
-class WireFormatLite;
+class WireFormatLite;
class WeakFieldMap;
-
+
template <typename Type>
class GenericTypeHandler; // defined in repeated_field.h
-// We compute sizes as size_t but cache them as int. This function converts a
-// computed size to a cached size. Since we don't proceed with serialization
-// if the total size was > INT_MAX, it is not important what this function
-// returns for inputs > INT_MAX. However this case should not error or
-// GOOGLE_CHECK-fail, because the full size_t resolution is still returned from
-// ByteSizeLong() and checked against INT_MAX; we can catch the overflow
-// there.
-inline int ToCachedSize(size_t size) { return static_cast<int>(size); }
-
-// We mainly calculate sizes in terms of size_t, but some functions that
-// compute sizes return "int". These int sizes are expected to always be
-// positive. This function is more efficient than casting an int to size_t
-// directly on 64-bit platforms because it avoids making the compiler emit a
-// sign extending instruction, which we don't want and don't want to pay for.
-inline size_t FromIntSize(int size) {
- // Convert to unsigned before widening so sign extension is not necessary.
- return static_cast<unsigned int>(size);
+// We compute sizes as size_t but cache them as int. This function converts a
+// computed size to a cached size. Since we don't proceed with serialization
+// if the total size was > INT_MAX, it is not important what this function
+// returns for inputs > INT_MAX. However this case should not error or
+// GOOGLE_CHECK-fail, because the full size_t resolution is still returned from
+// ByteSizeLong() and checked against INT_MAX; we can catch the overflow
+// there.
+inline int ToCachedSize(size_t size) { return static_cast<int>(size); }
+
+// We mainly calculate sizes in terms of size_t, but some functions that
+// compute sizes return "int". These int sizes are expected to always be
+// positive. This function is more efficient than casting an int to size_t
+// directly on 64-bit platforms because it avoids making the compiler emit a
+// sign extending instruction, which we don't want and don't want to pay for.
+inline size_t FromIntSize(int size) {
+ // Convert to unsigned before widening so sign extension is not necessary.
+ return static_cast<unsigned int>(size);
+}
+
+// For cases where a legacy function returns an integer size. We GOOGLE_DCHECK()
+// that the conversion will fit within an integer; if this is false then we
+// are losing information.
+inline int ToIntSize(size_t size) {
+ GOOGLE_DCHECK_LE(size, static_cast<size_t>(INT_MAX));
+ return static_cast<int>(size);
}
-// For cases where a legacy function returns an integer size. We GOOGLE_DCHECK()
-// that the conversion will fit within an integer; if this is false then we
-// are losing information.
-inline int ToIntSize(size_t size) {
- GOOGLE_DCHECK_LE(size, static_cast<size_t>(INT_MAX));
- return static_cast<int>(size);
-}
-
-// This type wraps a variable whose constructor and destructor are explicitly
-// called. It is particularly useful for a global variable, without its
-// constructor and destructor run on start and end of the program lifetime.
-// This circumvents the initial construction order fiasco, while keeping
-// the address of the empty string a compile time constant.
-//
-// Pay special attention to the initialization state of the object.
-// 1. The object is "uninitialized" to begin with.
+// This type wraps a variable whose constructor and destructor are explicitly
+// called. It is particularly useful for a global variable, without its
+// constructor and destructor run on start and end of the program lifetime.
+// This circumvents the initial construction order fiasco, while keeping
+// the address of the empty string a compile time constant.
+//
+// Pay special attention to the initialization state of the object.
+// 1. The object is "uninitialized" to begin with.
// 2. Call Construct() or DefaultConstruct() only if the object is
// uninitialized. After the call, the object becomes "initialized".
-// 3. Call get() and get_mutable() only if the object is initialized.
-// 4. Call Destruct() only if the object is initialized.
-// After the call, the object becomes uninitialized.
-template <typename T>
-class ExplicitlyConstructed {
- public:
+// 3. Call get() and get_mutable() only if the object is initialized.
+// 4. Call Destruct() only if the object is initialized.
+// After the call, the object becomes uninitialized.
+template <typename T>
+class ExplicitlyConstructed {
+ public:
void DefaultConstruct() { new (&union_) T(); }
-
+
template <typename... Args>
void Construct(Args&&... args) {
new (&union_) T(std::forward<Args>(args)...);
- }
-
+ }
+
void Destruct() { get_mutable()->~T(); }
constexpr const T& get() const { return reinterpret_cast<const T&>(union_); }
- T* get_mutable() { return reinterpret_cast<T*>(&union_); }
-
- private:
- // Prefer c++14 aligned_storage, but for compatibility this will do.
- union AlignedUnion {
+ T* get_mutable() { return reinterpret_cast<T*>(&union_); }
+
+ private:
+ // Prefer c++14 aligned_storage, but for compatibility this will do.
+ union AlignedUnion {
alignas(T) char space[sizeof(T)];
- int64 align_to_int64;
- void* align_to_ptr;
- } union_;
-};
-
-// Default empty string object. Don't use this directly. Instead, call
-// GetEmptyString() to get the reference.
+ int64 align_to_int64;
+ void* align_to_ptr;
+ } union_;
+};
+
+// Default empty string object. Don't use this directly. Instead, call
+// GetEmptyString() to get the reference.
PROTOBUF_EXPORT extern ExplicitlyConstructed<TProtoStringType>
fixed_address_empty_string;
-
-
+
+
PROTOBUF_EXPORT constexpr const TProtoStringType& GetEmptyStringAlreadyInited() {
- return fixed_address_empty_string.get();
-}
-
+ return fixed_address_empty_string.get();
+}
+
PROTOBUF_EXPORT size_t StringSpaceUsedExcludingSelfLong(const TProtoStringType& str);
-
-} // namespace internal
-
+
+} // namespace internal
+
// Interface to light weight protocol messages.
//
// This interface is implemented by all protocol message objects. Non-lite
@@ -224,15 +224,15 @@ class PROTOBUF_EXPORT MessageLite {
// Same as GetOwningArena.
Arena* GetArena() const { return GetOwningArena(); }
- // Get a pointer that may be equal to this message's arena, or may not be.
- // If the value returned by this method is equal to some arena pointer, then
- // this message is on that arena; however, if this message is on some arena,
- // this method may or may not return that arena's pointer. As a tradeoff,
- // this method may be more efficient than GetArena(). The intent is to allow
- // underlying representations that use e.g. tagged pointers to sometimes
- // store the arena pointer directly, and sometimes in a more indirect way,
- // and allow a fastpath comparison against the arena pointer when it's easy
- // to obtain.
+ // Get a pointer that may be equal to this message's arena, or may not be.
+ // If the value returned by this method is equal to some arena pointer, then
+ // this message is on that arena; however, if this message is on some arena,
+ // this method may or may not return that arena's pointer. As a tradeoff,
+ // this method may be more efficient than GetArena(). The intent is to allow
+ // underlying representations that use e.g. tagged pointers to sometimes
+ // store the arena pointer directly, and sometimes in a more indirect way,
+ // and allow a fastpath comparison against the arena pointer when it's easy
+ // to obtain.
void* GetMaybeArenaPointer() const {
return _internal_metadata_.raw_arena_ptr();
}
@@ -252,7 +252,7 @@ class PROTOBUF_EXPORT MessageLite {
// for full messages. See message.h.
virtual TProtoStringType InitializationErrorString() const;
- // If |other| is the exact same class as this, calls MergeFrom(). Otherwise,
+ // If |other| is the exact same class as this, calls MergeFrom(). Otherwise,
// results are undefined (probably crash).
virtual void CheckTypeAndMergeFrom(const MessageLite& other) = 0;
@@ -273,14 +273,14 @@ class PROTOBUF_EXPORT MessageLite {
// Parsing ---------------------------------------------------------
// Methods for parsing in protocol buffer format. Most of these are
- // just simple wrappers around MergeFromCodedStream(). Clear() will be
- // called before merging the input.
-
- // Fill the message with a protocol buffer parsed from the given input
- // stream. Returns false on a read error or if the input is in the wrong
- // format. A successful return does not indicate the entire input is
- // consumed, ensure you call ConsumedEntireMessage() to check that if
- // applicable.
+ // just simple wrappers around MergeFromCodedStream(). Clear() will be
+ // called before merging the input.
+
+ // Fill the message with a protocol buffer parsed from the given input
+ // stream. Returns false on a read error or if the input is in the wrong
+ // format. A successful return does not indicate the entire input is
+ // consumed, ensure you call ConsumedEntireMessage() to check that if
+ // applicable.
PROTOBUF_ATTRIBUTE_REINITIALIZES PROTOBUF_MUST_USE_RESULT bool ParseFromCodedStream(
io::CodedInputStream* input);
// Like ParseFromCodedStream(), but accepts messages that are missing
@@ -422,35 +422,35 @@ class PROTOBUF_EXPORT MessageLite {
// Computes the serialized size of the message. This recursively calls
- // ByteSizeLong() on all embedded messages.
+ // ByteSizeLong() on all embedded messages.
//
- // ByteSizeLong() is generally linear in the number of fields defined for the
+ // ByteSizeLong() is generally linear in the number of fields defined for the
// proto.
- virtual size_t ByteSizeLong() const = 0;
+ virtual size_t ByteSizeLong() const = 0;
- // Legacy ByteSize() API.
+ // Legacy ByteSize() API.
PROTOBUF_DEPRECATED_MSG("Please use ByteSizeLong() instead")
int ByteSize() const { return internal::ToIntSize(ByteSizeLong()); }
-
- // Serializes the message without recomputing the size. The message must not
- // have changed since the last call to ByteSize(), and the value returned by
- // ByteSize must be non-negative. Otherwise the results are undefined.
+
+ // Serializes the message without recomputing the size. The message must not
+ // have changed since the last call to ByteSize(), and the value returned by
+ // ByteSize must be non-negative. Otherwise the results are undefined.
void SerializeWithCachedSizes(io::CodedOutputStream* output) const {
output->SetCur(_InternalSerialize(output->Cur(), output->EpsCopy()));
}
- // Functions below here are not part of the public interface. It isn't
- // enforced, but they should be treated as private, and will be private
- // at some future time. Unfortunately the implementation of the "friend"
- // keyword in GCC is broken at the moment, but we expect it will be fixed.
+ // Functions below here are not part of the public interface. It isn't
+ // enforced, but they should be treated as private, and will be private
+ // at some future time. Unfortunately the implementation of the "friend"
+ // keyword in GCC is broken at the moment, but we expect it will be fixed.
- // Like SerializeWithCachedSizes, but writes directly to *target, returning
- // a pointer to the byte immediately after the last byte written. "target"
- // must point at a byte array of at least ByteSize() bytes. Whether to use
- // deterministic serialization, e.g., maps in sorted order, is determined by
- // CodedOutputStream::IsDefaultSerializationDeterministic().
+ // Like SerializeWithCachedSizes, but writes directly to *target, returning
+ // a pointer to the byte immediately after the last byte written. "target"
+ // must point at a byte array of at least ByteSize() bytes. Whether to use
+ // deterministic serialization, e.g., maps in sorted order, is determined by
+ // CodedOutputStream::IsDefaultSerializationDeterministic().
uint8* SerializeWithCachedSizesToArray(uint8* target) const;
-
+
// Returns the result of the last call to ByteSize(). An embedded message's
// size is needed both to serialize it (because embedded messages are
// length-delimited) and to compute the outer message's size. Caching
@@ -527,12 +527,12 @@ class PROTOBUF_EXPORT MessageLite {
#endif
private:
- // TODO(gerbens) make this a pure abstract function
- virtual const void* InternalGetTable() const { return NULL; }
-
+ // TODO(gerbens) make this a pure abstract function
+ virtual const void* InternalGetTable() const { return NULL; }
+
friend class FastReflectionMessageMutator;
friend class FastReflectionStringSetter;
- friend class Message;
+ friend class Message;
friend class Reflection;
friend class internal::ExtensionSet;
friend class internal::LazyField;
@@ -553,8 +553,8 @@ class PROTOBUF_EXPORT MessageLite {
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageLite);
};
-namespace internal {
-
+namespace internal {
+
template <bool alias>
bool MergeFromImpl(StringPiece input, MessageLite* msg,
MessageLite::ParseFlags parse_flags);
@@ -564,7 +564,7 @@ extern template bool MergeFromImpl<false>(StringPiece input,
extern template bool MergeFromImpl<true>(StringPiece input,
MessageLite* msg,
MessageLite::ParseFlags parse_flags);
-
+
template <bool alias>
bool MergeFromImpl(io::ZeroCopyInputStream* input, MessageLite* msg,
MessageLite::ParseFlags parse_flags);
@@ -595,17 +595,17 @@ template <bool alias, typename T>
bool MergeFromImpl(const SourceWrapper<T>& input, MessageLite* msg,
MessageLite::ParseFlags parse_flags) {
return input.template MergeInto<alias>(msg, parse_flags);
-}
-
-} // namespace internal
-
+}
+
+} // namespace internal
+
template <MessageLite::ParseFlags flags, typename T>
PROTOBUF_MUST_USE_RESULT bool MessageLite::ParseFrom(const T& input) {
if (flags & kParse) Clear();
constexpr bool alias = (flags & kMergeWithAliasing) != 0;
return internal::MergeFromImpl<alias>(input, this, flags);
}
-
+
// ===================================================================
// Shutdown support.
diff --git a/contrib/libs/protobuf/src/google/protobuf/metadata_lite.h b/contrib/libs/protobuf/src/google/protobuf/metadata_lite.h
index 772fc8531b..a08adaeb0e 100644
--- a/contrib/libs/protobuf/src/google/protobuf/metadata_lite.h
+++ b/contrib/libs/protobuf/src/google/protobuf/metadata_lite.h
@@ -1,52 +1,52 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef GOOGLE_PROTOBUF_METADATA_LITE_H__
-#define GOOGLE_PROTOBUF_METADATA_LITE_H__
-
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_METADATA_LITE_H__
+#define GOOGLE_PROTOBUF_METADATA_LITE_H__
+
#include <string>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/port.h>
-
+
#include <google/protobuf/port_def.inc>
#ifdef SWIG
#error "You cannot SWIG proto headers"
#endif
-namespace google {
-namespace protobuf {
-namespace internal {
-
-// This is the representation for messages that support arena allocation. It
+namespace google {
+namespace protobuf {
+namespace internal {
+
+// This is the representation for messages that support arena allocation. It
// uses a tagged pointer to either store the owning Arena pointer, if there are
// no unknown fields, or a pointer to a block of memory with both the owning
// Arena pointer and the UnknownFieldSet, if there are unknown fields. Besides,
@@ -54,13 +54,13 @@ namespace internal {
// used by sub-structure allocation. This optimization allows for
// "zero-overhead" storage of the Arena pointer, relative to the above baseline
// implementation.
-//
+//
// The tagged pointer uses the least two significant bits to disambiguate cases.
// It uses bit 0 == 0 to indicate an arena pointer and bit 0 == 1 to indicate a
// UFS+Arena-container pointer. Besides it uses bit 1 == 0 to indicate arena
// allocation and bit 1 == 1 to indicate heap allocation.
class InternalMetadata {
- public:
+ public:
constexpr InternalMetadata() : ptr_(0) {}
explicit InternalMetadata(Arena* arena, bool is_message_owned = false)
: ptr_(is_message_owned
@@ -68,7 +68,7 @@ class InternalMetadata {
: reinterpret_cast<intptr_t>(arena)) {
GOOGLE_DCHECK(!is_message_owned || arena != nullptr);
}
-
+
~InternalMetadata() {
if (HasMessageOwnedArenaTag()) {
delete arena();
@@ -80,9 +80,9 @@ class InternalMetadata {
// Note that Delete<> should be called not more than once.
if (have_unknown_fields()) {
DeleteOutOfLineHelper<T>();
- }
- }
-
+ }
+ }
+
PROTOBUF_NDEBUG_INLINE Arena* owning_arena() const {
return HasMessageOwnedArenaTag() ? nullptr : arena();
}
@@ -92,9 +92,9 @@ class InternalMetadata {
return PtrValue<ContainerBase>()->arena;
} else {
return PtrValue<Arena>();
- }
- }
-
+ }
+ }
+
PROTOBUF_NDEBUG_INLINE bool have_unknown_fields() const {
return HasUnknownFieldsTag();
}
@@ -108,79 +108,79 @@ class InternalMetadata {
const T& (*default_instance)()) const {
if (PROTOBUF_PREDICT_FALSE(have_unknown_fields())) {
return PtrValue<Container<T>>()->unknown_fields;
- } else {
+ } else {
return default_instance();
- }
- }
-
+ }
+ }
+
template <typename T>
PROTOBUF_NDEBUG_INLINE T* mutable_unknown_fields() {
if (PROTOBUF_PREDICT_TRUE(have_unknown_fields())) {
return &PtrValue<Container<T>>()->unknown_fields;
- } else {
+ } else {
return mutable_unknown_fields_slow<T>();
- }
- }
-
+ }
+ }
+
template <typename T>
PROTOBUF_NDEBUG_INLINE void Swap(InternalMetadata* other) {
- // Semantics here are that we swap only the unknown fields, not the arena
- // pointer. We cannot simply swap ptr_ with other->ptr_ because we need to
- // maintain our own arena ptr. Also, our ptr_ and other's ptr_ may be in
- // different states (direct arena pointer vs. container with UFS) so we
- // cannot simply swap ptr_ and then restore the arena pointers. We reuse
- // UFS's swap implementation instead.
- if (have_unknown_fields() || other->have_unknown_fields()) {
+ // Semantics here are that we swap only the unknown fields, not the arena
+ // pointer. We cannot simply swap ptr_ with other->ptr_ because we need to
+ // maintain our own arena ptr. Also, our ptr_ and other's ptr_ may be in
+ // different states (direct arena pointer vs. container with UFS) so we
+ // cannot simply swap ptr_ and then restore the arena pointers. We reuse
+ // UFS's swap implementation instead.
+ if (have_unknown_fields() || other->have_unknown_fields()) {
DoSwap<T>(other->mutable_unknown_fields<T>());
- }
- }
-
+ }
+ }
+
PROTOBUF_NDEBUG_INLINE void InternalSwap(InternalMetadata* other) {
std::swap(ptr_, other->ptr_);
}
template <typename T>
PROTOBUF_NDEBUG_INLINE void MergeFrom(const InternalMetadata& other) {
- if (other.have_unknown_fields()) {
+ if (other.have_unknown_fields()) {
DoMergeFrom<T>(other.unknown_fields<T>(nullptr));
- }
- }
-
+ }
+ }
+
template <typename T>
PROTOBUF_NDEBUG_INLINE void Clear() {
- if (have_unknown_fields()) {
+ if (have_unknown_fields()) {
DoClear<T>();
- }
- }
-
- private:
+ }
+ }
+
+ private:
intptr_t ptr_;
-
- // Tagged pointer implementation.
+
+ // Tagged pointer implementation.
static constexpr intptr_t kUnknownFieldsTagMask = 1;
static constexpr intptr_t kMessageOwnedArenaTagMask = 2;
static constexpr intptr_t kPtrTagMask =
kUnknownFieldsTagMask | kMessageOwnedArenaTagMask;
static constexpr intptr_t kPtrValueMask = ~kPtrTagMask;
-
- // Accessors for pointer tag and pointer value.
+
+ // Accessors for pointer tag and pointer value.
PROTOBUF_ALWAYS_INLINE bool HasUnknownFieldsTag() const {
return ptr_ & kUnknownFieldsTagMask;
- }
+ }
PROTOBUF_ALWAYS_INLINE bool HasMessageOwnedArenaTag() const {
return ptr_ & kMessageOwnedArenaTagMask;
}
-
+
template <typename U>
U* PtrValue() const {
return reinterpret_cast<U*>(ptr_ & kPtrValueMask);
- }
-
+ }
+
// If ptr_'s tag is kTagContainer, it points to an instance of this struct.
struct ContainerBase {
- Arena* arena;
- };
-
+ Arena* arena;
+ };
+
template <typename T>
struct Container : public ContainerBase {
T unknown_fields;
@@ -195,7 +195,7 @@ class InternalMetadata {
template <typename T>
PROTOBUF_NOINLINE T* mutable_unknown_fields_slow() {
- Arena* my_arena = arena();
+ Arena* my_arena = arena();
Container<T>* container = Arena::Create<Container<T>>(my_arena);
intptr_t message_owned_arena_tag = ptr_ & kMessageOwnedArenaTagMask;
// Two-step assignment works around a bug in clang's static analyzer:
@@ -203,27 +203,27 @@ class InternalMetadata {
ptr_ = reinterpret_cast<intptr_t>(container);
ptr_ |= kUnknownFieldsTagMask | message_owned_arena_tag;
container->arena = my_arena;
- return &(container->unknown_fields);
- }
-
+ return &(container->unknown_fields);
+ }
+
// Templated functions.
-
+
template <typename T>
PROTOBUF_NOINLINE void DoClear() {
mutable_unknown_fields<T>()->Clear();
}
-
+
template <typename T>
PROTOBUF_NOINLINE void DoMergeFrom(const T& other) {
mutable_unknown_fields<T>()->MergeFrom(other);
- }
-
+ }
+
template <typename T>
PROTOBUF_NOINLINE void DoSwap(T* other) {
mutable_unknown_fields<T>()->Swap(other);
- }
+ }
};
-
+
// String Template specializations.
template <>
@@ -249,22 +249,22 @@ class PROTOBUF_EXPORT LiteUnknownFieldSetter {
if (metadata->have_unknown_fields()) {
buffer_.swap(*metadata->mutable_unknown_fields<TProtoStringType>());
}
- }
+ }
~LiteUnknownFieldSetter() {
if (!buffer_.empty())
metadata_->mutable_unknown_fields<TProtoStringType>()->swap(buffer_);
}
TProtoStringType* buffer() { return &buffer_; }
-
+
private:
InternalMetadata* metadata_;
TProtoStringType buffer_;
-};
-
-} // namespace internal
-} // namespace protobuf
+};
+
+} // namespace internal
+} // namespace protobuf
} // namespace google
-
+
#include <google/protobuf/port_undef.inc>
-#endif // GOOGLE_PROTOBUF_METADATA_LITE_H__
+#endif // GOOGLE_PROTOBUF_METADATA_LITE_H__
diff --git a/contrib/libs/protobuf/src/google/protobuf/reflection.h b/contrib/libs/protobuf/src/google/protobuf/reflection.h
index cc814a4a58..d55a0e0f56 100644
--- a/contrib/libs/protobuf/src/google/protobuf/reflection.h
+++ b/contrib/libs/protobuf/src/google/protobuf/reflection.h
@@ -77,12 +77,12 @@ class RepeatedFieldRef<
typedef IteratorType iterator;
typedef IteratorType const_iterator;
- typedef T value_type;
- typedef T& reference;
- typedef const T& const_reference;
- typedef int size_type;
- typedef ptrdiff_t difference_type;
-
+ typedef T value_type;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef int size_type;
+ typedef ptrdiff_t difference_type;
+
iterator begin() const { return iterator(data_, accessor_, true); }
iterator end() const { return iterator(data_, accessor_, false); }
@@ -179,17 +179,17 @@ class RepeatedFieldRef<
typedef IteratorType iterator;
typedef IteratorType const_iterator;
- typedef T value_type;
- typedef T& reference;
- typedef const T& const_reference;
- typedef int size_type;
- typedef ptrdiff_t difference_type;
-
+ typedef T value_type;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef int size_type;
+ typedef ptrdiff_t difference_type;
+
iterator begin() const {
return iterator(data_, accessor_, true, NewMessage());
}
iterator end() const {
- // The end iterator must not be dereferenced, no need for scratch space.
+ // The end iterator must not be dereferenced, no need for scratch space.
return iterator(data_, accessor_, false, nullptr);
}
@@ -401,12 +401,12 @@ class RepeatedFieldRefIterator
public:
// Constructor for non-message fields.
RepeatedFieldRefIterator(const void* data,
- const RepeatedFieldAccessor* accessor, bool begin)
- : data_(data),
- accessor_(accessor),
- iterator_(begin ? accessor->BeginIterator(data)
- : accessor->EndIterator(data)),
- // The end iterator must not be dereferenced, no need for scratch space.
+ const RepeatedFieldAccessor* accessor, bool begin)
+ : data_(data),
+ accessor_(accessor),
+ iterator_(begin ? accessor->BeginIterator(data)
+ : accessor->EndIterator(data)),
+ // The end iterator must not be dereferenced, no need for scratch space.
scratch_space_(begin ? new AccessorValueType : nullptr) {}
// Constructor for message fields.
RepeatedFieldRefIterator(const void* data,
diff --git a/contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc b/contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc
index 878a454107..3c30edaa6a 100644
--- a/contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc
@@ -271,27 +271,27 @@ bool ReflectionOps::IsInitialized(const Message& message) {
for (const FieldDescriptor* field : fields) {
if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
- if (field->is_map()) {
- const FieldDescriptor* value_field = field->message_type()->field(1);
- if (value_field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
+ if (field->is_map()) {
+ const FieldDescriptor* value_field = field->message_type()->field(1);
+ if (value_field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
const MapFieldBase* map_field =
reflection->GetMapData(message, field);
- if (map_field->IsMapValid()) {
- MapIterator iter(const_cast<Message*>(&message), field);
- MapIterator end(const_cast<Message*>(&message), field);
- for (map_field->MapBegin(&iter), map_field->MapEnd(&end);
- iter != end; ++iter) {
- if (!iter.GetValueRef().GetMessageValue().IsInitialized()) {
- return false;
- }
- }
- continue;
- }
- } else {
- continue;
- }
- }
-
+ if (map_field->IsMapValid()) {
+ MapIterator iter(const_cast<Message*>(&message), field);
+ MapIterator end(const_cast<Message*>(&message), field);
+ for (map_field->MapBegin(&iter), map_field->MapEnd(&end);
+ iter != end; ++iter) {
+ if (!iter.GetValueRef().GetMessageValue().IsInitialized()) {
+ return false;
+ }
+ }
+ continue;
+ }
+ } else {
+ continue;
+ }
+ }
+
if (field->is_repeated()) {
int size = reflection->FieldSize(message, field);
diff --git a/contrib/libs/protobuf/src/google/protobuf/repeated_field.cc b/contrib/libs/protobuf/src/google/protobuf/repeated_field.cc
index 63bc033a7c..737c4b7bbd 100644
--- a/contrib/libs/protobuf/src/google/protobuf/repeated_field.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/repeated_field.cc
@@ -63,15 +63,15 @@ void** RepeatedPtrFieldBase::InternalExtend(int extend_amount) {
static_cast<int64>((std::numeric_limits<size_t>::max() - kRepHeaderSize) /
sizeof(old_rep->elements[0])))
<< "Requested size is too large to fit into size_t.";
- size_t bytes = kRepHeaderSize + sizeof(old_rep->elements[0]) * new_size;
+ size_t bytes = kRepHeaderSize + sizeof(old_rep->elements[0]) * new_size;
if (arena == NULL) {
- rep_ = reinterpret_cast<Rep*>(::operator new(bytes));
+ rep_ = reinterpret_cast<Rep*>(::operator new(bytes));
} else {
rep_ = reinterpret_cast<Rep*>(Arena::CreateArray<char>(arena, bytes));
}
-#if defined(__GXX_DELETE_WITH_SIZE__) || defined(__cpp_sized_deallocation)
- const int old_total_size = total_size_;
-#endif
+#if defined(__GXX_DELETE_WITH_SIZE__) || defined(__cpp_sized_deallocation)
+ const int old_total_size = total_size_;
+#endif
total_size_ = new_size;
if (old_rep && old_rep->allocated_size > 0) {
memcpy(rep_->elements, old_rep->elements,
@@ -81,13 +81,13 @@ void** RepeatedPtrFieldBase::InternalExtend(int extend_amount) {
rep_->allocated_size = 0;
}
if (arena == NULL) {
-#if defined(__GXX_DELETE_WITH_SIZE__) || defined(__cpp_sized_deallocation)
- const size_t old_size =
- old_total_size * sizeof(rep_->elements[0]) + kRepHeaderSize;
- ::operator delete(static_cast<void*>(old_rep), old_size);
-#else
- ::operator delete(static_cast<void*>(old_rep));
-#endif
+#if defined(__GXX_DELETE_WITH_SIZE__) || defined(__cpp_sized_deallocation)
+ const size_t old_size =
+ old_total_size * sizeof(rep_->elements[0]) + kRepHeaderSize;
+ ::operator delete(static_cast<void*>(old_rep), old_size);
+#else
+ ::operator delete(static_cast<void*>(old_rep));
+#endif
}
return &rep_->elements[current_size_];
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/repeated_field.h b/contrib/libs/protobuf/src/google/protobuf/repeated_field.h
index 1462cf620d..cb9205a63a 100644
--- a/contrib/libs/protobuf/src/google/protobuf/repeated_field.h
+++ b/contrib/libs/protobuf/src/google/protobuf/repeated_field.h
@@ -53,7 +53,7 @@
#endif
#include <iterator>
-#include <limits>
+#include <limits>
#include <string>
#include <type_traits>
@@ -65,7 +65,7 @@
#include <google/protobuf/stubs/casts.h>
#include <type_traits>
-
+
// Must be included last.
#include <google/protobuf/port_def.inc>
@@ -84,9 +84,9 @@ struct WeakRepeatedPtrField;
namespace internal {
-class MergePartialFromCodedStreamHelper;
+class MergePartialFromCodedStreamHelper;
class SwapFieldHelper;
-
+
// kRepeatedFieldLowerClampLimit is the smallest size that will be allocated
// when growing a repeated field.
constexpr int kRepeatedFieldLowerClampLimit = 4;
@@ -192,17 +192,17 @@ class RepeatedField {
const Element& Get(int index) const;
Element* Mutable(int index);
-
- const Element& operator[](int index) const { return Get(index); }
- Element& operator[](int index) { return *Mutable(index); }
-
+
+ const Element& operator[](int index) const { return Get(index); }
+ Element& operator[](int index) { return *Mutable(index); }
+
const Element& at(int index) const;
Element& at(int index);
void Set(int index, const Element& value);
void Add(const Element& value);
- // Appends a new element and return a pointer to it.
- // The new element is uninitialized if |Element| is a POD type.
+ // Appends a new element and return a pointer to it.
+ // The new element is uninitialized if |Element| is a POD type.
Element* Add();
// Append elements in the range [begin, end) after reserving
// the appropriate number of elements.
@@ -234,11 +234,11 @@ class RepeatedField {
void Truncate(int new_size);
void AddAlreadyReserved(const Element& value);
- // Appends a new element and return a pointer to it.
- // The new element is uninitialized if |Element| is a POD type.
- // Should be called only if Capacity() > Size().
+ // Appends a new element and return a pointer to it.
+ // The new element is uninitialized if |Element| is a POD type.
+ // Should be called only if Capacity() > Size().
Element* AddAlreadyReserved();
- Element* AddNAlreadyReserved(int elements);
+ Element* AddNAlreadyReserved(int elements);
int Capacity() const;
// Like STL resize. Uses value to fill appended elements.
@@ -296,12 +296,12 @@ class RepeatedField {
// Returns the number of bytes used by the repeated field, excluding
// sizeof(*this)
- size_t SpaceUsedExcludingSelfLong() const;
+ size_t SpaceUsedExcludingSelfLong() const;
+
+ int SpaceUsedExcludingSelf() const {
+ return internal::ToIntSize(SpaceUsedExcludingSelfLong());
+ }
- int SpaceUsedExcludingSelf() const {
- return internal::ToIntSize(SpaceUsedExcludingSelfLong());
- }
-
// Removes the element referenced by position.
//
// Returns an iterator to the element immediately following the removed
@@ -323,11 +323,11 @@ class RepeatedField {
: rep()->arena;
}
- // For internal use only.
- //
- // This is public due to it being called by generated code.
- inline void InternalSwap(RepeatedField* other);
-
+ // For internal use only.
+ //
+ // This is public due to it being called by generated code.
+ inline void InternalSwap(RepeatedField* other);
+
private:
static constexpr int kInitialSize = 0;
// A note on the representation here (see also comment below for
@@ -400,16 +400,16 @@ class RepeatedField {
}
}
if (rep->arena == NULL) {
-#if defined(__GXX_DELETE_WITH_SIZE__) || defined(__cpp_sized_deallocation)
- const size_t bytes = size * sizeof(*e) + kRepHeaderSize;
- ::operator delete(static_cast<void*>(rep), bytes);
-#else
- ::operator delete(static_cast<void*>(rep));
-#endif
+#if defined(__GXX_DELETE_WITH_SIZE__) || defined(__cpp_sized_deallocation)
+ const size_t bytes = size * sizeof(*e) + kRepHeaderSize;
+ ::operator delete(static_cast<void*>(rep), bytes);
+#else
+ ::operator delete(static_cast<void*>(rep));
+#endif
}
}
}
-
+
// This class is a performance wrapper around RepeatedField::Add(const T&)
// function. In general unless a RepeatedField is a local stack variable LLVM
// has a hard time optimizing Add. The machine code tends to be
@@ -505,7 +505,7 @@ class RepeatedPtrOverPtrsIterator;
namespace internal {
-// This is a helper template to copy an array of elements efficiently when they
+// This is a helper template to copy an array of elements efficiently when they
// have a trivial copy constructor, and correctly otherwise. This really
// shouldn't be necessary, but our compiler doesn't optimize std::copy very
// effectively.
@@ -524,8 +524,8 @@ namespace internal {
// exist on the contained type. In particular, we rely on MergeFrom() existing
// as a general proxy for the fact that a copy will work, and we also provide a
// specific override for TProtoStringType*.
-template <typename T>
-struct TypeImplementsMergeBehaviorProbeForMergeFrom {
+template <typename T>
+struct TypeImplementsMergeBehaviorProbeForMergeFrom {
typedef char HasMerge;
typedef long HasNoMerge;
@@ -551,12 +551,12 @@ struct TypeImplementsMergeBehaviorProbeForMergeFrom {
type;
};
-template <typename T, typename = void>
+template <typename T, typename = void>
struct TypeImplementsMergeBehavior
: TypeImplementsMergeBehaviorProbeForMergeFrom<T> {};
-
-
-template <>
+
+
+template <>
struct TypeImplementsMergeBehavior<TProtoStringType> {
typedef std::true_type type;
};
@@ -582,7 +582,7 @@ struct IsMovable
// static void Merge(const Type& from, Type* to);
//
// // Only needs to be implemented if SpaceUsedExcludingSelf() is called.
-// static int SpaceUsedLong(const Type&);
+// static int SpaceUsedLong(const Type&);
// };
class PROTOBUF_EXPORT RepeatedPtrFieldBase {
protected:
@@ -620,7 +620,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase {
// code when implicit weak fields are used, but they should never be called by
// application code.
- template <typename TypeHandler>
+ template <typename TypeHandler>
const typename TypeHandler::Type& Get(int index) const;
// Creates and adds an element using the given prototype, without introducing
@@ -686,7 +686,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase {
void SwapElements(int index1, int index2);
template <typename TypeHandler>
- size_t SpaceUsedExcludingSelfLong() const;
+ size_t SpaceUsedExcludingSelfLong() const;
// Advanced memory management --------------------------------------
@@ -822,7 +822,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase {
// The table-driven MergePartialFromCodedStream implementation needs to
// operate on RepeatedPtrField<MessageLite>.
friend class MergePartialFromCodedStreamHelper;
- friend class AccessorHelper;
+ friend class AccessorHelper;
template <typename T>
friend struct google::protobuf::WeakRepeatedPtrField;
@@ -834,7 +834,7 @@ class GenericTypeHandler {
public:
typedef GenericType Type;
using Movable = IsMovable<GenericType>;
-
+
static inline GenericType* New(Arena* arena) {
return Arena::CreateMaybeMessage<Type>(arena);
}
@@ -855,8 +855,8 @@ class GenericTypeHandler {
static inline void Clear(GenericType* value) { value->Clear(); }
PROTOBUF_NOINLINE
static void Merge(const GenericType& from, GenericType* to);
- static inline size_t SpaceUsedLong(const GenericType& value) {
- return value.SpaceUsedLong();
+ static inline size_t SpaceUsedLong(const GenericType& value) {
+ return value.SpaceUsedLong();
}
};
@@ -871,9 +871,9 @@ void GenericTypeHandler<GenericType>::Merge(const GenericType& from,
to->MergeFrom(from);
}
-// NewFromPrototype() and Merge() are not defined inline here, as we will need
-// to do a virtual function dispatch anyways to go from Message* to call
-// New/Merge.
+// NewFromPrototype() and Merge() are not defined inline here, as we will need
+// to do a virtual function dispatch anyways to go from Message* to call
+// New/Merge.
template <>
MessageLite* GenericTypeHandler<MessageLite>::NewFromPrototype(
const MessageLite* prototype, Arena* arena);
@@ -903,7 +903,7 @@ template <>
PROTOBUF_EXPORT Arena* GenericTypeHandler<Message>::GetOwningArena(
Message* value);
-class StringTypeHandler {
+class StringTypeHandler {
public:
typedef TProtoStringType Type;
using Movable = IsMovable<Type>;
@@ -913,7 +913,7 @@ class StringTypeHandler {
}
static inline TProtoStringType* New(Arena* arena, TProtoStringType&& value) {
return Arena::Create<TProtoStringType>(arena, std::move(value));
- }
+ }
static inline TProtoStringType* NewFromPrototype(const TProtoStringType*,
Arena* arena) {
return New(arena);
@@ -929,7 +929,7 @@ class StringTypeHandler {
*to = from;
}
static size_t SpaceUsedLong(const TProtoStringType& value) {
- return sizeof(value) + StringSpaceUsedExcludingSelfLong(value);
+ return sizeof(value) + StringSpaceUsedExcludingSelfLong(value);
}
};
@@ -963,15 +963,15 @@ class RepeatedPtrField : private internal::RepeatedPtrFieldBase {
const Element& Get(int index) const;
Element* Mutable(int index);
Element* Add();
- void Add(Element&& value);
+ void Add(Element&& value);
// Append elements in the range [begin, end) after reserving
// the appropriate number of elements.
template <typename Iter>
void Add(Iter begin, Iter end);
- const Element& operator[](int index) const { return Get(index); }
- Element& operator[](int index) { return *Mutable(index); }
-
+ const Element& operator[](int index) const { return Get(index); }
+ Element& operator[](int index) { return *Mutable(index); }
+
const Element& at(int index) const;
Element& at(int index);
@@ -1053,11 +1053,11 @@ class RepeatedPtrField : private internal::RepeatedPtrFieldBase {
// Custom STL-like iterator that iterates over and returns the underlying
// pointers to Element rather than Element itself.
- typedef internal::RepeatedPtrOverPtrsIterator<Element*, void*>
- pointer_iterator;
- typedef internal::RepeatedPtrOverPtrsIterator<const Element* const,
- const void* const>
- const_pointer_iterator;
+ typedef internal::RepeatedPtrOverPtrsIterator<Element*, void*>
+ pointer_iterator;
+ typedef internal::RepeatedPtrOverPtrsIterator<const Element* const,
+ const void* const>
+ const_pointer_iterator;
pointer_iterator pointer_begin();
const_pointer_iterator pointer_begin() const;
pointer_iterator pointer_end();
@@ -1065,12 +1065,12 @@ class RepeatedPtrField : private internal::RepeatedPtrFieldBase {
// Returns (an estimate of) the number of bytes used by the repeated field,
// excluding sizeof(*this).
- size_t SpaceUsedExcludingSelfLong() const;
+ size_t SpaceUsedExcludingSelfLong() const;
+
+ int SpaceUsedExcludingSelf() const {
+ return internal::ToIntSize(SpaceUsedExcludingSelfLong());
+ }
- int SpaceUsedExcludingSelf() const {
- return internal::ToIntSize(SpaceUsedExcludingSelfLong());
- }
-
// Advanced memory management --------------------------------------
// When hardcore memory management becomes necessary -- as it sometimes
// does here at Google -- the following methods may be useful.
@@ -1101,9 +1101,9 @@ class RepeatedPtrField : private internal::RepeatedPtrFieldBase {
// RepeatedPtrField.
// It is also useful in legacy code that uses temporary ownership to avoid
// copies. Example:
- // RepeatedPtrField<T> temp_field;
- // temp_field.AddAllocated(new T);
- // ... // Do something with temp_field
+ // RepeatedPtrField<T> temp_field;
+ // temp_field.AddAllocated(new T);
+ // ... // Do something with temp_field
// temp_field.ExtractSubrange(0, temp_field.size(), nullptr);
// If you put temp_field on the arena this fails, because the ownership
// transfers to the arena at the "AddAllocated" call and is not released
@@ -1184,15 +1184,15 @@ class RepeatedPtrField : private internal::RepeatedPtrFieldBase {
// Gets the arena on which this RepeatedPtrField stores its elements.
inline Arena* GetArena() const;
- // For internal use only.
- //
- // This is public due to it being called by generated code.
+ // For internal use only.
+ //
+ // This is public due to it being called by generated code.
void InternalSwap(RepeatedPtrField* other) {
internal::RepeatedPtrFieldBase::InternalSwap(other);
}
-
- private:
- // Note: RepeatedPtrField SHOULD NOT be subclassed by users.
+
+ private:
+ // Note: RepeatedPtrField SHOULD NOT be subclassed by users.
class TypeHandler;
// Implementations for ExtractSubrange(). The copying behavior must be
@@ -1226,11 +1226,11 @@ inline RepeatedField<Element>::RepeatedField(Arena* arena)
template <typename Element>
inline RepeatedField<Element>::RepeatedField(const RepeatedField& other)
: current_size_(0), total_size_(0), arena_or_elements_(nullptr) {
- if (other.current_size_ != 0) {
+ if (other.current_size_ != 0) {
Reserve(other.size());
AddNAlreadyReserved(other.size());
CopyArray(Mutable(0), &other.Get(0), other.size());
- }
+ }
}
template <typename Element>
@@ -1325,9 +1325,9 @@ inline Element* RepeatedField<Element>::AddNAlreadyReserved(int n) {
// pointer anyway.
Element* ret = unsafe_elements() + current_size_;
current_size_ += n;
- return ret;
-}
-
+ return ret;
+}
+
template <typename Element>
inline void RepeatedField<Element>::Resize(int new_size, const Element& value) {
GOOGLE_DCHECK_GE(new_size, 0);
@@ -1453,8 +1453,8 @@ inline void RepeatedField<Element>::Clear() {
}
template <typename Element>
-inline void RepeatedField<Element>::MergeFrom(const RepeatedField& other) {
- GOOGLE_DCHECK_NE(&other, this);
+inline void RepeatedField<Element>::MergeFrom(const RepeatedField& other) {
+ GOOGLE_DCHECK_NE(&other, this);
if (other.current_size_ != 0) {
int existing_size = size();
Reserve(existing_size + other.size());
@@ -1503,10 +1503,10 @@ inline const Element* RepeatedField<Element>::data() const {
return unsafe_elements();
}
-template <typename Element>
+template <typename Element>
inline void RepeatedField<Element>::InternalSwap(RepeatedField* other) {
- GOOGLE_DCHECK(this != other);
-
+ GOOGLE_DCHECK(this != other);
+
// Swap all fields at once.
static_assert(std::is_standard_layout<RepeatedField<Element>>::value,
"offsetof() requires standard layout before c++17");
@@ -1577,7 +1577,7 @@ RepeatedField<Element>::cend() const {
}
template <typename Element>
-inline size_t RepeatedField<Element>::SpaceUsedExcludingSelfLong() const {
+inline size_t RepeatedField<Element>::SpaceUsedExcludingSelfLong() const {
return total_size_ > 0 ? (total_size_ * sizeof(Element) + kRepHeaderSize) : 0;
}
@@ -1614,9 +1614,9 @@ void RepeatedField<Element>::Reserve(int new_size) {
Rep* new_rep;
Arena* arena = GetArena();
new_size = internal::CalculateReserveSize(total_size_, new_size);
- GOOGLE_DCHECK_LE(
- static_cast<size_t>(new_size),
- (std::numeric_limits<size_t>::max() - kRepHeaderSize) / sizeof(Element))
+ GOOGLE_DCHECK_LE(
+ static_cast<size_t>(new_size),
+ (std::numeric_limits<size_t>::max() - kRepHeaderSize) / sizeof(Element))
<< "Requested size is too large to fit into size_t.";
size_t bytes =
kRepHeaderSize + sizeof(Element) * static_cast<size_t>(new_size);
@@ -1645,7 +1645,7 @@ void RepeatedField<Element>::Reserve(int new_size) {
Element* e = &elements()[0];
Element* limit = e + total_size_;
for (; e < limit; e++) {
- new (e) Element;
+ new (e) Element;
}
if (current_size_ > 0) {
MoveArray(&elements()[0], old_rep->elements, current_size_);
@@ -1688,7 +1688,7 @@ void ElementCopier<Element, HasTrivialCopy>::operator()(Element* to,
template <typename Element>
struct ElementCopier<Element, true> {
void operator()(Element* to, const Element* from, int array_size) {
- memcpy(to, from, static_cast<size_t>(array_size) * sizeof(Element));
+ memcpy(to, from, static_cast<size_t>(array_size) * sizeof(Element));
}
};
@@ -1713,12 +1713,12 @@ void RepeatedPtrFieldBase::Destroy() {
for (int i = 0; i < n; i++) {
TypeHandler::Delete(cast<TypeHandler>(elements[i]), NULL);
}
-#if defined(__GXX_DELETE_WITH_SIZE__) || defined(__cpp_sized_deallocation)
- const size_t size = total_size_ * sizeof(elements[0]) + kRepHeaderSize;
- ::operator delete(static_cast<void*>(rep_), size);
-#else
- ::operator delete(static_cast<void*>(rep_));
-#endif
+#if defined(__GXX_DELETE_WITH_SIZE__) || defined(__cpp_sized_deallocation)
+ const size_t size = total_size_ * sizeof(elements[0]) + kRepHeaderSize;
+ ::operator delete(static_cast<void*>(rep_), size);
+#else
+ ::operator delete(static_cast<void*>(rep_));
+#endif
}
rep_ = NULL;
}
@@ -1811,20 +1811,20 @@ inline typename TypeHandler::Type* RepeatedPtrFieldBase::Add(
template <typename TypeHandler,
typename std::enable_if<TypeHandler::Movable::value>::type*>
inline void RepeatedPtrFieldBase::Add(typename TypeHandler::Type&& value) {
- if (rep_ != NULL && current_size_ < rep_->allocated_size) {
- *cast<TypeHandler>(rep_->elements[current_size_++]) = std::move(value);
- return;
- }
- if (!rep_ || rep_->allocated_size == total_size_) {
- Reserve(total_size_ + 1);
- }
- ++rep_->allocated_size;
- typename TypeHandler::Type* result =
- TypeHandler::New(arena_, std::move(value));
- rep_->elements[current_size_++] = result;
-}
-
-template <typename TypeHandler>
+ if (rep_ != NULL && current_size_ < rep_->allocated_size) {
+ *cast<TypeHandler>(rep_->elements[current_size_++]) = std::move(value);
+ return;
+ }
+ if (!rep_ || rep_->allocated_size == total_size_) {
+ Reserve(total_size_ + 1);
+ }
+ ++rep_->allocated_size;
+ typename TypeHandler::Type* result =
+ TypeHandler::New(arena_, std::move(value));
+ rep_->elements[current_size_++] = result;
+}
+
+template <typename TypeHandler>
inline void RepeatedPtrFieldBase::RemoveLast() {
GOOGLE_DCHECK_GT(current_size_, 0);
TypeHandler::Clear(cast<TypeHandler>(rep_->elements[--current_size_]));
@@ -1939,8 +1939,8 @@ inline void RepeatedPtrFieldBase::SwapElements(int index1, int index2) {
}
template <typename TypeHandler>
-inline size_t RepeatedPtrFieldBase::SpaceUsedExcludingSelfLong() const {
- size_t allocated_bytes = static_cast<size_t>(total_size_) * sizeof(void*);
+inline size_t RepeatedPtrFieldBase::SpaceUsedExcludingSelfLong() const {
+ size_t allocated_bytes = static_cast<size_t>(total_size_) * sizeof(void*);
if (rep_ != NULL) {
for (int i = 0; i < rep_->allocated_size; ++i) {
allocated_bytes +=
@@ -2160,7 +2160,7 @@ template <typename Element>
inline RepeatedPtrField<Element>::RepeatedPtrField(
const RepeatedPtrField& other)
: RepeatedPtrFieldBase() {
- MergeFrom(other);
+ MergeFrom(other);
}
template <typename Element>
@@ -2247,11 +2247,11 @@ inline Element* RepeatedPtrField<Element>::Add() {
}
template <typename Element>
-inline void RepeatedPtrField<Element>::Add(Element&& value) {
- RepeatedPtrFieldBase::Add<TypeHandler>(std::move(value));
-}
-
-template <typename Element>
+inline void RepeatedPtrField<Element>::Add(Element&& value) {
+ RepeatedPtrFieldBase::Add<TypeHandler>(std::move(value));
+}
+
+template <typename Element>
template <typename Iter>
inline void RepeatedPtrField<Element>::Add(Iter begin, Iter end) {
int reserve = internal::CalculateReserve(begin, end);
@@ -2442,8 +2442,8 @@ inline Arena* RepeatedPtrField<Element>::GetArena() const {
}
template <typename Element>
-inline size_t RepeatedPtrField<Element>::SpaceUsedExcludingSelfLong() const {
- return RepeatedPtrFieldBase::SpaceUsedExcludingSelfLong<TypeHandler>();
+inline size_t RepeatedPtrField<Element>::SpaceUsedExcludingSelfLong() const {
+ return RepeatedPtrFieldBase::SpaceUsedExcludingSelfLong<TypeHandler>();
}
template <typename Element>
@@ -2598,8 +2598,8 @@ class RepeatedPtrIterator {
// the array.
// The VoidPtr template parameter holds the type-agnostic pointer value
// referenced by the iterator. It should either be "void *" for a mutable
-// iterator, or "const void* const" for a constant iterator.
-template <typename Element, typename VoidPtr>
+// iterator, or "const void* const" for a constant iterator.
+template <typename Element, typename VoidPtr>
class RepeatedPtrOverPtrsIterator {
public:
using iterator = RepeatedPtrOverPtrsIterator<Element, VoidPtr>;
@@ -2613,7 +2613,7 @@ class RepeatedPtrOverPtrsIterator {
explicit RepeatedPtrOverPtrsIterator(VoidPtr* it) : it_(it) {}
// dereferenceable
- reference operator*() const { return *reinterpret_cast<Element*>(it_); }
+ reference operator*() const { return *reinterpret_cast<Element*>(it_); }
pointer operator->() const { return &(operator*()); }
// {inc,dec}rementable
@@ -2675,8 +2675,8 @@ class RepeatedPtrOverPtrsIterator {
};
void RepeatedPtrFieldBase::InternalSwap(RepeatedPtrFieldBase* other) {
- GOOGLE_DCHECK(this != other);
-
+ GOOGLE_DCHECK(this != other);
+
// Swap all fields at once.
static_assert(std::is_standard_layout<RepeatedPtrFieldBase>::value,
"offsetof() requires standard layout before c++17");
@@ -2727,7 +2727,7 @@ RepeatedPtrField<Element>::pointer_begin() {
template <typename Element>
inline typename RepeatedPtrField<Element>::const_pointer_iterator
RepeatedPtrField<Element>::pointer_begin() const {
- return const_pointer_iterator(const_cast<const void* const*>(raw_data()));
+ return const_pointer_iterator(const_cast<const void* const*>(raw_data()));
}
template <typename Element>
inline typename RepeatedPtrField<Element>::pointer_iterator
@@ -2738,7 +2738,7 @@ template <typename Element>
inline typename RepeatedPtrField<Element>::const_pointer_iterator
RepeatedPtrField<Element>::pointer_end() const {
return const_pointer_iterator(
- const_cast<const void* const*>(raw_data() + size()));
+ const_cast<const void* const*>(raw_data() + size()));
}
// Iterators and helper functions that follow the spirit of the STL
@@ -2789,10 +2789,10 @@ class RepeatedPtrFieldBackInsertIterator
*field_->Add() = *ptr_to_value;
return *this;
}
- RepeatedPtrFieldBackInsertIterator<T>& operator=(T&& value) {
- *field_->Add() = std::move(value);
- return *this;
- }
+ RepeatedPtrFieldBackInsertIterator<T>& operator=(T&& value) {
+ *field_->Add() = std::move(value);
+ return *this;
+ }
RepeatedPtrFieldBackInsertIterator<T>& operator*() { return *this; }
RepeatedPtrFieldBackInsertIterator<T>& operator++() { return *this; }
RepeatedPtrFieldBackInsertIterator<T>& operator++(int /* unused */) {
@@ -2898,9 +2898,9 @@ AllocatedRepeatedPtrFieldBackInserter(
// UnsafeArenaAddAllocated instead of AddAllocated.
// This is slightly faster if that matters. It is also useful in legacy code
// that uses temporary ownership to avoid copies. Example:
-// RepeatedPtrField<T> temp_field;
-// temp_field.AddAllocated(new T);
-// ... // Do something with temp_field
+// RepeatedPtrField<T> temp_field;
+// temp_field.AddAllocated(new T);
+// ... // Do something with temp_field
// temp_field.ExtractSubrange(0, temp_field.size(), nullptr);
// If you put temp_field on the arena this fails, because the ownership
// transfers to the arena at the "AddAllocated" call and is not released anymore
diff --git a/contrib/libs/protobuf/src/google/protobuf/source_context.pb.cc b/contrib/libs/protobuf/src/google/protobuf/source_context.pb.cc
index 46831fa3eb..1181ba87a5 100644
--- a/contrib/libs/protobuf/src/google/protobuf/source_context.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/source_context.pb.cc
@@ -27,29 +27,29 @@ struct SourceContextDefaultTypeInternal {
union {
SourceContext _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SourceContextDefaultTypeInternal _SourceContext_default_instance_;
PROTOBUF_NAMESPACE_CLOSE
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr;
-
+
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceContext, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceContext, file_name_),
-};
+};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::SourceContext)},
-};
+};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_),
-};
-
+};
+
const char descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n$google/protobuf/source_context.proto\022\017"
"google.protobuf\"\"\n\rSourceContext\022\021\n\tfile"
@@ -67,8 +67,8 @@ const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto;
-}
-
+}
+
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fsource_5fcontext_2eproto(&descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto);
PROTOBUF_NAMESPACE_OPEN
@@ -95,7 +95,7 @@ SourceContext::SourceContext(const SourceContext& from)
if (!from._internal_file_name().empty()) {
file_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_file_name(),
GetArenaForAllocation());
- }
+ }
// @@protoc_insertion_point(copy_constructor:google.protobuf.SourceContext)
}
@@ -128,9 +128,9 @@ void SourceContext::SetCachedSize(int size) const {
void SourceContext::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.SourceContext)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
file_name_.ClearToEmpty();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -141,7 +141,7 @@ const char* SourceContext::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // string file_name = 1;
+ // string file_name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
auto str = _internal_mutable_file_name();
@@ -177,9 +177,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string file_name = 1;
+ (void) cached_has_bits;
+
+ // string file_name = 1;
if (!this->_internal_file_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_file_name().data(), static_cast<int>(this->_internal_file_name().length()),
@@ -192,20 +192,20 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceContext)
return target;
}
-size_t SourceContext::ByteSizeLong() const {
+size_t SourceContext::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceContext)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // string file_name = 1;
+ // string file_name = 1;
if (!this->_internal_file_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
@@ -236,10 +236,10 @@ void SourceContext::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void SourceContext::MergeFrom(const SourceContext& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceContext)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (!from._internal_file_name().empty()) {
_internal_set_file_name(from._internal_file_name());
}
@@ -250,7 +250,7 @@ void SourceContext::CopyFrom(const SourceContext& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.SourceContext)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool SourceContext::IsInitialized() const {
@@ -258,7 +258,7 @@ bool SourceContext::IsInitialized() const {
}
void SourceContext::InternalSwap(SourceContext* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
diff --git a/contrib/libs/protobuf/src/google/protobuf/source_context.pb.h b/contrib/libs/protobuf/src/google/protobuf/source_context.pb.h
index 20ffd81b97..d90cb42cd1 100644
--- a/contrib/libs/protobuf/src/google/protobuf/source_context.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/source_context.pb.h
@@ -51,7 +51,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
-};
+};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto;
PROTOBUF_NAMESPACE_OPEN
class SourceContext;
@@ -82,15 +82,15 @@ class PROTOBUF_EXPORT SourceContext final :
CopyFrom(from);
return *this;
}
- inline SourceContext& operator=(SourceContext&& from) noexcept {
+ inline SourceContext& operator=(SourceContext&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
@@ -104,16 +104,16 @@ class PROTOBUF_EXPORT SourceContext final :
static const SourceContext& default_instance() {
return *internal_default_instance();
}
- static inline const SourceContext* internal_default_instance() {
- return reinterpret_cast<const SourceContext*>(
- &_SourceContext_default_instance_);
- }
+ static inline const SourceContext* internal_default_instance() {
+ return reinterpret_cast<const SourceContext*>(
+ &_SourceContext_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 0;
-
- friend void swap(SourceContext& a, SourceContext& b) {
- a.Swap(&b);
- }
+ 0;
+
+ friend void swap(SourceContext& a, SourceContext& b) {
+ a.Swap(&b);
+ }
inline void Swap(SourceContext* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -182,7 +182,7 @@ class PROTOBUF_EXPORT SourceContext final :
enum : int {
kFileNameFieldNumber = 1,
};
- // string file_name = 1;
+ // string file_name = 1;
void clear_file_name();
const TProtoStringType& file_name() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -212,13 +212,13 @@ class PROTOBUF_EXPORT SourceContext final :
// ===================================================================
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
// SourceContext
-// string file_name = 1;
+// string file_name = 1;
inline void SourceContext::clear_file_name() {
file_name_.ClearToEmpty();
}
@@ -264,14 +264,14 @@ inline void SourceContext::set_allocated_file_name(TProtoStringType* file_name)
// @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceContext.file_name)
}
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_CLOSE
-
+
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protobuf/src/google/protobuf/struct.pb.cc b/contrib/libs/protobuf/src/google/protobuf/struct.pb.cc
index caa0b9dcc6..0baf5b842a 100644
--- a/contrib/libs/protobuf/src/google/protobuf/struct.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/struct.pb.cc
@@ -26,7 +26,7 @@ struct Struct_FieldsEntry_DoNotUseDefaultTypeInternal {
union {
Struct_FieldsEntry_DoNotUse _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Struct_FieldsEntry_DoNotUseDefaultTypeInternal _Struct_FieldsEntry_DoNotUse_default_instance_;
constexpr Struct::Struct(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
@@ -38,7 +38,7 @@ struct StructDefaultTypeInternal {
union {
Struct _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT StructDefaultTypeInternal _Struct_default_instance_;
constexpr Value::Value(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
@@ -50,7 +50,7 @@ struct ValueDefaultTypeInternal {
union {
Value _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ValueDefaultTypeInternal _Value_default_instance_;
constexpr ListValue::ListValue(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
@@ -68,7 +68,7 @@ PROTOBUF_NAMESPACE_CLOSE
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fstruct_2eproto[4];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto = nullptr;
-
+
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _has_bits_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _internal_metadata_),
@@ -79,17 +79,17 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fstruct_2ep
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, value_),
0,
1,
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct, fields_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, _internal_metadata_),
- ~0u, // no _extensions_
+ ~0u, // no _extensions_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, _oneof_case_[0]),
- ~0u, // no _weak_field_map_
+ ~0u, // no _weak_field_map_
::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
@@ -97,27 +97,27 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fstruct_2ep
::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, kind_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ListValue, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ListValue, values_),
-};
+};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, 7, sizeof(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse)},
{ 9, -1, sizeof(PROTOBUF_NAMESPACE_ID::Struct)},
{ 15, -1, sizeof(PROTOBUF_NAMESPACE_ID::Value)},
{ 27, -1, sizeof(PROTOBUF_NAMESPACE_ID::ListValue)},
-};
+};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Struct_FieldsEntry_DoNotUse_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Struct_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Value_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_),
-};
-
+};
+
const char descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\034google/protobuf/struct.proto\022\017google.p"
"rotobuf\"\204\001\n\006Struct\0223\n\006fields\030\001 \003(\0132#.goo"
@@ -145,8 +145,8 @@ const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_google_2fprotobuf_2fstruct_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2fstruct_2eproto;
-}
-
+}
+
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fstruct_2eproto(&descriptor_table_google_2fprotobuf_2fstruct_2eproto);
PROTOBUF_NAMESPACE_OPEN
@@ -155,7 +155,7 @@ const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NullValue_descriptor() {
return file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[0];
}
bool NullValue_IsValid(int value) {
- switch (value) {
+ switch (value) {
case 0:
return true;
default:
@@ -164,20 +164,20 @@ bool NullValue_IsValid(int value) {
}
-// ===================================================================
-
+// ===================================================================
+
Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse() {}
Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
: SuperType(arena) {}
void Struct_FieldsEntry_DoNotUse::MergeFrom(const Struct_FieldsEntry_DoNotUse& other) {
MergeFromInternal(other);
-}
+}
::PROTOBUF_NAMESPACE_ID::Metadata Struct_FieldsEntry_DoNotUse::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fstruct_2eproto_getter, &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once,
file_level_metadata_google_2fprotobuf_2fstruct_2eproto[0]);
-}
-
+}
+
// ===================================================================
class Struct::_Internal {
@@ -187,17 +187,17 @@ class Struct::_Internal {
Struct::Struct(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- fields_(arena) {
- SharedCtor();
+ fields_(arena) {
+ SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
- // @@protoc_insertion_point(arena_constructor:google.protobuf.Struct)
-}
+ // @@protoc_insertion_point(arena_constructor:google.protobuf.Struct)
+}
Struct::Struct(const Struct& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- fields_.MergeFrom(from.fields_);
+ fields_.MergeFrom(from.fields_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.Struct)
}
@@ -215,16 +215,16 @@ inline void Struct::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
-void Struct::ArenaDtor(void* object) {
- Struct* _this = reinterpret_cast< Struct* >(object);
- (void)_this;
+void Struct::ArenaDtor(void* object) {
+ Struct* _this = reinterpret_cast< Struct* >(object);
+ (void)_this;
_this->fields_. ~MapField();
-}
+}
inline void Struct::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) {
if (arena != nullptr) {
arena->OwnCustomDestructor(this, &Struct::ArenaDtor);
}
-}
+}
void Struct::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
@@ -232,9 +232,9 @@ void Struct::SetCachedSize(int size) const {
void Struct::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Struct)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
fields_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -284,8 +284,8 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Struct)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
// map<string, .google.protobuf.Value> fields = 1;
if (!this->_internal_fields().empty()) {
typedef ::PROTOBUF_NAMESPACE_ID::Map< TProtoStringType, PROTOBUF_NAMESPACE_ID::Value >::const_pointer
@@ -296,7 +296,7 @@ failure:
static void Check(ConstPtr p) {
(void)p;
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- p->first.data(), static_cast<int>(p->first.length()),
+ p->first.data(), static_cast<int>(p->first.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Struct.FieldsEntry.key");
}
@@ -311,9 +311,9 @@ failure:
for (::PROTOBUF_NAMESPACE_ID::Map< TProtoStringType, PROTOBUF_NAMESPACE_ID::Value >::const_iterator
it = this->_internal_fields().begin();
it != this->_internal_fields().end(); ++it, ++n) {
- items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
+ items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
}
- ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
+ ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
for (size_type i = 0; i < n; i++) {
target = Struct_FieldsEntry_DoNotUse::Funcs::InternalSerialize(1, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target, stream);
Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
@@ -331,21 +331,21 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Struct)
return target;
}
-size_t Struct::ByteSizeLong() const {
+size_t Struct::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Struct)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// map<string, .google.protobuf.Value> fields = 1;
- total_size += 1 *
+ total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_fields_size());
for (::PROTOBUF_NAMESPACE_ID::Map< TProtoStringType, PROTOBUF_NAMESPACE_ID::Value >::const_iterator
it = this->_internal_fields().begin();
@@ -377,10 +377,10 @@ void Struct::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Struct::MergeFrom(const Struct& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Struct)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
fields_.MergeFrom(from.fields_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -389,7 +389,7 @@ void Struct::CopyFrom(const Struct& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Struct)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Struct::IsInitialized() const {
@@ -397,7 +397,7 @@ bool Struct::IsInitialized() const {
}
void Struct::InternalSwap(Struct* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
fields_.InternalSwap(&other->fields_);
}
@@ -436,7 +436,7 @@ void Value::set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_val
}
set_has_struct_value();
kind_.struct_value_ = struct_value;
- }
+ }
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value)
}
void Value::set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_value) {
@@ -457,45 +457,45 @@ void Value::set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_valu
Value::Value(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
- // @@protoc_insertion_point(arena_constructor:google.protobuf.Value)
-}
+ // @@protoc_insertion_point(arena_constructor:google.protobuf.Value)
+}
Value::Value(const Value& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- clear_has_kind();
- switch (from.kind_case()) {
- case kNullValue: {
+ clear_has_kind();
+ switch (from.kind_case()) {
+ case kNullValue: {
_internal_set_null_value(from._internal_null_value());
- break;
- }
- case kNumberValue: {
+ break;
+ }
+ case kNumberValue: {
_internal_set_number_value(from._internal_number_value());
- break;
- }
- case kStringValue: {
+ break;
+ }
+ case kStringValue: {
_internal_set_string_value(from._internal_string_value());
- break;
- }
- case kBoolValue: {
+ break;
+ }
+ case kBoolValue: {
_internal_set_bool_value(from._internal_bool_value());
- break;
- }
- case kStructValue: {
+ break;
+ }
+ case kStructValue: {
_internal_mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from._internal_struct_value());
- break;
- }
- case kListValue: {
+ break;
+ }
+ case kListValue: {
_internal_mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from._internal_list_value());
- break;
- }
- case KIND_NOT_SET: {
- break;
- }
- }
+ break;
+ }
+ case KIND_NOT_SET: {
+ break;
+ }
+ }
// @@protoc_insertion_point(copy_constructor:google.protobuf.Value)
}
@@ -517,19 +517,19 @@ inline void Value::SharedDtor() {
}
}
-void Value::ArenaDtor(void* object) {
- Value* _this = reinterpret_cast< Value* >(object);
- (void)_this;
-}
+void Value::ArenaDtor(void* object) {
+ Value* _this = reinterpret_cast< Value* >(object);
+ (void)_this;
+}
void Value::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
-}
+}
void Value::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void Value::clear_kind() {
// @@protoc_insertion_point(one_of_clear_start:google.protobuf.Value)
- switch (kind_case()) {
+ switch (kind_case()) {
case kNullValue: {
// No need to clear
break;
@@ -548,14 +548,14 @@ void Value::clear_kind() {
}
case kStructValue: {
if (GetArenaForAllocation() == nullptr) {
- delete kind_.struct_value_;
- }
+ delete kind_.struct_value_;
+ }
break;
}
case kListValue: {
if (GetArenaForAllocation() == nullptr) {
- delete kind_.list_value_;
- }
+ delete kind_.list_value_;
+ }
break;
}
case KIND_NOT_SET: {
@@ -569,9 +569,9 @@ void Value::clear_kind() {
void Value::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Value)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
clear_kind();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -582,7 +582,7 @@ const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // .google.protobuf.NullValue null_value = 1;
+ // .google.protobuf.NullValue null_value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -590,14 +590,14 @@ const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
_internal_set_null_value(static_cast<PROTOBUF_NAMESPACE_ID::NullValue>(val));
} else goto handle_unusual;
continue;
- // double number_value = 2;
+ // double number_value = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 17)) {
_internal_set_number_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
ptr += sizeof(double);
} else goto handle_unusual;
continue;
- // string string_value = 3;
+ // string string_value = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
auto str = _internal_mutable_string_value();
@@ -606,21 +606,21 @@ const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
CHK_(ptr);
} else goto handle_unusual;
continue;
- // bool bool_value = 4;
+ // bool bool_value = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
_internal_set_bool_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
CHK_(ptr);
} else goto handle_unusual;
continue;
- // .google.protobuf.Struct struct_value = 5;
+ // .google.protobuf.Struct struct_value = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
ptr = ctx->ParseMessage(_internal_mutable_struct_value(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
- // .google.protobuf.ListValue list_value = 6;
+ // .google.protobuf.ListValue list_value = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
ptr = ctx->ParseMessage(_internal_mutable_list_value(), ptr);
@@ -654,22 +654,22 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Value)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // .google.protobuf.NullValue null_value = 1;
+ (void) cached_has_bits;
+
+ // .google.protobuf.NullValue null_value = 1;
if (_internal_has_null_value()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->_internal_null_value(), target);
}
- // double number_value = 2;
+ // double number_value = 2;
if (_internal_has_number_value()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->_internal_number_value(), target);
}
- // string string_value = 3;
+ // string string_value = 3;
if (_internal_has_string_value()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_string_value().data(), static_cast<int>(this->_internal_string_value().length()),
@@ -679,13 +679,13 @@ failure:
3, this->_internal_string_value(), target);
}
- // bool bool_value = 4;
+ // bool bool_value = 4;
if (_internal_has_bool_value()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_bool_value(), target);
}
- // .google.protobuf.Struct struct_value = 5;
+ // .google.protobuf.Struct struct_value = 5;
if (_internal_has_struct_value()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -693,7 +693,7 @@ failure:
5, _Internal::struct_value(this), target, stream);
}
- // .google.protobuf.ListValue list_value = 6;
+ // .google.protobuf.ListValue list_value = 6;
if (_internal_has_list_value()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -704,51 +704,51 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Value)
return target;
}
-size_t Value::ByteSizeLong() const {
+size_t Value::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Value)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
switch (kind_case()) {
- // .google.protobuf.NullValue null_value = 1;
+ // .google.protobuf.NullValue null_value = 1;
case kNullValue: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_null_value());
break;
}
- // double number_value = 2;
+ // double number_value = 2;
case kNumberValue: {
total_size += 1 + 8;
break;
}
- // string string_value = 3;
+ // string string_value = 3;
case kStringValue: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_string_value());
break;
}
- // bool bool_value = 4;
+ // bool bool_value = 4;
case kBoolValue: {
total_size += 1 + 1;
break;
}
- // .google.protobuf.Struct struct_value = 5;
+ // .google.protobuf.Struct struct_value = 5;
case kStructValue: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*kind_.struct_value_);
break;
}
- // .google.protobuf.ListValue list_value = 6;
+ // .google.protobuf.ListValue list_value = 6;
case kListValue: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
@@ -783,10 +783,10 @@ void Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Value::MergeFrom(const Value& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Value)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
switch (from.kind_case()) {
case kNullValue: {
_internal_set_null_value(from._internal_null_value());
@@ -823,7 +823,7 @@ void Value::CopyFrom(const Value& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Value)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Value::IsInitialized() const {
@@ -831,10 +831,10 @@ bool Value::IsInitialized() const {
}
void Value::InternalSwap(Value* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(kind_, other->kind_);
- swap(_oneof_case_[0], other->_oneof_case_[0]);
+ swap(kind_, other->kind_);
+ swap(_oneof_case_[0], other->_oneof_case_[0]);
}
::PROTOBUF_NAMESPACE_ID::Metadata Value::GetMetadata() const {
@@ -852,13 +852,13 @@ class ListValue::_Internal {
ListValue::ListValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- values_(arena) {
- SharedCtor();
+ values_(arena) {
+ SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
- // @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue)
-}
+ // @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue)
+}
ListValue::ListValue(const ListValue& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
values_(from.values_) {
@@ -880,12 +880,12 @@ inline void ListValue::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
-void ListValue::ArenaDtor(void* object) {
- ListValue* _this = reinterpret_cast< ListValue* >(object);
- (void)_this;
-}
+void ListValue::ArenaDtor(void* object) {
+ ListValue* _this = reinterpret_cast< ListValue* >(object);
+ (void)_this;
+}
void ListValue::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
-}
+}
void ListValue::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
@@ -893,9 +893,9 @@ void ListValue::SetCachedSize(int size) const {
void ListValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ListValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
values_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -945,10 +945,10 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ListValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
// repeated .google.protobuf.Value values = 1;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_values_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -958,14 +958,14 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ListValue)
return target;
}
-size_t ListValue::ByteSizeLong() const {
+size_t ListValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.ListValue)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -974,9 +974,9 @@ size_t ListValue::ByteSizeLong() const {
// repeated .google.protobuf.Value values = 1;
total_size += 1UL * this->_internal_values_size();
for (const auto& msg : this->values_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
+ }
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
@@ -1002,10 +1002,10 @@ void ListValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void ListValue::MergeFrom(const ListValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ListValue)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
values_.MergeFrom(from.values_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -1014,7 +1014,7 @@ void ListValue::CopyFrom(const ListValue& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.ListValue)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool ListValue::IsInitialized() const {
@@ -1022,9 +1022,9 @@ bool ListValue::IsInitialized() const {
}
void ListValue::InternalSwap(ListValue* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- values_.InternalSwap(&other->values_);
+ values_.InternalSwap(&other->values_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ListValue::GetMetadata() const {
diff --git a/contrib/libs/protobuf/src/google/protobuf/struct.pb.h b/contrib/libs/protobuf/src/google/protobuf/struct.pb.h
index 9e868779d2..3db06d3258 100644
--- a/contrib/libs/protobuf/src/google/protobuf/struct.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/struct.pb.h
@@ -58,16 +58,16 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fstruct_2eproto {
};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fstruct_2eproto;
PROTOBUF_NAMESPACE_OPEN
-class ListValue;
+class ListValue;
struct ListValueDefaultTypeInternal;
PROTOBUF_EXPORT extern ListValueDefaultTypeInternal _ListValue_default_instance_;
-class Struct;
+class Struct;
struct StructDefaultTypeInternal;
PROTOBUF_EXPORT extern StructDefaultTypeInternal _Struct_default_instance_;
class Struct_FieldsEntry_DoNotUse;
struct Struct_FieldsEntry_DoNotUseDefaultTypeInternal;
PROTOBUF_EXPORT extern Struct_FieldsEntry_DoNotUseDefaultTypeInternal _Struct_FieldsEntry_DoNotUse_default_instance_;
-class Value;
+class Value;
struct ValueDefaultTypeInternal;
PROTOBUF_EXPORT extern ValueDefaultTypeInternal _Value_default_instance_;
PROTOBUF_NAMESPACE_CLOSE
@@ -128,8 +128,8 @@ public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
};
-// -------------------------------------------------------------------
-
+// -------------------------------------------------------------------
+
class PROTOBUF_EXPORT Struct final :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Struct) */ {
public:
@@ -147,38 +147,38 @@ class PROTOBUF_EXPORT Struct final :
CopyFrom(from);
return *this;
}
- inline Struct& operator=(Struct&& from) noexcept {
+ inline Struct& operator=(Struct&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const Struct& default_instance() {
return *internal_default_instance();
}
- static inline const Struct* internal_default_instance() {
- return reinterpret_cast<const Struct*>(
- &_Struct_default_instance_);
- }
+ static inline const Struct* internal_default_instance() {
+ return reinterpret_cast<const Struct*>(
+ &_Struct_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 1;
-
- friend void swap(Struct& a, Struct& b) {
- a.Swap(&b);
- }
+ 1;
+
+ friend void swap(Struct& a, Struct& b) {
+ a.Swap(&b);
+ }
inline void Swap(Struct* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -227,11 +227,11 @@ class PROTOBUF_EXPORT Struct final :
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "google.protobuf.Struct";
}
- protected:
+ protected:
explicit Struct(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
private:
- static void ArenaDtor(void* object);
+ static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
@@ -270,8 +270,8 @@ class PROTOBUF_EXPORT Struct final :
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::MapField<
Struct_FieldsEntry_DoNotUse,
TProtoStringType, PROTOBUF_NAMESPACE_ID::Value,
@@ -299,22 +299,22 @@ class PROTOBUF_EXPORT Value final :
CopyFrom(from);
return *this;
}
- inline Value& operator=(Value&& from) noexcept {
+ inline Value& operator=(Value&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
@@ -331,16 +331,16 @@ class PROTOBUF_EXPORT Value final :
KIND_NOT_SET = 0,
};
- static inline const Value* internal_default_instance() {
- return reinterpret_cast<const Value*>(
- &_Value_default_instance_);
- }
+ static inline const Value* internal_default_instance() {
+ return reinterpret_cast<const Value*>(
+ &_Value_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 2;
-
- friend void swap(Value& a, Value& b) {
- a.Swap(&b);
- }
+ 2;
+
+ friend void swap(Value& a, Value& b) {
+ a.Swap(&b);
+ }
inline void Swap(Value* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -389,11 +389,11 @@ class PROTOBUF_EXPORT Value final :
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "google.protobuf.Value";
}
- protected:
+ protected:
explicit Value(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
private:
- static void ArenaDtor(void* object);
+ static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
@@ -414,7 +414,7 @@ class PROTOBUF_EXPORT Value final :
kStructValueFieldNumber = 5,
kListValueFieldNumber = 6,
};
- // .google.protobuf.NullValue null_value = 1;
+ // .google.protobuf.NullValue null_value = 1;
bool has_null_value() const;
private:
bool _internal_has_null_value() const;
@@ -427,7 +427,7 @@ class PROTOBUF_EXPORT Value final :
void _internal_set_null_value(PROTOBUF_NAMESPACE_ID::NullValue value);
public:
- // double number_value = 2;
+ // double number_value = 2;
bool has_number_value() const;
private:
bool _internal_has_number_value() const;
@@ -440,7 +440,7 @@ class PROTOBUF_EXPORT Value final :
void _internal_set_number_value(double value);
public:
- // string string_value = 3;
+ // string string_value = 3;
bool has_string_value() const;
private:
bool _internal_has_string_value() const;
@@ -458,7 +458,7 @@ class PROTOBUF_EXPORT Value final :
TProtoStringType* _internal_mutable_string_value();
public:
- // bool bool_value = 4;
+ // bool bool_value = 4;
bool has_bool_value() const;
private:
bool _internal_has_bool_value() const;
@@ -471,7 +471,7 @@ class PROTOBUF_EXPORT Value final :
void _internal_set_bool_value(bool value);
public:
- // .google.protobuf.Struct struct_value = 5;
+ // .google.protobuf.Struct struct_value = 5;
bool has_struct_value() const;
private:
bool _internal_has_struct_value() const;
@@ -481,15 +481,15 @@ class PROTOBUF_EXPORT Value final :
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::Struct* release_struct_value();
PROTOBUF_NAMESPACE_ID::Struct* mutable_struct_value();
void set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_value);
- private:
+ private:
const PROTOBUF_NAMESPACE_ID::Struct& _internal_struct_value() const;
PROTOBUF_NAMESPACE_ID::Struct* _internal_mutable_struct_value();
- public:
- void unsafe_arena_set_allocated_struct_value(
+ public:
+ void unsafe_arena_set_allocated_struct_value(
PROTOBUF_NAMESPACE_ID::Struct* struct_value);
PROTOBUF_NAMESPACE_ID::Struct* unsafe_arena_release_struct_value();
- // .google.protobuf.ListValue list_value = 6;
+ // .google.protobuf.ListValue list_value = 6;
bool has_list_value() const;
private:
bool _internal_has_list_value() const;
@@ -499,11 +499,11 @@ class PROTOBUF_EXPORT Value final :
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::ListValue* release_list_value();
PROTOBUF_NAMESPACE_ID::ListValue* mutable_list_value();
void set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_value);
- private:
+ private:
const PROTOBUF_NAMESPACE_ID::ListValue& _internal_list_value() const;
PROTOBUF_NAMESPACE_ID::ListValue* _internal_mutable_list_value();
- public:
- void unsafe_arena_set_allocated_list_value(
+ public:
+ void unsafe_arena_set_allocated_list_value(
PROTOBUF_NAMESPACE_ID::ListValue* list_value);
PROTOBUF_NAMESPACE_ID::ListValue* unsafe_arena_release_list_value();
@@ -512,19 +512,19 @@ class PROTOBUF_EXPORT Value final :
// @@protoc_insertion_point(class_scope:google.protobuf.Value)
private:
class _Internal;
- void set_has_null_value();
- void set_has_number_value();
- void set_has_string_value();
- void set_has_bool_value();
- void set_has_struct_value();
- void set_has_list_value();
+ void set_has_null_value();
+ void set_has_number_value();
+ void set_has_string_value();
+ void set_has_bool_value();
+ void set_has_struct_value();
+ void set_has_list_value();
inline bool has_kind() const;
inline void clear_has_kind();
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
union KindUnion {
constexpr KindUnion() : _constinit_{} {}
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_;
@@ -559,38 +559,38 @@ class PROTOBUF_EXPORT ListValue final :
CopyFrom(from);
return *this;
}
- inline ListValue& operator=(ListValue&& from) noexcept {
+ inline ListValue& operator=(ListValue&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const ListValue& default_instance() {
return *internal_default_instance();
}
- static inline const ListValue* internal_default_instance() {
- return reinterpret_cast<const ListValue*>(
- &_ListValue_default_instance_);
- }
+ static inline const ListValue* internal_default_instance() {
+ return reinterpret_cast<const ListValue*>(
+ &_ListValue_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 3;
-
- friend void swap(ListValue& a, ListValue& b) {
- a.Swap(&b);
- }
+ 3;
+
+ friend void swap(ListValue& a, ListValue& b) {
+ a.Swap(&b);
+ }
inline void Swap(ListValue* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -639,11 +639,11 @@ class PROTOBUF_EXPORT ListValue final :
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "google.protobuf.ListValue";
}
- protected:
+ protected:
explicit ListValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
private:
- static void ArenaDtor(void* object);
+ static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
@@ -682,8 +682,8 @@ class PROTOBUF_EXPORT ListValue final :
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Value > values_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto;
@@ -693,12 +693,12 @@ class PROTOBUF_EXPORT ListValue final :
// ===================================================================
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
-// -------------------------------------------------------------------
-
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
+// -------------------------------------------------------------------
+
// Struct
// map<string, .google.protobuf.Value> fields = 1;
@@ -734,7 +734,7 @@ Struct::mutable_fields() {
// Value
-// .google.protobuf.NullValue null_value = 1;
+// .google.protobuf.NullValue null_value = 1;
inline bool Value::_internal_has_null_value() const {
return kind_case() == kNullValue;
}
@@ -772,7 +772,7 @@ inline void Value::set_null_value(PROTOBUF_NAMESPACE_ID::NullValue value) {
// @@protoc_insertion_point(field_set:google.protobuf.Value.null_value)
}
-// double number_value = 2;
+// double number_value = 2;
inline bool Value::_internal_has_number_value() const {
return kind_case() == kNumberValue;
}
@@ -810,7 +810,7 @@ inline void Value::set_number_value(double value) {
// @@protoc_insertion_point(field_set:google.protobuf.Value.number_value)
}
-// string string_value = 3;
+// string string_value = 3;
inline bool Value::_internal_has_string_value() const {
return kind_case() == kStringValue;
}
@@ -847,7 +847,7 @@ inline TProtoStringType* Value::mutable_string_value() {
}
inline const TProtoStringType& Value::_internal_string_value() const {
if (_internal_has_string_value()) {
- return kind_.string_value_.Get();
+ return kind_.string_value_.Get();
}
return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited();
}
@@ -892,7 +892,7 @@ inline void Value::set_allocated_string_value(TProtoStringType* string_value) {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.string_value)
}
-// bool bool_value = 4;
+// bool bool_value = 4;
inline bool Value::_internal_has_bool_value() const {
return kind_case() == kBoolValue;
}
@@ -930,7 +930,7 @@ inline void Value::set_bool_value(bool value) {
// @@protoc_insertion_point(field_set:google.protobuf.Value.bool_value)
}
-// .google.protobuf.Struct struct_value = 5;
+// .google.protobuf.Struct struct_value = 5;
inline bool Value::_internal_has_struct_value() const {
return kind_case() == kStructValue;
}
@@ -943,8 +943,8 @@ inline void Value::set_has_struct_value() {
inline void Value::clear_struct_value() {
if (_internal_has_struct_value()) {
if (GetArenaForAllocation() == nullptr) {
- delete kind_.struct_value_;
- }
+ delete kind_.struct_value_;
+ }
clear_has_kind();
}
}
@@ -955,26 +955,26 @@ inline PROTOBUF_NAMESPACE_ID::Struct* Value::release_struct_value() {
PROTOBUF_NAMESPACE_ID::Struct* temp = kind_.struct_value_;
if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
- }
+ }
kind_.struct_value_ = nullptr;
return temp;
- } else {
+ } else {
return nullptr;
- }
-}
+ }
+}
inline const PROTOBUF_NAMESPACE_ID::Struct& Value::_internal_struct_value() const {
return _internal_has_struct_value()
? *kind_.struct_value_
: reinterpret_cast< PROTOBUF_NAMESPACE_ID::Struct&>(PROTOBUF_NAMESPACE_ID::_Struct_default_instance_);
-}
+}
inline const PROTOBUF_NAMESPACE_ID::Struct& Value::struct_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value)
return _internal_struct_value();
}
inline PROTOBUF_NAMESPACE_ID::Struct* Value::unsafe_arena_release_struct_value() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.struct_value)
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.struct_value)
if (_internal_has_struct_value()) {
- clear_has_kind();
+ clear_has_kind();
PROTOBUF_NAMESPACE_ID::Struct* temp = kind_.struct_value_;
kind_.struct_value_ = nullptr;
return temp;
@@ -988,7 +988,7 @@ inline void Value::unsafe_arena_set_allocated_struct_value(PROTOBUF_NAMESPACE_ID
set_has_struct_value();
kind_.struct_value_ = struct_value;
}
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.struct_value)
+ // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.struct_value)
}
inline PROTOBUF_NAMESPACE_ID::Struct* Value::_internal_mutable_struct_value() {
if (!_internal_has_struct_value()) {
@@ -1004,7 +1004,7 @@ inline PROTOBUF_NAMESPACE_ID::Struct* Value::mutable_struct_value() {
return _msg;
}
-// .google.protobuf.ListValue list_value = 6;
+// .google.protobuf.ListValue list_value = 6;
inline bool Value::_internal_has_list_value() const {
return kind_case() == kListValue;
}
@@ -1017,8 +1017,8 @@ inline void Value::set_has_list_value() {
inline void Value::clear_list_value() {
if (_internal_has_list_value()) {
if (GetArenaForAllocation() == nullptr) {
- delete kind_.list_value_;
- }
+ delete kind_.list_value_;
+ }
clear_has_kind();
}
}
@@ -1029,26 +1029,26 @@ inline PROTOBUF_NAMESPACE_ID::ListValue* Value::release_list_value() {
PROTOBUF_NAMESPACE_ID::ListValue* temp = kind_.list_value_;
if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
- }
+ }
kind_.list_value_ = nullptr;
return temp;
- } else {
+ } else {
return nullptr;
- }
-}
+ }
+}
inline const PROTOBUF_NAMESPACE_ID::ListValue& Value::_internal_list_value() const {
return _internal_has_list_value()
? *kind_.list_value_
: reinterpret_cast< PROTOBUF_NAMESPACE_ID::ListValue&>(PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_);
-}
+}
inline const PROTOBUF_NAMESPACE_ID::ListValue& Value::list_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Value.list_value)
return _internal_list_value();
}
inline PROTOBUF_NAMESPACE_ID::ListValue* Value::unsafe_arena_release_list_value() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.list_value)
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.list_value)
if (_internal_has_list_value()) {
- clear_has_kind();
+ clear_has_kind();
PROTOBUF_NAMESPACE_ID::ListValue* temp = kind_.list_value_;
kind_.list_value_ = nullptr;
return temp;
@@ -1062,7 +1062,7 @@ inline void Value::unsafe_arena_set_allocated_list_value(PROTOBUF_NAMESPACE_ID::
set_has_list_value();
kind_.list_value_ = list_value;
}
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.list_value)
+ // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.list_value)
}
inline PROTOBUF_NAMESPACE_ID::ListValue* Value::_internal_mutable_list_value() {
if (!_internal_has_list_value()) {
@@ -1131,20 +1131,20 @@ ListValue::values() const {
return values_;
}
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif // __GNUC__
+// -------------------------------------------------------------------
+
// -------------------------------------------------------------------
// -------------------------------------------------------------------
-// -------------------------------------------------------------------
-
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_CLOSE
-
+
PROTOBUF_NAMESPACE_OPEN
template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::NullValue> : ::std::true_type {};
diff --git a/contrib/libs/protobuf/src/google/protobuf/struct.proto b/contrib/libs/protobuf/src/google/protobuf/struct.proto
index 8395910c9a..545215c252 100644
--- a/contrib/libs/protobuf/src/google/protobuf/struct.proto
+++ b/contrib/libs/protobuf/src/google/protobuf/struct.proto
@@ -33,7 +33,7 @@ syntax = "proto3";
package google.protobuf;
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option cc_enable_arenas = true;
+option cc_enable_arenas = true;
option go_package = "google.golang.org/protobuf/types/known/structpb";
option java_package = "com.google.protobuf";
option java_outer_classname = "StructProto";
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/bytestream.h b/contrib/libs/protobuf/src/google/protobuf/stubs/bytestream.h
index 694d6116fe..05d69ab89f 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/bytestream.h
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/bytestream.h
@@ -65,7 +65,7 @@ namespace protobuf {
namespace strings {
// An abstract interface for an object that consumes a sequence of bytes. This
-// interface offers a way to append data as well as a Flush() function.
+// interface offers a way to append data as well as a Flush() function.
//
// Example:
//
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/callback.h b/contrib/libs/protobuf/src/google/protobuf/stubs/callback.h
index 66597cc52a..6e0f62dcd7 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/callback.h
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/callback.h
@@ -349,29 +349,29 @@ struct InternalConstRef {
typedef const base_type& type;
};
-template<typename R, typename T>
-class MethodResultCallback_0_0 : public ResultCallback<R> {
- public:
- typedef R (T::*MethodType)();
- MethodResultCallback_0_0(T* object, MethodType method, bool self_deleting)
- : object_(object),
- method_(method),
- self_deleting_(self_deleting) {}
- ~MethodResultCallback_0_0() {}
-
- R Run() {
- bool needs_delete = self_deleting_;
- R result = (object_->*method_)();
- if (needs_delete) delete this;
- return result;
- }
-
- private:
- T* object_;
- MethodType method_;
- bool self_deleting_;
-};
-
+template<typename R, typename T>
+class MethodResultCallback_0_0 : public ResultCallback<R> {
+ public:
+ typedef R (T::*MethodType)();
+ MethodResultCallback_0_0(T* object, MethodType method, bool self_deleting)
+ : object_(object),
+ method_(method),
+ self_deleting_(self_deleting) {}
+ ~MethodResultCallback_0_0() {}
+
+ R Run() {
+ bool needs_delete = self_deleting_;
+ R result = (object_->*method_)();
+ if (needs_delete) delete this;
+ return result;
+ }
+
+ private:
+ T* object_;
+ MethodType method_;
+ bool self_deleting_;
+};
+
template <typename R, typename T, typename P1, typename P2, typename P3,
typename P4, typename P5, typename P6, typename A1, typename A2>
class MethodResultCallback_6_2 : public ResultCallback2<R, A1, A2> {
@@ -409,8 +409,8 @@ class MethodResultCallback_6_2 : public ResultCallback2<R, A1, A2> {
typename std::remove_reference<P6>::type p6_;
};
-} // namespace internal
-
+} // namespace internal
+
// See Closure.
inline Closure* NewCallback(void (*function)()) {
return new internal::FunctionClosure0(function, true);
@@ -548,13 +548,13 @@ inline ResultCallback1<R, A1>* NewPermanentCallback(
function, false, p1);
}
-// See MethodResultCallback_0_0
-template <typename R, typename T1, typename T2>
-inline ResultCallback<R>* NewPermanentCallback(
- T1* object, R (T2::*function)()) {
- return new internal::MethodResultCallback_0_0<R, T1>(object, function, false);
-}
-
+// See MethodResultCallback_0_0
+template <typename R, typename T1, typename T2>
+inline ResultCallback<R>* NewPermanentCallback(
+ T1* object, R (T2::*function)()) {
+ return new internal::MethodResultCallback_0_0<R, T1>(object, function, false);
+}
+
// See MethodResultCallback_6_2
template <typename R, typename T, typename P1, typename P2, typename P3,
typename P4, typename P5, typename P6, typename A1, typename A2>
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/common.cc b/contrib/libs/protobuf/src/google/protobuf/stubs/common.cc
index df89444e21..1bf0618a79 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/common.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/common.cc
@@ -40,17 +40,17 @@
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN // We only need minimal includes
+#define WIN32_LEAN_AND_MEAN // We only need minimal includes
#endif
-#include <windows.h>
+#include <windows.h>
#define snprintf _snprintf // see comment in strutil.cc
#elif defined(HAVE_PTHREAD)
-#include <pthread.h>
+#include <pthread.h>
#else
#error "No suitable threading library available."
#endif
#if defined(__ANDROID__)
-#include <android/log.h>
+#include <android/log.h>
#endif
#include <google/protobuf/stubs/callback.h>
@@ -117,14 +117,14 @@ TProtoStringType VersionString(int version) {
// ===================================================================
// emulates google3/base/logging.cc
-// If the minimum logging level is not set, we default to logging messages for
-// all levels.
-#ifndef GOOGLE_PROTOBUF_MIN_LOG_LEVEL
-#define GOOGLE_PROTOBUF_MIN_LOG_LEVEL LOGLEVEL_INFO
-#endif
-
+// If the minimum logging level is not set, we default to logging messages for
+// all levels.
+#ifndef GOOGLE_PROTOBUF_MIN_LOG_LEVEL
+#define GOOGLE_PROTOBUF_MIN_LOG_LEVEL LOGLEVEL_INFO
+#endif
+
namespace internal {
-
+
#if defined(__ANDROID__)
inline void DefaultLogHandler(LogLevel level, const char* filename, int line,
const TProtoStringType& message) {
@@ -159,13 +159,13 @@ inline void DefaultLogHandler(LogLevel level, const char* filename, int line,
"terminating.\n");
}
}
-
+
#else
void DefaultLogHandler(LogLevel level, const char* filename, int line,
const TProtoStringType& message) {
- if (level < GOOGLE_PROTOBUF_MIN_LOG_LEVEL) {
- return;
- }
+ if (level < GOOGLE_PROTOBUF_MIN_LOG_LEVEL) {
+ return;
+ }
static const char* level_names[] = { "INFO", "WARNING", "ERROR", "FATAL" };
// We use fprintf() instead of cerr because we want this to work at static
@@ -314,14 +314,14 @@ uint32 ghtonl(uint32 x) {
return result;
}
-#if PROTOBUF_USE_EXCEPTIONS
+#if PROTOBUF_USE_EXCEPTIONS
FatalException::~FatalException() throw() {}
-
+
const char* FatalException::what() const throw() {
- return message_.c_str();
-}
-#endif
-
+ return message_.c_str();
+}
+#endif
+
} // namespace protobuf
} // namespace google
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/common.h b/contrib/libs/protobuf/src/google/protobuf/stubs/common.h
index 6801dd88a7..e4fae2d68e 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/common.h
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/common.h
@@ -86,9 +86,9 @@ namespace internal {
// easier: major * 10^6 + minor * 10^3 + micro
#define GOOGLE_PROTOBUF_VERSION 3017003
-// A suffix string for alpha, beta or rc releases. Empty for stable releases.
-#define GOOGLE_PROTOBUF_VERSION_SUFFIX ""
-
+// A suffix string for alpha, beta or rc releases. Empty for stable releases.
+#define GOOGLE_PROTOBUF_VERSION_SUFFIX ""
+
// The minimum header version which works with the current version of
// the library. This constant should only be used by protoc's C++ code
// generator.
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/hash.h b/contrib/libs/protobuf/src/google/protobuf/stubs/hash.h
index aadda10511..9883c0d5b3 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/hash.h
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/hash.h
@@ -65,7 +65,7 @@ struct hash<const char*> {
inline size_t operator()(const char* str) const {
size_t result = 0;
for (; *str != '\0'; str++) {
- result = 5 * result + static_cast<size_t>(*str);
+ result = 5 * result + static_cast<size_t>(*str);
}
return result;
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/int128.cc b/contrib/libs/protobuf/src/google/protobuf/stubs/int128.cc
index b442efa94e..f008ce8d26 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/int128.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/int128.cc
@@ -30,8 +30,8 @@
#include <google/protobuf/stubs/int128.h>
-#include <iomanip>
-#include <ostream> // NOLINT(readability/streams)
+#include <iomanip>
+#include <ostream> // NOLINT(readability/streams)
#include <sstream>
#include <google/protobuf/stubs/logging.h>
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/map_util.h b/contrib/libs/protobuf/src/google/protobuf/stubs/map_util.h
index 64390d9e51..24e098ad1b 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/map_util.h
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/map_util.h
@@ -208,7 +208,7 @@ typename Collection::value_type::second_type::element_type&
FindLinkedPtrOrDie(const Collection& collection,
const typename Collection::value_type::first_type& key) {
typename Collection::const_iterator it = collection.find(key);
- GOOGLE_CHECK(it != collection.end()) << "key not found: " << key;
+ GOOGLE_CHECK(it != collection.end()) << "key not found: " << key;
// Since linked_ptr::operator*() is a const member returning a non const,
// we do not need a version of this function taking a non const collection.
return *it->second;
@@ -337,15 +337,15 @@ bool InsertIfNotPresent(
template <class Collection>
void InsertOrDie(Collection* const collection,
const typename Collection::value_type& value) {
- GOOGLE_CHECK(InsertIfNotPresent(collection, value))
- << "duplicate value: " << value;
+ GOOGLE_CHECK(InsertIfNotPresent(collection, value))
+ << "duplicate value: " << value;
}
// Same as above except doesn't log the value on error.
template <class Collection>
void InsertOrDieNoPrint(Collection* const collection,
const typename Collection::value_type& value) {
- GOOGLE_CHECK(InsertIfNotPresent(collection, value)) << "duplicate value.";
+ GOOGLE_CHECK(InsertIfNotPresent(collection, value)) << "duplicate value.";
}
// Inserts the key-value pair into the collection. Dies if key was already
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/platform_macros.h b/contrib/libs/protobuf/src/google/protobuf/stubs/platform_macros.h
index 56a6336e4b..24799600dc 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/platform_macros.h
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/platform_macros.h
@@ -51,7 +51,7 @@
#else
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#endif
-#elif defined(_M_ARM) || defined(__ARMEL__)
+#elif defined(_M_ARM) || defined(__ARMEL__)
#define GOOGLE_PROTOBUF_ARCH_ARM 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#elif defined(_M_ARM64)
@@ -122,11 +122,11 @@ GOOGLE_PROTOBUF_PLATFORM_ERROR
#undef GOOGLE_PROTOBUF_PLATFORM_ERROR
-#if defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE) || defined(__OpenBSD__)
+#if defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE) || defined(__OpenBSD__)
// Android ndk does not support the __thread keyword very well yet. Here
// we use pthread_key_create()/pthread_getspecific()/... methods for
// TLS support on android.
-// iOS and OpenBSD also do not support the __thread keyword.
+// iOS and OpenBSD also do not support the __thread keyword.
#define GOOGLE_PROTOBUF_NO_THREADLOCAL
#endif
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/port.h b/contrib/libs/protobuf/src/google/protobuf/stubs/port.h
index 86799a2ffa..bc0be2b828 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/port.h
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/port.h
@@ -43,7 +43,7 @@
#include <string.h>
#include <google/protobuf/stubs/platform_macros.h>
-
+
#include <google/protobuf/port_def.inc>
#undef PROTOBUF_LITTLE_ENDIAN
@@ -91,10 +91,10 @@
// Legacy: some users reference these (internal-only) macros even though we
// don't need them any more.
#if defined(_MSC_VER) && defined(PROTOBUF_USE_DLLS)
- #ifdef LIBPROTOBUF_EXPORTS
- #define LIBPROTOBUF_EXPORT __declspec(dllexport)
+ #ifdef LIBPROTOBUF_EXPORTS
+ #define LIBPROTOBUF_EXPORT __declspec(dllexport)
#else
- #define LIBPROTOBUF_EXPORT __declspec(dllimport)
+ #define LIBPROTOBUF_EXPORT __declspec(dllimport)
#endif
#ifdef LIBPROTOC_EXPORTS
#define LIBPROTOC_EXPORT __declspec(dllexport)
@@ -112,17 +112,17 @@
// ===================================================================
// from google3/base/port.h
-
-#if (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L || \
- (defined(_MSC_VER) && _MSC_VER >= 1900))
-// Define this to 1 if the code is compiled in C++11 mode; leave it
-// undefined otherwise. Do NOT define it to 0 -- that causes
-// '#ifdef LANG_CXX11' to behave differently from '#if LANG_CXX11'.
-#define LANG_CXX11 1
+
+#if (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L || \
+ (defined(_MSC_VER) && _MSC_VER >= 1900))
+// Define this to 1 if the code is compiled in C++11 mode; leave it
+// undefined otherwise. Do NOT define it to 0 -- that causes
+// '#ifdef LANG_CXX11' to behave differently from '#if LANG_CXX11'.
+#define LANG_CXX11 1
#else
#error "Protobuf requires at least C++11."
-#endif
-
+#endif
+
using TProtoStringType = TString;
namespace google {
@@ -286,69 +286,69 @@ static inline uint64 bswap_64(uint64 x) {
#endif
// ===================================================================
-// from google3/util/bits/bits.h
-
-class Bits {
- public:
- static uint32 Log2FloorNonZero(uint32 n) {
-#if defined(__GNUC__)
- return 31 ^ static_cast<uint32>(__builtin_clz(n));
+// from google3/util/bits/bits.h
+
+class Bits {
+ public:
+ static uint32 Log2FloorNonZero(uint32 n) {
+#if defined(__GNUC__)
+ return 31 ^ static_cast<uint32>(__builtin_clz(n));
#elif defined(_MSC_VER)
unsigned long where;
_BitScanReverse(&where, n);
return where;
-#else
- return Log2FloorNonZero_Portable(n);
-#endif
- }
-
- static uint32 Log2FloorNonZero64(uint64 n) {
+#else
+ return Log2FloorNonZero_Portable(n);
+#endif
+ }
+
+ static uint32 Log2FloorNonZero64(uint64 n) {
// Older versions of clang run into an instruction-selection failure when
// it encounters __builtin_clzll:
- // https://bugs.chromium.org/p/nativeclient/issues/detail?id=4395
+ // https://bugs.chromium.org/p/nativeclient/issues/detail?id=4395
// This includes arm-nacl-clang and clang in older Android NDK versions.
// To work around this, when we build with those we use the portable
- // implementation instead.
+ // implementation instead.
#if defined(__GNUC__) && !defined(GOOGLE_PROTOBUF_USE_PORTABLE_LOG2)
- return 63 ^ static_cast<uint32>(__builtin_clzll(n));
+ return 63 ^ static_cast<uint32>(__builtin_clzll(n));
#elif defined(_MSC_VER) && defined(_M_X64)
unsigned long where;
_BitScanReverse64(&where, n);
return where;
-#else
- return Log2FloorNonZero64_Portable(n);
-#endif
- }
- private:
- static int Log2FloorNonZero_Portable(uint32 n) {
- if (n == 0)
- return -1;
- int log = 0;
- uint32 value = n;
- for (int i = 4; i >= 0; --i) {
- int shift = (1 << i);
- uint32 x = value >> shift;
- if (x != 0) {
- value = x;
- log += shift;
- }
- }
- assert(value == 1);
- return log;
- }
-
- static int Log2FloorNonZero64_Portable(uint64 n) {
- const uint32 topbits = static_cast<uint32>(n >> 32);
- if (topbits == 0) {
- // Top bits are zero, so scan in bottom bits
- return static_cast<int>(Log2FloorNonZero(static_cast<uint32>(n)));
- } else {
- return 32 + static_cast<int>(Log2FloorNonZero(topbits));
- }
- }
-};
-
-// ===================================================================
+#else
+ return Log2FloorNonZero64_Portable(n);
+#endif
+ }
+ private:
+ static int Log2FloorNonZero_Portable(uint32 n) {
+ if (n == 0)
+ return -1;
+ int log = 0;
+ uint32 value = n;
+ for (int i = 4; i >= 0; --i) {
+ int shift = (1 << i);
+ uint32 x = value >> shift;
+ if (x != 0) {
+ value = x;
+ log += shift;
+ }
+ }
+ assert(value == 1);
+ return log;
+ }
+
+ static int Log2FloorNonZero64_Portable(uint64 n) {
+ const uint32 topbits = static_cast<uint32>(n >> 32);
+ if (topbits == 0) {
+ // Top bits are zero, so scan in bottom bits
+ return static_cast<int>(Log2FloorNonZero(static_cast<uint32>(n)));
+ } else {
+ return 32 + static_cast<int>(Log2FloorNonZero(topbits));
+ }
+ }
+};
+
+// ===================================================================
// from google3/util/endian/endian.h
PROTOBUF_EXPORT uint32 ghtonl(uint32 x);
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/status.cc b/contrib/libs/protobuf/src/google/protobuf/stubs/status.cc
index 655b4489f3..bb2b119aa4 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/status.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/status.cc
@@ -29,7 +29,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <google/protobuf/stubs/status.h>
-#include <ostream>
+#include <ostream>
#include <stdio.h>
#include <string>
#include <utility>
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/stringpiece.cc b/contrib/libs/protobuf/src/google/protobuf/stubs/stringpiece.cc
index 422bfe39ef..52416cee61 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/stringpiece.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/stringpiece.cc
@@ -33,7 +33,7 @@
#include <algorithm>
#include <climits>
#include <string>
-#include <ostream>
+#include <ostream>
#include <google/protobuf/stubs/logging.h>
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/stringpiece.h b/contrib/libs/protobuf/src/google/protobuf/stubs/stringpiece.h
index 29912d6ef6..dde25c97ed 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/stringpiece.h
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/stringpiece.h
@@ -257,7 +257,7 @@ class PROTOBUF_EXPORT StringPiece {
// returns {-1, 0, 1}
int compare(StringPiece x) const {
size_type min_size = length_ < x.length_ ? length_ : x.length_;
- int r = memcmp(ptr_, x.ptr_, static_cast<size_t>(min_size));
+ int r = memcmp(ptr_, x.ptr_, static_cast<size_t>(min_size));
if (r < 0) return -1;
if (r > 0) return 1;
if (length_ < x.length_) return -1;
@@ -282,14 +282,14 @@ class PROTOBUF_EXPORT StringPiece {
void AppendToString(TProtoStringType* target) const;
bool starts_with(StringPiece x) const {
- return (length_ >= x.length_) &&
- (memcmp(ptr_, x.ptr_, static_cast<size_t>(x.length_)) == 0);
+ return (length_ >= x.length_) &&
+ (memcmp(ptr_, x.ptr_, static_cast<size_t>(x.length_)) == 0);
}
bool ends_with(StringPiece x) const {
return ((length_ >= x.length_) &&
- (memcmp(ptr_ + (length_-x.length_), x.ptr_,
- static_cast<size_t>(x.length_)) == 0));
+ (memcmp(ptr_ + (length_-x.length_), x.ptr_,
+ static_cast<size_t>(x.length_)) == 0));
}
// Checks whether StringPiece starts with x and if so advances the beginning
@@ -348,7 +348,7 @@ inline bool operator==(StringPiece x, StringPiece y) {
}
return x.data() == y.data() || len <= 0 ||
- memcmp(x.data(), y.data(), static_cast<size_t>(len)) == 0;
+ memcmp(x.data(), y.data(), static_cast<size_t>(len)) == 0;
}
inline bool operator!=(StringPiece x, StringPiece y) {
@@ -358,7 +358,7 @@ inline bool operator!=(StringPiece x, StringPiece y) {
inline bool operator<(StringPiece x, StringPiece y) {
const StringPiece::size_type min_size =
x.size() < y.size() ? x.size() : y.size();
- const int r = memcmp(x.data(), y.data(), static_cast<size_t>(min_size));
+ const int r = memcmp(x.data(), y.data(), static_cast<size_t>(min_size));
return (r < 0) || (r == 0 && x.size() < y.size());
}
@@ -389,7 +389,7 @@ template<> struct hash<StringPiece> {
size_t operator()(const StringPiece& s) const {
size_t result = 0;
for (const char *str = s.data(), *end = str + s.size(); str < end; str++) {
- result = 5 * result + static_cast<size_t>(*str);
+ result = 5 * result + static_cast<size_t>(*str);
}
return result;
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc b/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc
index 87461f7ef4..9cb53a08a8 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc
@@ -80,20 +80,20 @@ inline bool isprint(char c) {
}
// ----------------------------------------------------------------------
-// ReplaceCharacters
-// Replaces any occurrence of the character 'remove' (or the characters
-// in 'remove') with the character 'replacewith'.
-// ----------------------------------------------------------------------
+// ReplaceCharacters
+// Replaces any occurrence of the character 'remove' (or the characters
+// in 'remove') with the character 'replacewith'.
+// ----------------------------------------------------------------------
void ReplaceCharacters(TProtoStringType *s, const char *remove, char replacewith) {
- const char *str_start = s->c_str();
- const char *str = str_start;
- for (str = strpbrk(str, remove);
+ const char *str_start = s->c_str();
+ const char *str = str_start;
+ for (str = strpbrk(str, remove);
str != nullptr;
- str = strpbrk(str + 1, remove)) {
- (*s)[str - str_start] = replacewith;
- }
-}
-
+ str = strpbrk(str + 1, remove)) {
+ (*s)[str - str_start] = replacewith;
+ }
+}
+
void StripWhitespace(TProtoStringType *str) {
int str_length = str->length();
@@ -1385,7 +1385,7 @@ char* FloatToBuffer(float value, char* buffer) {
float parsed_value;
if (!safe_strtof(buffer, &parsed_value) || parsed_value != value) {
int snprintf_result =
- snprintf(buffer, kFloatToBufferSize, "%.*g", FLT_DIG+3, value);
+ snprintf(buffer, kFloatToBufferSize, "%.*g", FLT_DIG+3, value);
// Should never overflow; see above.
GOOGLE_DCHECK(snprintf_result > 0 && snprintf_result < kFloatToBufferSize);
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h b/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h
index cd4a93d49e..06610ccfd6 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h
@@ -153,7 +153,7 @@ inline TProtoStringType StripSuffixString(const TProtoStringType& str,
}
// ----------------------------------------------------------------------
-// ReplaceCharacters
+// ReplaceCharacters
// Replaces any occurrence of the character 'remove' (or the characters
// in 'remove') with the character 'replacewith'.
// Good for keeping html characters or protocol characters (\t) out
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/substitute.cc b/contrib/libs/protobuf/src/google/protobuf/stubs/substitute.cc
index 7e2c4a5bb7..bd2ccd2588 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/substitute.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/substitute.cc
@@ -113,9 +113,9 @@ void SubstituteAndAppend(TProtoStringType* output, const char* format,
for (int i = 0; format[i] != '\0'; i++) {
if (format[i] == '$') {
if (ascii_isdigit(format[i+1])) {
- unsigned int index = format[i+1] - '0';
- assert(index < 10);
- const SubstituteArg* src = args_array[index];
+ unsigned int index = format[i+1] - '0';
+ assert(index < 10);
+ const SubstituteArg* src = args_array[index];
memcpy(target, src->data(), src->size());
target += src->size();
++i; // Skip next char.
diff --git a/contrib/libs/protobuf/src/google/protobuf/text_format.cc b/contrib/libs/protobuf/src/google/protobuf/text_format.cc
index 903ad4051e..93a2ea8ed3 100644
--- a/contrib/libs/protobuf/src/google/protobuf/text_format.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/text_format.cc
@@ -395,7 +395,7 @@ class TextFormat::Parser::ParserImpl {
const Descriptor* descriptor = message->GetDescriptor();
TProtoStringType field_name;
- bool reserved_field = false;
+ bool reserved_field = false;
const FieldDescriptor* field = nullptr;
int start_line = tokenizer_.current().line;
int start_column = tokenizer_.current().column;
@@ -419,16 +419,16 @@ class TextFormat::Parser::ParserImpl {
return false;
}
DO(ConsumeAnyValue(value_descriptor, &serialized_value));
- if (singular_overwrite_policy_ == FORBID_SINGULAR_OVERWRITES) {
- // Fail if any_type_url_field has already been specified.
- if ((!any_type_url_field->is_repeated() &&
- reflection->HasField(*message, any_type_url_field)) ||
- (!any_value_field->is_repeated() &&
- reflection->HasField(*message, any_value_field))) {
- ReportError("Non-repeated Any specified multiple times.");
- return false;
- }
- }
+ if (singular_overwrite_policy_ == FORBID_SINGULAR_OVERWRITES) {
+ // Fail if any_type_url_field has already been specified.
+ if ((!any_type_url_field->is_repeated() &&
+ reflection->HasField(*message, any_type_url_field)) ||
+ (!any_value_field->is_repeated() &&
+ reflection->HasField(*message, any_value_field))) {
+ ReportError("Non-repeated Any specified multiple times.");
+ return false;
+ }
+ }
reflection->SetString(message, any_type_url_field,
TProtoStringType(prefix + full_type_name));
reflection->SetString(message, any_value_field, serialized_value);
@@ -465,8 +465,8 @@ class TextFormat::Parser::ParserImpl {
? finder_->FindExtensionByNumber(descriptor, field_number)
: DefaultFinderFindExtensionByNumber(descriptor,
field_number);
- } else if (descriptor->IsReservedNumber(field_number)) {
- reserved_field = true;
+ } else if (descriptor->IsReservedNumber(field_number)) {
+ reserved_field = true;
} else {
field = descriptor->FindFieldByNumber(field_number);
}
@@ -496,10 +496,10 @@ class TextFormat::Parser::ParserImpl {
LowerString(&lower_field_name);
field = descriptor->FindFieldByLowercaseName(lower_field_name);
}
-
+
if (field == nullptr) {
- reserved_field = descriptor->IsReservedName(field_name);
- }
+ reserved_field = descriptor->IsReservedName(field_name);
+ }
}
if (field == nullptr && !reserved_field) {
@@ -514,10 +514,10 @@ class TextFormat::Parser::ParserImpl {
}
}
- // Skips unknown or reserved fields.
+ // Skips unknown or reserved fields.
if (field == nullptr) {
GOOGLE_CHECK(allow_unknown_field_ || allow_unknown_extension_ || reserved_field);
-
+
// Try to guess the type of this field.
// If this field is not a message, there should be a ":" between the
// field name and the field value and also the field value should not
@@ -563,38 +563,38 @@ class TextFormat::Parser::ParserImpl {
// Perform special handling for embedded message types.
if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
// ':' is optional here.
- bool consumed_semicolon = TryConsume(":");
+ bool consumed_semicolon = TryConsume(":");
if (consumed_semicolon && field->options().weak() &&
LookingAtType(io::Tokenizer::TYPE_STRING)) {
- // we are getting a bytes string for a weak field.
+ // we are getting a bytes string for a weak field.
TProtoStringType tmp;
- DO(ConsumeString(&tmp));
+ DO(ConsumeString(&tmp));
MessageFactory* factory =
finder_ ? finder_->FindExtensionFactory(field) : nullptr;
reflection->MutableMessage(message, field, factory)
->ParseFromString(tmp);
- goto label_skip_parsing;
- }
+ goto label_skip_parsing;
+ }
} else {
// ':' is required here.
DO(Consume(":"));
}
if (field->is_repeated() && TryConsume("[")) {
- // Short repeated format, e.g. "foo: [1, 2, 3]".
- if (!TryConsume("]")) {
- // "foo: []" is treated as empty.
- while (true) {
- if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
- // Perform special handling for embedded message types.
- DO(ConsumeFieldMessage(message, reflection, field));
- } else {
- DO(ConsumeFieldValue(message, reflection, field));
- }
- if (TryConsume("]")) {
- break;
- }
- DO(Consume(","));
+ // Short repeated format, e.g. "foo: [1, 2, 3]".
+ if (!TryConsume("]")) {
+ // "foo: []" is treated as empty.
+ while (true) {
+ if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
+ // Perform special handling for embedded message types.
+ DO(ConsumeFieldMessage(message, reflection, field));
+ } else {
+ DO(ConsumeFieldValue(message, reflection, field));
+ }
+ if (TryConsume("]")) {
+ break;
+ }
+ DO(Consume(","));
}
}
} else if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
@@ -1243,8 +1243,8 @@ class TextFormat::Parser::ParserImpl {
// ===========================================================================
// Internal class for writing text to the io::ZeroCopyOutputStream. Adapted
// from the Printer found in //net/proto2/io/public/printer.h
-class TextFormat::Printer::TextGenerator
- : public TextFormat::BaseTextGenerator {
+class TextFormat::Printer::TextGenerator
+ : public TextFormat::BaseTextGenerator {
public:
explicit TextGenerator(io::ZeroCopyOutputStream* output,
int initial_indent_level)
@@ -1289,7 +1289,7 @@ class TextFormat::Printer::TextGenerator
return;
}
- --indent_level_;
+ --indent_level_;
}
size_t GetCurrentIndentationSize() const override {
@@ -1298,24 +1298,24 @@ class TextFormat::Printer::TextGenerator
// Print text to the output stream.
void Print(const char* text, size_t size) override {
- if (indent_level_ > 0) {
- size_t pos = 0; // The number of bytes we've written so far.
- for (size_t i = 0; i < size; i++) {
- if (text[i] == '\n') {
- // Saw newline. If there is more text, we may need to insert an
- // indent here. So, write what we have so far, including the '\n'.
- Write(text + pos, i - pos + 1);
- pos = i + 1;
-
- // Setting this true will cause the next Write() to insert an indent
- // first.
- at_start_of_line_ = true;
- }
- }
- // Write the rest.
- Write(text + pos, size - pos);
- } else {
- Write(text, size);
+ if (indent_level_ > 0) {
+ size_t pos = 0; // The number of bytes we've written so far.
+ for (size_t i = 0; i < size; i++) {
+ if (text[i] == '\n') {
+ // Saw newline. If there is more text, we may need to insert an
+ // indent here. So, write what we have so far, including the '\n'.
+ Write(text + pos, i - pos + 1);
+ pos = i + 1;
+
+ // Setting this true will cause the next Write() to insert an indent
+ // first.
+ at_start_of_line_ = true;
+ }
+ }
+ // Write the rest.
+ Write(text + pos, size - pos);
+ } else {
+ Write(text, size);
if (size > 0 && text[size - 1] == '\n') {
at_start_of_line_ = true;
}
@@ -1353,7 +1353,7 @@ class TextFormat::Printer::TextGenerator
if (at_start_of_line_) {
// Insert an indent.
at_start_of_line_ = false;
- WriteIndent();
+ WriteIndent();
if (failed_) return;
}
@@ -1377,32 +1377,32 @@ class TextFormat::Printer::TextGenerator
buffer_size_ -= size;
}
- void WriteIndent() {
+ void WriteIndent() {
if (indent_level_ == 0) {
return;
}
- GOOGLE_DCHECK(!failed_);
+ GOOGLE_DCHECK(!failed_);
int size = GetCurrentIndentationSize();
-
- while (size > buffer_size_) {
- // Data exceeds space in the buffer. Write what we can and request a new
- // buffer.
- if (buffer_size_ > 0) {
+
+ while (size > buffer_size_) {
+ // Data exceeds space in the buffer. Write what we can and request a new
+ // buffer.
+ if (buffer_size_ > 0) {
memset(buffer_, ' ', buffer_size_);
}
size -= buffer_size_;
- void* void_buffer;
- failed_ = !output_->Next(&void_buffer, &buffer_size_);
- if (failed_) return;
- buffer_ = reinterpret_cast<char*>(void_buffer);
- }
-
- // Buffer is big enough to receive the data; copy it.
- memset(buffer_, ' ', size);
- buffer_ += size;
- buffer_size_ -= size;
- }
-
+ void* void_buffer;
+ failed_ = !output_->Next(&void_buffer, &buffer_size_);
+ if (failed_) return;
+ buffer_ = reinterpret_cast<char*>(void_buffer);
+ }
+
+ // Buffer is big enough to receive the data; copy it.
+ memset(buffer_, ' ', size);
+ buffer_ += size;
+ buffer_size_ -= size;
+ }
+
// Return the current value of insert_silent_marker_. If it is true, set it
// to false as we assume that a silent marker is inserted after a call to this
// function.
@@ -1423,7 +1423,7 @@ class TextFormat::Printer::TextGenerator
// marker has been inserted.
bool insert_silent_marker_;
- int indent_level_;
+ int indent_level_;
int initial_indent_level_;
};
@@ -1547,7 +1547,7 @@ bool TextFormat::Parser::ParseFromString(ConstStringParam input,
return Parse(&input_stream, output);
}
-
+
bool TextFormat::Parser::Merge(io::ZeroCopyInputStream* input,
Message* output) {
ParserImpl parser(output->GetDescriptor(), input, error_collector_, finder_,
@@ -1566,7 +1566,7 @@ bool TextFormat::Parser::MergeFromString(ConstStringParam input,
return Merge(&input_stream, output);
}
-
+
bool TextFormat::Parser::MergeUsingImpl(io::ZeroCopyInputStream* /* input */,
Message* output,
ParserImpl* parser_impl) {
@@ -1615,78 +1615,78 @@ bool TextFormat::Parser::ParseFieldValueFromString(const TProtoStringType& input
return Parser().MergeFromString(input, output);
}
-
+
#undef DO
// ===========================================================================
-TextFormat::BaseTextGenerator::~BaseTextGenerator() {}
-
-namespace {
-
-// A BaseTextGenerator that writes to a string.
-class StringBaseTextGenerator : public TextFormat::BaseTextGenerator {
- public:
+TextFormat::BaseTextGenerator::~BaseTextGenerator() {}
+
+namespace {
+
+// A BaseTextGenerator that writes to a string.
+class StringBaseTextGenerator : public TextFormat::BaseTextGenerator {
+ public:
void Print(const char* text, size_t size) override {
output_.append(text, size);
}
-
-// Some compilers do not support ref-qualifiers even in C++11 mode.
-// Disable the optimization for now and revisit it later.
+
+// Some compilers do not support ref-qualifiers even in C++11 mode.
+// Disable the optimization for now and revisit it later.
#if 0 // LANG_CXX11
TProtoStringType Consume() && { return std::move(output_); }
#else // !LANG_CXX11
const TProtoStringType& Get() { return output_; }
-#endif // LANG_CXX11
-
- private:
+#endif // LANG_CXX11
+
+ private:
TProtoStringType output_;
-};
-
-} // namespace
-
-// The default implementation for FieldValuePrinter. We just delegate the
-// implementation to the default FastFieldValuePrinter to avoid duplicating the
-// logic.
+};
+
+} // namespace
+
+// The default implementation for FieldValuePrinter. We just delegate the
+// implementation to the default FastFieldValuePrinter to avoid duplicating the
+// logic.
TextFormat::FieldValuePrinter::FieldValuePrinter() {}
TextFormat::FieldValuePrinter::~FieldValuePrinter() {}
-
+
#if 0 // LANG_CXX11
-#define FORWARD_IMPL(fn, ...) \
- StringBaseTextGenerator generator; \
- delegate_.fn(__VA_ARGS__, &generator); \
- return std::move(generator).Consume()
-#else // !LANG_CXX11
-#define FORWARD_IMPL(fn, ...) \
- StringBaseTextGenerator generator; \
- delegate_.fn(__VA_ARGS__, &generator); \
- return generator.Get()
-#endif // LANG_CXX11
-
+#define FORWARD_IMPL(fn, ...) \
+ StringBaseTextGenerator generator; \
+ delegate_.fn(__VA_ARGS__, &generator); \
+ return std::move(generator).Consume()
+#else // !LANG_CXX11
+#define FORWARD_IMPL(fn, ...) \
+ StringBaseTextGenerator generator; \
+ delegate_.fn(__VA_ARGS__, &generator); \
+ return generator.Get()
+#endif // LANG_CXX11
+
TProtoStringType TextFormat::FieldValuePrinter::PrintBool(bool val) const {
- FORWARD_IMPL(PrintBool, val);
+ FORWARD_IMPL(PrintBool, val);
}
TProtoStringType TextFormat::FieldValuePrinter::PrintInt32(int32 val) const {
- FORWARD_IMPL(PrintInt32, val);
+ FORWARD_IMPL(PrintInt32, val);
}
TProtoStringType TextFormat::FieldValuePrinter::PrintUInt32(uint32 val) const {
- FORWARD_IMPL(PrintUInt32, val);
+ FORWARD_IMPL(PrintUInt32, val);
}
TProtoStringType TextFormat::FieldValuePrinter::PrintInt64(int64 val) const {
- FORWARD_IMPL(PrintInt64, val);
+ FORWARD_IMPL(PrintInt64, val);
}
TProtoStringType TextFormat::FieldValuePrinter::PrintUInt64(uint64 val) const {
- FORWARD_IMPL(PrintUInt64, val);
+ FORWARD_IMPL(PrintUInt64, val);
}
TProtoStringType TextFormat::FieldValuePrinter::PrintFloat(float val) const {
- FORWARD_IMPL(PrintFloat, val);
+ FORWARD_IMPL(PrintFloat, val);
}
TProtoStringType TextFormat::FieldValuePrinter::PrintDouble(double val) const {
- FORWARD_IMPL(PrintDouble, val);
+ FORWARD_IMPL(PrintDouble, val);
}
TProtoStringType TextFormat::FieldValuePrinter::PrintString(
const TProtoStringType& val) const {
- FORWARD_IMPL(PrintString, val);
+ FORWARD_IMPL(PrintString, val);
}
TProtoStringType TextFormat::FieldValuePrinter::PrintBytes(
const TProtoStringType& val) const {
@@ -1694,173 +1694,173 @@ TProtoStringType TextFormat::FieldValuePrinter::PrintBytes(
}
TProtoStringType TextFormat::FieldValuePrinter::PrintEnum(
int32 val, const TProtoStringType& name) const {
- FORWARD_IMPL(PrintEnum, val, name);
+ FORWARD_IMPL(PrintEnum, val, name);
}
TProtoStringType TextFormat::FieldValuePrinter::PrintFieldName(
const Message& message, const Reflection* reflection,
const FieldDescriptor* field) const {
- FORWARD_IMPL(PrintFieldName, message, reflection, field);
+ FORWARD_IMPL(PrintFieldName, message, reflection, field);
}
TProtoStringType TextFormat::FieldValuePrinter::PrintMessageStart(
const Message& message, int field_index, int field_count,
bool single_line_mode) const {
- FORWARD_IMPL(PrintMessageStart, message, field_index, field_count,
- single_line_mode);
+ FORWARD_IMPL(PrintMessageStart, message, field_index, field_count,
+ single_line_mode);
}
TProtoStringType TextFormat::FieldValuePrinter::PrintMessageEnd(
const Message& message, int field_index, int field_count,
bool single_line_mode) const {
- FORWARD_IMPL(PrintMessageEnd, message, field_index, field_count,
- single_line_mode);
-}
-#undef FORWARD_IMPL
-
-TextFormat::FastFieldValuePrinter::FastFieldValuePrinter() {}
-TextFormat::FastFieldValuePrinter::~FastFieldValuePrinter() {}
-void TextFormat::FastFieldValuePrinter::PrintBool(
- bool val, BaseTextGenerator* generator) const {
- if (val) {
- generator->PrintLiteral("true");
- } else {
- generator->PrintLiteral("false");
- }
-}
-void TextFormat::FastFieldValuePrinter::PrintInt32(
- int32 val, BaseTextGenerator* generator) const {
+ FORWARD_IMPL(PrintMessageEnd, message, field_index, field_count,
+ single_line_mode);
+}
+#undef FORWARD_IMPL
+
+TextFormat::FastFieldValuePrinter::FastFieldValuePrinter() {}
+TextFormat::FastFieldValuePrinter::~FastFieldValuePrinter() {}
+void TextFormat::FastFieldValuePrinter::PrintBool(
+ bool val, BaseTextGenerator* generator) const {
+ if (val) {
+ generator->PrintLiteral("true");
+ } else {
+ generator->PrintLiteral("false");
+ }
+}
+void TextFormat::FastFieldValuePrinter::PrintInt32(
+ int32 val, BaseTextGenerator* generator) const {
generator->PrintString(StrCat(val));
-}
-void TextFormat::FastFieldValuePrinter::PrintUInt32(
- uint32 val, BaseTextGenerator* generator) const {
+}
+void TextFormat::FastFieldValuePrinter::PrintUInt32(
+ uint32 val, BaseTextGenerator* generator) const {
generator->PrintString(StrCat(val));
-}
-void TextFormat::FastFieldValuePrinter::PrintInt64(
- int64 val, BaseTextGenerator* generator) const {
+}
+void TextFormat::FastFieldValuePrinter::PrintInt64(
+ int64 val, BaseTextGenerator* generator) const {
generator->PrintString(StrCat(val));
-}
-void TextFormat::FastFieldValuePrinter::PrintUInt64(
- uint64 val, BaseTextGenerator* generator) const {
+}
+void TextFormat::FastFieldValuePrinter::PrintUInt64(
+ uint64 val, BaseTextGenerator* generator) const {
generator->PrintString(StrCat(val));
-}
-void TextFormat::FastFieldValuePrinter::PrintFloat(
- float val, BaseTextGenerator* generator) const {
+}
+void TextFormat::FastFieldValuePrinter::PrintFloat(
+ float val, BaseTextGenerator* generator) const {
generator->PrintString(!std::isnan(val) ? SimpleFtoa(val) : "nan");
-}
-void TextFormat::FastFieldValuePrinter::PrintDouble(
- double val, BaseTextGenerator* generator) const {
+}
+void TextFormat::FastFieldValuePrinter::PrintDouble(
+ double val, BaseTextGenerator* generator) const {
generator->PrintString(!std::isnan(val) ? SimpleDtoa(val) : "nan");
-}
-void TextFormat::FastFieldValuePrinter::PrintEnum(
+}
+void TextFormat::FastFieldValuePrinter::PrintEnum(
int32 val, const TProtoStringType& name, BaseTextGenerator* generator) const {
- generator->PrintString(name);
-}
-
-void TextFormat::FastFieldValuePrinter::PrintString(
+ generator->PrintString(name);
+}
+
+void TextFormat::FastFieldValuePrinter::PrintString(
const TProtoStringType& val, BaseTextGenerator* generator) const {
- generator->PrintLiteral("\"");
- generator->PrintString(CEscape(val));
- generator->PrintLiteral("\"");
-}
-void TextFormat::FastFieldValuePrinter::PrintBytes(
+ generator->PrintLiteral("\"");
+ generator->PrintString(CEscape(val));
+ generator->PrintLiteral("\"");
+}
+void TextFormat::FastFieldValuePrinter::PrintBytes(
const TProtoStringType& val, BaseTextGenerator* generator) const {
- PrintString(val, generator);
-}
-void TextFormat::FastFieldValuePrinter::PrintFieldName(
+ PrintString(val, generator);
+}
+void TextFormat::FastFieldValuePrinter::PrintFieldName(
const Message& message, int field_index, int field_count,
const Reflection* reflection, const FieldDescriptor* field,
BaseTextGenerator* generator) const {
PrintFieldName(message, reflection, field, generator);
}
void TextFormat::FastFieldValuePrinter::PrintFieldName(
- const Message& message, const Reflection* reflection,
- const FieldDescriptor* field, BaseTextGenerator* generator) const {
- if (field->is_extension()) {
- generator->PrintLiteral("[");
+ const Message& message, const Reflection* reflection,
+ const FieldDescriptor* field, BaseTextGenerator* generator) const {
+ if (field->is_extension()) {
+ generator->PrintLiteral("[");
generator->PrintString(field->PrintableNameForExtension());
- generator->PrintLiteral("]");
- } else if (field->type() == FieldDescriptor::TYPE_GROUP) {
- // Groups must be serialized with their original capitalization.
- generator->PrintString(field->message_type()->name());
- } else {
- generator->PrintString(field->name());
- }
-}
-void TextFormat::FastFieldValuePrinter::PrintMessageStart(
- const Message& message, int field_index, int field_count,
- bool single_line_mode, BaseTextGenerator* generator) const {
- if (single_line_mode) {
- generator->PrintLiteral(" { ");
- } else {
- generator->PrintLiteral(" {\n");
- }
-}
+ generator->PrintLiteral("]");
+ } else if (field->type() == FieldDescriptor::TYPE_GROUP) {
+ // Groups must be serialized with their original capitalization.
+ generator->PrintString(field->message_type()->name());
+ } else {
+ generator->PrintString(field->name());
+ }
+}
+void TextFormat::FastFieldValuePrinter::PrintMessageStart(
+ const Message& message, int field_index, int field_count,
+ bool single_line_mode, BaseTextGenerator* generator) const {
+ if (single_line_mode) {
+ generator->PrintLiteral(" { ");
+ } else {
+ generator->PrintLiteral(" {\n");
+ }
+}
bool TextFormat::FastFieldValuePrinter::PrintMessageContent(
const Message& message, int field_index, int field_count,
bool single_line_mode, BaseTextGenerator* generator) const {
return false; // Use the default printing function.
}
-void TextFormat::FastFieldValuePrinter::PrintMessageEnd(
- const Message& message, int field_index, int field_count,
- bool single_line_mode, BaseTextGenerator* generator) const {
- if (single_line_mode) {
- generator->PrintLiteral("} ");
- } else {
- generator->PrintLiteral("}\n");
- }
-}
-
+void TextFormat::FastFieldValuePrinter::PrintMessageEnd(
+ const Message& message, int field_index, int field_count,
+ bool single_line_mode, BaseTextGenerator* generator) const {
+ if (single_line_mode) {
+ generator->PrintLiteral("} ");
+ } else {
+ generator->PrintLiteral("}\n");
+ }
+}
+
namespace {
-
-// A legacy compatibility wrapper. Takes ownership of the delegate.
-class FieldValuePrinterWrapper : public TextFormat::FastFieldValuePrinter {
- public:
- explicit FieldValuePrinterWrapper(
- const TextFormat::FieldValuePrinter* delegate)
- : delegate_(delegate) {}
-
- void SetDelegate(const TextFormat::FieldValuePrinter* delegate) {
- delegate_.reset(delegate);
- }
-
+
+// A legacy compatibility wrapper. Takes ownership of the delegate.
+class FieldValuePrinterWrapper : public TextFormat::FastFieldValuePrinter {
+ public:
+ explicit FieldValuePrinterWrapper(
+ const TextFormat::FieldValuePrinter* delegate)
+ : delegate_(delegate) {}
+
+ void SetDelegate(const TextFormat::FieldValuePrinter* delegate) {
+ delegate_.reset(delegate);
+ }
+
void PrintBool(bool val,
TextFormat::BaseTextGenerator* generator) const override {
- generator->PrintString(delegate_->PrintBool(val));
- }
+ generator->PrintString(delegate_->PrintBool(val));
+ }
void PrintInt32(int32 val,
TextFormat::BaseTextGenerator* generator) const override {
- generator->PrintString(delegate_->PrintInt32(val));
- }
+ generator->PrintString(delegate_->PrintInt32(val));
+ }
void PrintUInt32(uint32 val,
TextFormat::BaseTextGenerator* generator) const override {
- generator->PrintString(delegate_->PrintUInt32(val));
- }
+ generator->PrintString(delegate_->PrintUInt32(val));
+ }
void PrintInt64(int64 val,
TextFormat::BaseTextGenerator* generator) const override {
- generator->PrintString(delegate_->PrintInt64(val));
- }
+ generator->PrintString(delegate_->PrintInt64(val));
+ }
void PrintUInt64(uint64 val,
TextFormat::BaseTextGenerator* generator) const override {
- generator->PrintString(delegate_->PrintUInt64(val));
- }
+ generator->PrintString(delegate_->PrintUInt64(val));
+ }
void PrintFloat(float val,
TextFormat::BaseTextGenerator* generator) const override {
- generator->PrintString(delegate_->PrintFloat(val));
- }
+ generator->PrintString(delegate_->PrintFloat(val));
+ }
void PrintDouble(double val,
TextFormat::BaseTextGenerator* generator) const override {
- generator->PrintString(delegate_->PrintDouble(val));
- }
+ generator->PrintString(delegate_->PrintDouble(val));
+ }
void PrintString(const TProtoStringType& val,
TextFormat::BaseTextGenerator* generator) const override {
- generator->PrintString(delegate_->PrintString(val));
- }
+ generator->PrintString(delegate_->PrintString(val));
+ }
void PrintBytes(const TProtoStringType& val,
TextFormat::BaseTextGenerator* generator) const override {
- generator->PrintString(delegate_->PrintBytes(val));
- }
+ generator->PrintString(delegate_->PrintBytes(val));
+ }
void PrintEnum(int32 val, const TProtoStringType& name,
TextFormat::BaseTextGenerator* generator) const override {
- generator->PrintString(delegate_->PrintEnum(val, name));
- }
+ generator->PrintString(delegate_->PrintEnum(val, name));
+ }
void PrintFieldName(const Message& message, int field_index, int field_count,
const Reflection* reflection,
const FieldDescriptor* field,
@@ -1868,31 +1868,31 @@ class FieldValuePrinterWrapper : public TextFormat::FastFieldValuePrinter {
generator->PrintString(
delegate_->PrintFieldName(message, reflection, field));
}
- void PrintFieldName(const Message& message, const Reflection* reflection,
- const FieldDescriptor* field,
+ void PrintFieldName(const Message& message, const Reflection* reflection,
+ const FieldDescriptor* field,
TextFormat::BaseTextGenerator* generator) const override {
- generator->PrintString(
- delegate_->PrintFieldName(message, reflection, field));
- }
+ generator->PrintString(
+ delegate_->PrintFieldName(message, reflection, field));
+ }
void PrintMessageStart(
const Message& message, int field_index, int field_count,
bool single_line_mode,
TextFormat::BaseTextGenerator* generator) const override {
- generator->PrintString(delegate_->PrintMessageStart(
- message, field_index, field_count, single_line_mode));
- }
+ generator->PrintString(delegate_->PrintMessageStart(
+ message, field_index, field_count, single_line_mode));
+ }
void PrintMessageEnd(
const Message& message, int field_index, int field_count,
bool single_line_mode,
TextFormat::BaseTextGenerator* generator) const override {
- generator->PrintString(delegate_->PrintMessageEnd(
- message, field_index, field_count, single_line_mode));
- }
-
- private:
+ generator->PrintString(delegate_->PrintMessageEnd(
+ message, field_index, field_count, single_line_mode));
+ }
+
+ private:
std::unique_ptr<const TextFormat::FieldValuePrinter> delegate_;
-};
-
+};
+
} // namespace
const char* const TextFormat::Printer::kDoNotParse =
@@ -1913,39 +1913,39 @@ TextFormat::Printer::Printer()
}
void TextFormat::Printer::SetUseUtf8StringEscaping(bool as_utf8) {
- SetDefaultFieldValuePrinter(as_utf8 ? new FastFieldValuePrinterUtf8Escaping()
+ SetDefaultFieldValuePrinter(as_utf8 ? new FastFieldValuePrinterUtf8Escaping()
: new DebugStringFieldValuePrinter());
}
void TextFormat::Printer::SetDefaultFieldValuePrinter(
const FieldValuePrinter* printer) {
- default_field_value_printer_.reset(new FieldValuePrinterWrapper(printer));
-}
-
-void TextFormat::Printer::SetDefaultFieldValuePrinter(
- const FastFieldValuePrinter* printer) {
+ default_field_value_printer_.reset(new FieldValuePrinterWrapper(printer));
+}
+
+void TextFormat::Printer::SetDefaultFieldValuePrinter(
+ const FastFieldValuePrinter* printer) {
default_field_value_printer_.reset(printer);
}
bool TextFormat::Printer::RegisterFieldValuePrinter(
const FieldDescriptor* field, const FieldValuePrinter* printer) {
if (field == nullptr || printer == nullptr) {
- return false;
- }
+ return false;
+ }
std::unique_ptr<FieldValuePrinterWrapper> wrapper(
new FieldValuePrinterWrapper(nullptr));
auto pair = custom_printers_.insert(std::make_pair(field, nullptr));
if (pair.second) {
- wrapper->SetDelegate(printer);
+ wrapper->SetDelegate(printer);
pair.first->second = std::move(wrapper);
- return true;
- } else {
- return false;
- }
-}
-
-bool TextFormat::Printer::RegisterFieldValuePrinter(
- const FieldDescriptor* field, const FastFieldValuePrinter* printer) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+bool TextFormat::Printer::RegisterFieldValuePrinter(
+ const FieldDescriptor* field, const FastFieldValuePrinter* printer) {
if (field == nullptr || printer == nullptr) {
return false;
}
@@ -1996,7 +1996,7 @@ bool TextFormat::Printer::Print(const Message& message,
io::ZeroCopyOutputStream* output) const {
TextGenerator generator(output, insert_silent_marker_, initial_indent_level_);
- Print(message, &generator);
+ Print(message, &generator);
// Output false if the generator failed internally.
return !generator.failed();
@@ -2038,7 +2038,7 @@ struct FieldIndexSorter {
} // namespace
bool TextFormat::Printer::PrintAny(const Message& message,
- TextGenerator* generator) const {
+ TextGenerator* generator) const {
const FieldDescriptor* type_url_field;
const FieldDescriptor* value_field;
if (!internal::GetAnyFieldDescriptors(message, &type_url_field,
@@ -2073,20 +2073,20 @@ bool TextFormat::Printer::PrintAny(const Message& message,
GOOGLE_LOG(WARNING) << type_url << ": failed to parse contents";
return false;
}
- generator->PrintLiteral("[");
- generator->PrintString(type_url);
- generator->PrintLiteral("]");
+ generator->PrintLiteral("[");
+ generator->PrintString(type_url);
+ generator->PrintLiteral("]");
const FastFieldValuePrinter* printer = GetFieldPrinter(value_field);
- printer->PrintMessageStart(message, -1, 0, single_line_mode_, generator);
- generator->Indent();
+ printer->PrintMessageStart(message, -1, 0, single_line_mode_, generator);
+ generator->Indent();
Print(*value_message, generator);
- generator->Outdent();
- printer->PrintMessageEnd(message, -1, 0, single_line_mode_, generator);
+ generator->Outdent();
+ printer->PrintMessageEnd(message, -1, 0, single_line_mode_, generator);
return true;
}
void TextFormat::Printer::Print(const Message& message,
- TextGenerator* generator) const {
+ TextGenerator* generator) const {
const Reflection* reflection = message.GetReflection();
if (!reflection) {
// This message does not provide any way to describe its structure.
@@ -2143,7 +2143,7 @@ void TextFormat::Printer::PrintFieldValueToString(const Message& message,
io::StringOutputStream output_stream(output);
TextGenerator generator(&output_stream, initial_indent_level_);
- PrintFieldValue(message, message.GetReflection(), field, index, &generator);
+ PrintFieldValue(message, message.GetReflection(), field, index, &generator);
}
class MapEntryMessageComparator {
@@ -2324,7 +2324,7 @@ void MapFieldPrinterHelper::CopyValue(const MapValueRef& value,
void TextFormat::Printer::PrintField(const Message& message,
const Reflection* reflection,
const FieldDescriptor* field,
- TextGenerator* generator) const {
+ TextGenerator* generator) const {
if (use_short_repeated_primitives_ && field->is_repeated() &&
field->cpp_type() != FieldDescriptor::CPPTYPE_STRING &&
field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) {
@@ -2344,7 +2344,7 @@ void TextFormat::Printer::PrintField(const Message& message,
std::vector<const Message*> sorted_map_field;
bool need_release = false;
bool is_map = field->is_map();
- if (is_map) {
+ if (is_map) {
need_release = internal::MapFieldPrinterHelper::SortMap(
message, reflection, field, &sorted_map_field);
}
@@ -2359,26 +2359,26 @@ void TextFormat::Printer::PrintField(const Message& message,
const Message& sub_message =
field->is_repeated()
? (is_map ? *sorted_map_field[j]
- : reflection->GetRepeatedMessage(message, field, j))
+ : reflection->GetRepeatedMessage(message, field, j))
: reflection->GetMessage(message, field);
- printer->PrintMessageStart(sub_message, field_index, count,
- single_line_mode_, generator);
- generator->Indent();
+ printer->PrintMessageStart(sub_message, field_index, count,
+ single_line_mode_, generator);
+ generator->Indent();
if (!printer->PrintMessageContent(sub_message, field_index, count,
single_line_mode_, generator)) {
Print(sub_message, generator);
}
- generator->Outdent();
- printer->PrintMessageEnd(sub_message, field_index, count,
- single_line_mode_, generator);
+ generator->Outdent();
+ printer->PrintMessageEnd(sub_message, field_index, count,
+ single_line_mode_, generator);
} else {
generator->PrintMaybeWithMarker(": ");
// Write the field value.
PrintFieldValue(message, reflection, field, field_index, generator);
if (single_line_mode_) {
- generator->PrintLiteral(" ");
+ generator->PrintLiteral(" ");
} else {
- generator->PrintLiteral("\n");
+ generator->PrintLiteral("\n");
}
}
}
@@ -2391,21 +2391,21 @@ void TextFormat::Printer::PrintField(const Message& message,
}
void TextFormat::Printer::PrintShortRepeatedField(
- const Message& message, const Reflection* reflection,
- const FieldDescriptor* field, TextGenerator* generator) const {
+ const Message& message, const Reflection* reflection,
+ const FieldDescriptor* field, TextGenerator* generator) const {
// Print primitive repeated field in short form.
int size = reflection->FieldSize(message, field);
PrintFieldName(message, /*field_index=*/-1, /*field_count=*/size, reflection,
field, generator);
generator->PrintMaybeWithMarker(": ", "[");
for (int i = 0; i < size; i++) {
- if (i > 0) generator->PrintLiteral(", ");
+ if (i > 0) generator->PrintLiteral(", ");
PrintFieldValue(message, reflection, field, i, generator);
}
if (single_line_mode_) {
- generator->PrintLiteral("] ");
+ generator->PrintLiteral("] ");
} else {
- generator->PrintLiteral("]\n");
+ generator->PrintLiteral("]\n");
}
}
@@ -2413,7 +2413,7 @@ void TextFormat::Printer::PrintFieldName(const Message& message,
int field_index, int field_count,
const Reflection* reflection,
const FieldDescriptor* field,
- TextGenerator* generator) const {
+ TextGenerator* generator) const {
// if use_field_number_ is true, prints field number instead
// of field name.
if (use_field_number_) {
@@ -2426,25 +2426,25 @@ void TextFormat::Printer::PrintFieldName(const Message& message,
generator);
}
-void TextFormat::Printer::PrintFieldValue(const Message& message,
- const Reflection* reflection,
- const FieldDescriptor* field,
- int index,
- TextGenerator* generator) const {
+void TextFormat::Printer::PrintFieldValue(const Message& message,
+ const Reflection* reflection,
+ const FieldDescriptor* field,
+ int index,
+ TextGenerator* generator) const {
GOOGLE_DCHECK(field->is_repeated() || (index == -1))
<< "Index must be -1 for non-repeated fields";
const FastFieldValuePrinter* printer = GetFieldPrinter(field);
switch (field->cpp_type()) {
-#define OUTPUT_FIELD(CPPTYPE, METHOD) \
- case FieldDescriptor::CPPTYPE_##CPPTYPE: \
- printer->Print##METHOD( \
- field->is_repeated() \
- ? reflection->GetRepeated##METHOD(message, field, index) \
- : reflection->Get##METHOD(message, field), \
- generator); \
- break
+#define OUTPUT_FIELD(CPPTYPE, METHOD) \
+ case FieldDescriptor::CPPTYPE_##CPPTYPE: \
+ printer->Print##METHOD( \
+ field->is_repeated() \
+ ? reflection->GetRepeated##METHOD(message, field, index) \
+ : reflection->Get##METHOD(message, field), \
+ generator); \
+ break
OUTPUT_FIELD(INT32, Int32);
OUTPUT_FIELD(INT64, Int64);
@@ -2472,10 +2472,10 @@ void TextFormat::Printer::PrintFieldValue(const Message& message,
value_to_print = &truncated_value;
}
if (field->type() == FieldDescriptor::TYPE_STRING) {
- printer->PrintString(*value_to_print, generator);
+ printer->PrintString(*value_to_print, generator);
} else {
GOOGLE_DCHECK_EQ(field->type(), FieldDescriptor::TYPE_BYTES);
- printer->PrintString(*value_to_print, generator);
+ printer->PrintString(*value_to_print, generator);
}
break;
}
@@ -2488,7 +2488,7 @@ void TextFormat::Printer::PrintFieldValue(const Message& message,
const EnumValueDescriptor* enum_desc =
field->enum_type()->FindValueByNumber(enum_value);
if (enum_desc != nullptr) {
- printer->PrintEnum(enum_value, enum_desc->name(), generator);
+ printer->PrintEnum(enum_value, enum_desc->name(), generator);
} else {
// Ordinarily, enum_desc should not be null, because proto2 has the
// invariant that set enum field values must be in-range, but with the
@@ -2550,41 +2550,41 @@ void TextFormat::Printer::PrintUnknownFields(
switch (field.type()) {
case UnknownField::TYPE_VARINT:
- generator->PrintString(field_number);
+ generator->PrintString(field_number);
generator->PrintMaybeWithMarker(": ");
generator->PrintString(StrCat(field.varint()));
if (single_line_mode_) {
- generator->PrintLiteral(" ");
+ generator->PrintLiteral(" ");
} else {
- generator->PrintLiteral("\n");
+ generator->PrintLiteral("\n");
}
break;
case UnknownField::TYPE_FIXED32: {
- generator->PrintString(field_number);
+ generator->PrintString(field_number);
generator->PrintMaybeWithMarker(": ", "0x");
- generator->PrintString(
+ generator->PrintString(
StrCat(strings::Hex(field.fixed32(), strings::ZERO_PAD_8)));
if (single_line_mode_) {
- generator->PrintLiteral(" ");
+ generator->PrintLiteral(" ");
} else {
- generator->PrintLiteral("\n");
+ generator->PrintLiteral("\n");
}
break;
}
case UnknownField::TYPE_FIXED64: {
- generator->PrintString(field_number);
+ generator->PrintString(field_number);
generator->PrintMaybeWithMarker(": ", "0x");
- generator->PrintString(
+ generator->PrintString(
StrCat(strings::Hex(field.fixed64(), strings::ZERO_PAD_16)));
if (single_line_mode_) {
- generator->PrintLiteral(" ");
+ generator->PrintLiteral(" ");
} else {
- generator->PrintLiteral("\n");
+ generator->PrintLiteral("\n");
}
break;
}
case UnknownField::TYPE_LENGTH_DELIMITED: {
- generator->PrintString(field_number);
+ generator->PrintString(field_number);
const TProtoStringType& value = field.length_delimited();
// We create a CodedInputStream so that we can adhere to our recursion
// budget when we attempt to parse the data. UnknownFieldSet parsing is
@@ -2601,46 +2601,46 @@ void TextFormat::Printer::PrintUnknownFields(
generator->PrintMaybeWithMarker(" ", "{ ");
} else {
generator->PrintMaybeWithMarker(" ", "{\n");
- generator->Indent();
+ generator->Indent();
}
PrintUnknownFields(embedded_unknown_fields, generator,
recursion_budget - 1);
if (single_line_mode_) {
- generator->PrintLiteral("} ");
+ generator->PrintLiteral("} ");
} else {
- generator->Outdent();
- generator->PrintLiteral("}\n");
+ generator->Outdent();
+ generator->PrintLiteral("}\n");
}
} else {
// This field is not parseable as a Message (or we ran out of
// recursion budget). So it is probably just a plain string.
generator->PrintMaybeWithMarker(": ", "\"");
- generator->PrintString(CEscape(value));
- if (single_line_mode_) {
- generator->PrintLiteral("\" ");
- } else {
- generator->PrintLiteral("\"\n");
- }
+ generator->PrintString(CEscape(value));
+ if (single_line_mode_) {
+ generator->PrintLiteral("\" ");
+ } else {
+ generator->PrintLiteral("\"\n");
+ }
}
break;
}
case UnknownField::TYPE_GROUP:
- generator->PrintString(field_number);
+ generator->PrintString(field_number);
if (single_line_mode_) {
generator->PrintMaybeWithMarker(" ", "{ ");
} else {
generator->PrintMaybeWithMarker(" ", "{\n");
- generator->Indent();
+ generator->Indent();
}
// For groups, we recurse without checking the budget. This is OK,
// because if the groups were too deeply nested then we would have
// already rejected the message when we originally parsed it.
PrintUnknownFields(field.group(), generator, recursion_budget - 1);
if (single_line_mode_) {
- generator->PrintLiteral("} ");
+ generator->PrintLiteral("} ");
} else {
- generator->Outdent();
- generator->PrintLiteral("}\n");
+ generator->Outdent();
+ generator->PrintLiteral("}\n");
}
break;
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/text_format.h b/contrib/libs/protobuf/src/google/protobuf/text_format.h
index 389dbe154e..0b70f0640a 100644
--- a/contrib/libs/protobuf/src/google/protobuf/text_format.h
+++ b/contrib/libs/protobuf/src/google/protobuf/text_format.h
@@ -41,7 +41,7 @@
#include <map>
#include <memory>
#include <string>
-#include <vector>
+#include <vector>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/descriptor.h>
@@ -70,18 +70,18 @@ class ErrorCollector; // tokenizer.h
class PROTOBUF_EXPORT TextFormat {
public:
// Outputs a textual representation of the given message to the given
- // output stream. Returns false if printing fails.
+ // output stream. Returns false if printing fails.
static bool Print(const Message& message, io::ZeroCopyOutputStream* output);
// Print the fields in an UnknownFieldSet. They are printed by tag number
// only. Embedded messages are heuristically identified by attempting to
- // parse them. Returns false if printing fails.
+ // parse them. Returns false if printing fails.
static bool PrintUnknownFields(const UnknownFieldSet& unknown_fields,
io::ZeroCopyOutputStream* output);
// Like Print(), but outputs directly to a string.
- // Note: output will be cleared prior to printing, and will be left empty
- // even if printing fails. Returns false if printing fails.
+ // Note: output will be cleared prior to printing, and will be left empty
+ // even if printing fails. Returns false if printing fails.
static bool PrintToString(const Message& message, TProtoStringType* output);
// Like PrintUnknownFields(), but outputs directly to a string. Returns
@@ -98,57 +98,57 @@ class PROTOBUF_EXPORT TextFormat {
TProtoStringType* output);
class PROTOBUF_EXPORT BaseTextGenerator {
- public:
- virtual ~BaseTextGenerator();
+ public:
+ virtual ~BaseTextGenerator();
virtual void Indent() {}
virtual void Outdent() {}
// Returns the current indentation size in characters.
virtual size_t GetCurrentIndentationSize() const { return 0; }
- // Print text to the output stream.
- virtual void Print(const char* text, size_t size) = 0;
-
+ // Print text to the output stream.
+ virtual void Print(const char* text, size_t size) = 0;
+
void PrintString(const TProtoStringType& str) { Print(str.data(), str.size()); }
-
- template <size_t n>
- void PrintLiteral(const char (&text)[n]) {
- Print(text, n - 1); // n includes the terminating zero character.
- }
- };
-
- // The default printer that converts scalar values from fields into their
- // string representation.
- // You can derive from this FastFieldValuePrinter if you want to have fields
- // to be printed in a different way and register it at the Printer.
+
+ template <size_t n>
+ void PrintLiteral(const char (&text)[n]) {
+ Print(text, n - 1); // n includes the terminating zero character.
+ }
+ };
+
+ // The default printer that converts scalar values from fields into their
+ // string representation.
+ // You can derive from this FastFieldValuePrinter if you want to have fields
+ // to be printed in a different way and register it at the Printer.
class PROTOBUF_EXPORT FastFieldValuePrinter {
- public:
- FastFieldValuePrinter();
- virtual ~FastFieldValuePrinter();
- virtual void PrintBool(bool val, BaseTextGenerator* generator) const;
- virtual void PrintInt32(int32 val, BaseTextGenerator* generator) const;
- virtual void PrintUInt32(uint32 val, BaseTextGenerator* generator) const;
- virtual void PrintInt64(int64 val, BaseTextGenerator* generator) const;
- virtual void PrintUInt64(uint64 val, BaseTextGenerator* generator) const;
- virtual void PrintFloat(float val, BaseTextGenerator* generator) const;
- virtual void PrintDouble(double val, BaseTextGenerator* generator) const;
+ public:
+ FastFieldValuePrinter();
+ virtual ~FastFieldValuePrinter();
+ virtual void PrintBool(bool val, BaseTextGenerator* generator) const;
+ virtual void PrintInt32(int32 val, BaseTextGenerator* generator) const;
+ virtual void PrintUInt32(uint32 val, BaseTextGenerator* generator) const;
+ virtual void PrintInt64(int64 val, BaseTextGenerator* generator) const;
+ virtual void PrintUInt64(uint64 val, BaseTextGenerator* generator) const;
+ virtual void PrintFloat(float val, BaseTextGenerator* generator) const;
+ virtual void PrintDouble(double val, BaseTextGenerator* generator) const;
virtual void PrintString(const TProtoStringType& val,
- BaseTextGenerator* generator) const;
+ BaseTextGenerator* generator) const;
virtual void PrintBytes(const TProtoStringType& val,
- BaseTextGenerator* generator) const;
+ BaseTextGenerator* generator) const;
virtual void PrintEnum(int32 val, const TProtoStringType& name,
- BaseTextGenerator* generator) const;
+ BaseTextGenerator* generator) const;
virtual void PrintFieldName(const Message& message, int field_index,
int field_count, const Reflection* reflection,
const FieldDescriptor* field,
BaseTextGenerator* generator) const;
- virtual void PrintFieldName(const Message& message,
- const Reflection* reflection,
- const FieldDescriptor* field,
- BaseTextGenerator* generator) const;
- virtual void PrintMessageStart(const Message& message, int field_index,
- int field_count, bool single_line_mode,
- BaseTextGenerator* generator) const;
+ virtual void PrintFieldName(const Message& message,
+ const Reflection* reflection,
+ const FieldDescriptor* field,
+ BaseTextGenerator* generator) const;
+ virtual void PrintMessageStart(const Message& message, int field_index,
+ int field_count, bool single_line_mode,
+ BaseTextGenerator* generator) const;
// Allows to override the logic on how to print the content of a message.
// Return false to use the default printing logic. Note that it is legal for
// this function to print something and then return false to use the default
@@ -157,14 +157,14 @@ class PROTOBUF_EXPORT TextFormat {
virtual bool PrintMessageContent(const Message& message, int field_index,
int field_count, bool single_line_mode,
BaseTextGenerator* generator) const;
- virtual void PrintMessageEnd(const Message& message, int field_index,
- int field_count, bool single_line_mode,
- BaseTextGenerator* generator) const;
-
- private:
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FastFieldValuePrinter);
- };
-
+ virtual void PrintMessageEnd(const Message& message, int field_index,
+ int field_count, bool single_line_mode,
+ BaseTextGenerator* generator) const;
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FastFieldValuePrinter);
+ };
+
// Deprecated: please use FastFieldValuePrinter instead.
class PROTOBUF_EXPORT FieldValuePrinter {
public:
@@ -191,7 +191,7 @@ class PROTOBUF_EXPORT TextFormat {
bool single_line_mode) const;
private:
- FastFieldValuePrinter delegate_;
+ FastFieldValuePrinter delegate_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldValuePrinter);
};
@@ -291,13 +291,13 @@ class PROTOBUF_EXPORT TextFormat {
// Set true to output UTF-8 instead of ASCII. The only difference
// is that bytes >= 0x80 in string fields will not be escaped,
// because they are assumed to be part of UTF-8 multi-byte
- // sequences. This will change the default FastFieldValuePrinter.
+ // sequences. This will change the default FastFieldValuePrinter.
void SetUseUtf8StringEscaping(bool as_utf8);
// Set the default FastFieldValuePrinter that is used for all fields that
// don't have a field-specific printer registered.
// Takes ownership of the printer.
- void SetDefaultFieldValuePrinter(const FastFieldValuePrinter* printer);
+ void SetDefaultFieldValuePrinter(const FastFieldValuePrinter* printer);
PROTOBUF_DEPRECATED_MSG("Please use FastFieldValuePrinter")
void SetDefaultFieldValuePrinter(const FieldValuePrinter* printer);
@@ -351,7 +351,7 @@ class PROTOBUF_EXPORT TextFormat {
// already a printer for that FieldDescriptor.
// Takes ownership of the printer on successful registration.
bool RegisterFieldValuePrinter(const FieldDescriptor* field,
- const FastFieldValuePrinter* printer);
+ const FastFieldValuePrinter* printer);
PROTOBUF_DEPRECATED_MSG("Please use FastFieldValuePrinter")
bool RegisterFieldValuePrinter(const FieldDescriptor* field,
@@ -381,31 +381,31 @@ class PROTOBUF_EXPORT TextFormat {
// Internal Print method, used for writing to the OutputStream via
// the TextGenerator class.
- void Print(const Message& message, TextGenerator* generator) const;
+ void Print(const Message& message, TextGenerator* generator) const;
// Print a single field.
- void PrintField(const Message& message, const Reflection* reflection,
+ void PrintField(const Message& message, const Reflection* reflection,
const FieldDescriptor* field,
- TextGenerator* generator) const;
+ TextGenerator* generator) const;
// Print a repeated primitive field in short form.
void PrintShortRepeatedField(const Message& message,
const Reflection* reflection,
const FieldDescriptor* field,
- TextGenerator* generator) const;
+ TextGenerator* generator) const;
// Print the name of a field -- i.e. everything that comes before the
// ':' for a single name/value pair.
void PrintFieldName(const Message& message, int field_index,
int field_count, const Reflection* reflection,
const FieldDescriptor* field,
- TextGenerator* generator) const;
+ TextGenerator* generator) const;
// Outputs a textual representation of the value of the field supplied on
// the message supplied or the default value if not set.
- void PrintFieldValue(const Message& message, const Reflection* reflection,
- const FieldDescriptor* field, int index,
- TextGenerator* generator) const;
+ void PrintFieldValue(const Message& message, const Reflection* reflection,
+ const FieldDescriptor* field, int index,
+ TextGenerator* generator) const;
// Print the fields in an UnknownFieldSet. They are printed by tag number
// only. Embedded messages are heuristically identified by attempting to
@@ -414,7 +414,7 @@ class PROTOBUF_EXPORT TextFormat {
TextGenerator* generator,
int recursion_budget) const;
- bool PrintAny(const Message& message, TextGenerator* generator) const;
+ bool PrintAny(const Message& message, TextGenerator* generator) const;
const FastFieldValuePrinter* GetFieldPrinter(
const FieldDescriptor* field) const {
@@ -436,7 +436,7 @@ class PROTOBUF_EXPORT TextFormat {
std::unique_ptr<const FastFieldValuePrinter> default_field_value_printer_;
typedef std::map<const FieldDescriptor*,
std::unique_ptr<const FastFieldValuePrinter>>
- CustomPrinterMap;
+ CustomPrinterMap;
CustomPrinterMap custom_printers_;
typedef std::map<const Descriptor*, std::unique_ptr<const MessagePrinter>>
@@ -523,7 +523,7 @@ class PROTOBUF_EXPORT TextFormat {
// Defines the map from the index-th field descriptor to the nested parse
// info tree.
- typedef std::map<const FieldDescriptor*,
+ typedef std::map<const FieldDescriptor*,
std::vector<std::unique_ptr<ParseInfoTree>>>
NestedMap;
diff --git a/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.cc b/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.cc
index ac785c02e3..c74a97372f 100644
--- a/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.cc
@@ -28,30 +28,30 @@ struct TimestampDefaultTypeInternal {
union {
Timestamp _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TimestampDefaultTypeInternal _Timestamp_default_instance_;
PROTOBUF_NAMESPACE_CLOSE
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2ftimestamp_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ftimestamp_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ftimestamp_2eproto = nullptr;
-
+
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Timestamp, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Timestamp, seconds_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Timestamp, nanos_),
-};
+};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Timestamp)},
-};
+};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_),
-};
-
+};
+
const char descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\037google/protobuf/timestamp.proto\022\017googl"
"e.protobuf\"+\n\tTimestamp\022\017\n\007seconds\030\001 \001(\003"
@@ -69,8 +69,8 @@ const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2ftimestamp_2eproto;
-}
-
+}
+
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2ftimestamp_2eproto(&descriptor_table_google_2fprotobuf_2ftimestamp_2eproto);
PROTOBUF_NAMESPACE_OPEN
@@ -93,9 +93,9 @@ Timestamp::Timestamp(::PROTOBUF_NAMESPACE_ID::Arena* arena,
Timestamp::Timestamp(const Timestamp& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- ::memcpy(&seconds_, &from.seconds_,
- static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -
- reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
+ ::memcpy(&seconds_, &from.seconds_,
+ static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -
+ reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.Timestamp)
}
@@ -130,12 +130,12 @@ void Timestamp::SetCachedSize(int size) const {
void Timestamp::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Timestamp)
::PROTOBUF_NAMESPACE_ID::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_));
+ // 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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -145,14 +145,14 @@ const char* Timestamp::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // int64 seconds = 1;
+ // int64 seconds = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
- // int32 nanos = 2;
+ // int32 nanos = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -186,15 +186,15 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Timestamp)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // int64 seconds = 1;
+ (void) cached_has_bits;
+
+ // int64 seconds = 1;
if (this->_internal_seconds() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_seconds(), target);
}
- // int32 nanos = 2;
+ // int32 nanos = 2;
if (this->_internal_nanos() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_nanos(), target);
@@ -203,27 +203,27 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Timestamp)
return target;
}
-size_t Timestamp::ByteSizeLong() const {
+size_t Timestamp::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Timestamp)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // int64 seconds = 1;
+ // int64 seconds = 1;
if (this->_internal_seconds() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->_internal_seconds());
}
- // int32 nanos = 2;
+ // int32 nanos = 2;
if (this->_internal_nanos() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
@@ -254,10 +254,10 @@ void Timestamp::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Timestamp::MergeFrom(const Timestamp& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Timestamp)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (from._internal_seconds() != 0) {
_internal_set_seconds(from._internal_seconds());
}
@@ -271,7 +271,7 @@ void Timestamp::CopyFrom(const Timestamp& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Timestamp)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Timestamp::IsInitialized() const {
@@ -279,7 +279,7 @@ bool Timestamp::IsInitialized() const {
}
void Timestamp::InternalSwap(Timestamp* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(Timestamp, nanos_)
diff --git a/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.h b/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.h
index e2a7c38b5c..8ea03e2c45 100644
--- a/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.h
@@ -51,7 +51,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2ftimestamp_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
-};
+};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ftimestamp_2eproto;
PROTOBUF_NAMESPACE_OPEN
class Timestamp;
@@ -82,19 +82,19 @@ class PROTOBUF_EXPORT Timestamp final :
CopyFrom(from);
return *this;
}
- inline Timestamp& operator=(Timestamp&& from) noexcept {
+ inline Timestamp& operator=(Timestamp&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
@@ -104,16 +104,16 @@ class PROTOBUF_EXPORT Timestamp final :
static const Timestamp& default_instance() {
return *internal_default_instance();
}
- static inline const Timestamp* internal_default_instance() {
- return reinterpret_cast<const Timestamp*>(
- &_Timestamp_default_instance_);
- }
+ static inline const Timestamp* internal_default_instance() {
+ return reinterpret_cast<const Timestamp*>(
+ &_Timestamp_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 0;
-
- friend void swap(Timestamp& a, Timestamp& b) {
- a.Swap(&b);
- }
+ 0;
+
+ friend void swap(Timestamp& a, Timestamp& b) {
+ a.Swap(&b);
+ }
inline void Swap(Timestamp* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -183,7 +183,7 @@ class PROTOBUF_EXPORT Timestamp final :
kSecondsFieldNumber = 1,
kNanosFieldNumber = 2,
};
- // int64 seconds = 1;
+ // int64 seconds = 1;
void clear_seconds();
::PROTOBUF_NAMESPACE_ID::int64 seconds() const;
void set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value);
@@ -192,7 +192,7 @@ class PROTOBUF_EXPORT Timestamp final :
void _internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value);
public:
- // int32 nanos = 2;
+ // int32 nanos = 2;
void clear_nanos();
::PROTOBUF_NAMESPACE_ID::int32 nanos() const;
void set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value);
@@ -218,13 +218,13 @@ class PROTOBUF_EXPORT Timestamp final :
// ===================================================================
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
// Timestamp
-// int64 seconds = 1;
+// int64 seconds = 1;
inline void Timestamp::clear_seconds() {
seconds_ = int64_t{0};
}
@@ -244,7 +244,7 @@ inline void Timestamp::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) {
// @@protoc_insertion_point(field_set:google.protobuf.Timestamp.seconds)
}
-// int32 nanos = 2;
+// int32 nanos = 2;
inline void Timestamp::clear_nanos() {
nanos_ = 0;
}
@@ -264,14 +264,14 @@ inline void Timestamp::set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) {
// @@protoc_insertion_point(field_set:google.protobuf.Timestamp.nanos)
}
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_CLOSE
-
+
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protobuf/src/google/protobuf/timestamp.proto b/contrib/libs/protobuf/src/google/protobuf/timestamp.proto
index 287dcfc5f3..3b2df6d911 100644
--- a/contrib/libs/protobuf/src/google/protobuf/timestamp.proto
+++ b/contrib/libs/protobuf/src/google/protobuf/timestamp.proto
@@ -54,8 +54,8 @@ option objc_class_prefix = "GPB";
// restricting to that range, we ensure that we can convert to and from [RFC
// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
//
-// # Examples
-//
+// # Examples
+//
// Example 1: Compute Timestamp from POSIX `time()`.
//
// Timestamp timestamp;
@@ -102,40 +102,40 @@ option objc_class_prefix = "GPB";
//
// Example 6: Compute Timestamp from current time in Python.
//
-// timestamp = Timestamp()
-// timestamp.GetCurrentTime()
+// timestamp = Timestamp()
+// timestamp.GetCurrentTime()
//
-// # JSON Mapping
+// # JSON Mapping
//
-// In JSON format, the Timestamp type is encoded as a string in the
-// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
-// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
-// where {year} is always expressed using four digits while {month}, {day},
-// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
-// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
-// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
+// In JSON format, the Timestamp type is encoded as a string in the
+// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
+// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
+// where {year} is always expressed using four digits while {month}, {day},
+// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
+// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
+// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
// is required. A proto3 JSON serializer should always use UTC (as indicated by
// "Z") when printing the Timestamp type and a proto3 JSON parser should be
// able to accept both UTC and other timezones (as indicated by an offset).
-//
-// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
-// 01:30 UTC on January 15, 2017.
-//
-// In JavaScript, one can convert a Date object to this format using the
+//
+// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
+// 01:30 UTC on January 15, 2017.
+//
+// In JavaScript, one can convert a Date object to this format using the
// standard
// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
-// method. In Python, a standard `datetime.datetime` object can be converted
+// method. In Python, a standard `datetime.datetime` object can be converted
// to this format using
// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
// the Joda Time's [`ISODateTimeFormat.dateTime()`](
// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
// ) to obtain a formatter capable of generating timestamps in this format.
-//
-//
+//
+//
message Timestamp {
// Represents seconds of UTC time since Unix epoch
- // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
+ // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
// 9999-12-31T23:59:59Z inclusive.
int64 seconds = 1;
diff --git a/contrib/libs/protobuf/src/google/protobuf/type.pb.cc b/contrib/libs/protobuf/src/google/protobuf/type.pb.cc
index ebfb263d1d..1de2532e3b 100644
--- a/contrib/libs/protobuf/src/google/protobuf/type.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/type.pb.cc
@@ -45,7 +45,7 @@ constexpr Field::Field(
, kind_(0)
, cardinality_(0)
-
+
, number_(0)
, oneof_index_(0)
, packed_(false){}
@@ -56,7 +56,7 @@ struct FieldDefaultTypeInternal {
union {
Field _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FieldDefaultTypeInternal _Field_default_instance_;
constexpr Enum::Enum(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
@@ -73,7 +73,7 @@ struct EnumDefaultTypeInternal {
union {
Enum _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EnumDefaultTypeInternal _Enum_default_instance_;
constexpr EnumValue::EnumValue(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
@@ -87,7 +87,7 @@ struct EnumValueDefaultTypeInternal {
union {
EnumValue _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EnumValueDefaultTypeInternal _EnumValue_default_instance_;
constexpr Option::Option(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
@@ -106,24 +106,24 @@ PROTOBUF_NAMESPACE_CLOSE
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2ftype_2eproto[5];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[3];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ftype_2eproto = nullptr;
-
+
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ftype_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, fields_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, oneofs_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, options_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, source_context_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, syntax_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, kind_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, cardinality_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, number_),
@@ -134,39 +134,39 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ftype_2epro
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, options_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, json_name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, default_value_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, enumvalue_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, options_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, source_context_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, syntax_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, number_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, options_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Option, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Option, name_),
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Option, value_),
-};
+};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Type)},
{ 11, -1, sizeof(PROTOBUF_NAMESPACE_ID::Field)},
{ 26, -1, sizeof(PROTOBUF_NAMESPACE_ID::Enum)},
{ 36, -1, sizeof(PROTOBUF_NAMESPACE_ID::EnumValue)},
{ 44, -1, sizeof(PROTOBUF_NAMESPACE_ID::Option)},
-};
+};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Type_default_instance_),
@@ -174,8 +174,8 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] =
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Enum_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_EnumValue_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Option_default_instance_),
-};
-
+};
+
const char descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\032google/protobuf/type.proto\022\017google.pro"
"tobuf\032\031google/protobuf/any.proto\032$google"
@@ -231,8 +231,8 @@ const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_google_2fprotobuf_2ftype_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2ftype_2eproto;
-}
-
+}
+
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2ftype_2eproto(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
PROTOBUF_NAMESPACE_OPEN
@@ -240,27 +240,27 @@ const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Field_Kind_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[0];
}
-bool Field_Kind_IsValid(int value) {
- switch (value) {
+bool Field_Kind_IsValid(int value) {
+ switch (value) {
case 0:
case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 18:
return true;
default:
return false;
@@ -294,18 +294,18 @@ constexpr int Field::Kind_ARRAYSIZE;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Field_Cardinality_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[1];
-}
-bool Field_Cardinality_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- case 2:
- case 3:
- return true;
- default:
- return false;
- }
-}
+}
+bool Field_Cardinality_IsValid(int value) {
+ switch (value) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ return true;
+ default:
+ return false;
+ }
+}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr Field_Cardinality Field::CARDINALITY_UNKNOWN;
@@ -319,18 +319,18 @@ constexpr int Field::Cardinality_ARRAYSIZE;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Syntax_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[2];
-}
-bool Syntax_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- return true;
- default:
- return false;
- }
-}
-
-
+}
+bool Syntax_IsValid(int value) {
+ switch (value) {
+ case 0:
+ case 1:
+ return true;
+ default:
+ return false;
+ }
+}
+
+
// ===================================================================
class Type::_Internal {
@@ -341,42 +341,42 @@ class Type::_Internal {
const PROTOBUF_NAMESPACE_ID::SourceContext&
Type::_Internal::source_context(const Type* msg) {
return *msg->source_context_;
-}
+}
void Type::clear_source_context() {
if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) {
- delete source_context_;
- }
+ delete source_context_;
+ }
source_context_ = nullptr;
-}
+}
Type::Type(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- fields_(arena),
- oneofs_(arena),
- options_(arena) {
- SharedCtor();
+ fields_(arena),
+ oneofs_(arena),
+ options_(arena) {
+ SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
- // @@protoc_insertion_point(arena_constructor:google.protobuf.Type)
-}
+ // @@protoc_insertion_point(arena_constructor:google.protobuf.Type)
+}
Type::Type(const Type& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- fields_(from.fields_),
- oneofs_(from.oneofs_),
+ fields_(from.fields_),
+ oneofs_(from.oneofs_),
options_(from.options_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
if (from._internal_has_source_context()) {
source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
- } else {
+ } else {
source_context_ = nullptr;
- }
- syntax_ = from.syntax_;
+ }
+ syntax_ = from.syntax_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.Type)
}
@@ -398,15 +398,15 @@ Type::~Type() {
inline void Type::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete source_context_;
+ if (this != internal_default_instance()) delete source_context_;
}
-void Type::ArenaDtor(void* object) {
- Type* _this = reinterpret_cast< Type* >(object);
- (void)_this;
-}
+void Type::ArenaDtor(void* object) {
+ Type* _this = reinterpret_cast< Type* >(object);
+ (void)_this;
+}
void Type::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
-}
+}
void Type::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
@@ -414,16 +414,16 @@ void Type::SetCachedSize(int size) const {
void Type::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Type)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- fields_.Clear();
- oneofs_.Clear();
- options_.Clear();
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ fields_.Clear();
+ oneofs_.Clear();
+ options_.Clear();
name_.ClearToEmpty();
if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) {
- delete source_context_;
- }
+ delete source_context_;
+ }
source_context_ = nullptr;
syntax_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
@@ -435,7 +435,7 @@ const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // string name = 1;
+ // string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
auto str = _internal_mutable_name();
@@ -482,14 +482,14 @@ const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
} else goto handle_unusual;
continue;
- // .google.protobuf.SourceContext source_context = 5;
+ // .google.protobuf.SourceContext source_context = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
- // .google.protobuf.Syntax syntax = 6;
+ // .google.protobuf.Syntax syntax = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -524,9 +524,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string name = 1;
+ (void) cached_has_bits;
+
+ // string name = 1;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
@@ -537,7 +537,7 @@ failure:
}
// repeated .google.protobuf.Field fields = 2;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_fields_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -555,14 +555,14 @@ failure:
}
// repeated .google.protobuf.Option options = 4;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_options_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(4, this->_internal_options(i), target, stream);
}
- // .google.protobuf.SourceContext source_context = 5;
+ // .google.protobuf.SourceContext source_context = 5;
if (this->_internal_has_source_context()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -570,7 +570,7 @@ failure:
5, _Internal::source_context(this), target, stream);
}
- // .google.protobuf.Syntax syntax = 6;
+ // .google.protobuf.Syntax syntax = 6;
if (this->_internal_syntax() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
@@ -580,14 +580,14 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Type)
return target;
}
-size_t Type::ByteSizeLong() const {
+size_t Type::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Type)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -596,12 +596,12 @@ size_t Type::ByteSizeLong() const {
// repeated .google.protobuf.Field fields = 2;
total_size += 1UL * this->_internal_fields_size();
for (const auto& msg : this->fields_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
+ }
// repeated string oneofs = 3;
- total_size += 1 *
+ total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(oneofs_.size());
for (int i = 0, n = oneofs_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
@@ -615,26 +615,26 @@ size_t Type::ByteSizeLong() const {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- // string name = 1;
+ // string name = 1;
if (!this->_internal_name().empty()) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
- }
-
- // .google.protobuf.SourceContext source_context = 5;
+ }
+
+ // .google.protobuf.SourceContext source_context = 5;
if (this->_internal_has_source_context()) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*source_context_);
- }
-
- // .google.protobuf.Syntax syntax = 6;
+ }
+
+ // .google.protobuf.Syntax syntax = 6;
if (this->_internal_syntax() != 0) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_syntax());
- }
-
+ }
+
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
_internal_metadata_, total_size, &_cached_size_);
@@ -659,12 +659,12 @@ void Type::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Type::MergeFrom(const Type& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Type)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
fields_.MergeFrom(from.fields_);
- oneofs_.MergeFrom(from.oneofs_);
+ oneofs_.MergeFrom(from.oneofs_);
options_.MergeFrom(from.options_);
if (!from._internal_name().empty()) {
_internal_set_name(from._internal_name());
@@ -682,7 +682,7 @@ void Type::CopyFrom(const Type& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Type)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Type::IsInitialized() const {
@@ -690,11 +690,11 @@ bool Type::IsInitialized() const {
}
void Type::InternalSwap(Type* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- fields_.InternalSwap(&other->fields_);
- oneofs_.InternalSwap(&other->oneofs_);
- options_.InternalSwap(&other->options_);
+ fields_.InternalSwap(&other->fields_);
+ oneofs_.InternalSwap(&other->oneofs_);
+ options_.InternalSwap(&other->options_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, GetArenaForAllocation(),
@@ -723,13 +723,13 @@ class Field::_Internal {
Field::Field(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- options_(arena) {
- SharedCtor();
+ options_(arena) {
+ SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
- // @@protoc_insertion_point(arena_constructor:google.protobuf.Field)
-}
+ // @@protoc_insertion_point(arena_constructor:google.protobuf.Field)
+}
Field::Field(const Field& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
options_(from.options_) {
@@ -738,25 +738,25 @@ Field::Field(const Field& from)
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from._internal_type_url().empty()) {
type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_type_url(),
GetArenaForAllocation());
- }
+ }
json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from._internal_json_name().empty()) {
json_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_json_name(),
GetArenaForAllocation());
- }
+ }
default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from._internal_default_value().empty()) {
default_value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_default_value(),
GetArenaForAllocation());
- }
- ::memcpy(&kind_, &from.kind_,
- static_cast<size_t>(reinterpret_cast<char*>(&packed_) -
- reinterpret_cast<char*>(&kind_)) + sizeof(packed_));
+ }
+ ::memcpy(&kind_, &from.kind_,
+ static_cast<size_t>(reinterpret_cast<char*>(&packed_) -
+ reinterpret_cast<char*>(&kind_)) + sizeof(packed_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.Field)
}
@@ -786,12 +786,12 @@ inline void Field::SharedDtor() {
default_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
-void Field::ArenaDtor(void* object) {
- Field* _this = reinterpret_cast< Field* >(object);
- (void)_this;
-}
+void Field::ArenaDtor(void* object) {
+ Field* _this = reinterpret_cast< Field* >(object);
+ (void)_this;
+}
void Field::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
-}
+}
void Field::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
@@ -799,17 +799,17 @@ void Field::SetCachedSize(int size) const {
void Field::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Field)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- options_.Clear();
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ options_.Clear();
name_.ClearToEmpty();
type_url_.ClearToEmpty();
json_name_.ClearToEmpty();
default_value_.ClearToEmpty();
- ::memset(&kind_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&packed_) -
- reinterpret_cast<char*>(&kind_)) + sizeof(packed_));
+ ::memset(&kind_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&packed_) -
+ reinterpret_cast<char*>(&kind_)) + sizeof(packed_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -819,7 +819,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // .google.protobuf.Field.Kind kind = 1;
+ // .google.protobuf.Field.Kind kind = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -827,7 +827,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
_internal_set_kind(static_cast<PROTOBUF_NAMESPACE_ID::Field_Kind>(val));
} else goto handle_unusual;
continue;
- // .google.protobuf.Field.Cardinality cardinality = 2;
+ // .google.protobuf.Field.Cardinality cardinality = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -835,14 +835,14 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
_internal_set_cardinality(static_cast<PROTOBUF_NAMESPACE_ID::Field_Cardinality>(val));
} else goto handle_unusual;
continue;
- // int32 number = 3;
+ // int32 number = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
- // string name = 4;
+ // string name = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
auto str = _internal_mutable_name();
@@ -851,7 +851,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
CHK_(ptr);
} else goto handle_unusual;
continue;
- // string type_url = 6;
+ // string type_url = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
auto str = _internal_mutable_type_url();
@@ -860,14 +860,14 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
CHK_(ptr);
} else goto handle_unusual;
continue;
- // int32 oneof_index = 7;
+ // int32 oneof_index = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
- // bool packed = 8;
+ // bool packed = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -886,7 +886,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr));
} else goto handle_unusual;
continue;
- // string json_name = 10;
+ // string json_name = 10;
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) {
auto str = _internal_mutable_json_name();
@@ -895,7 +895,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
CHK_(ptr);
} else goto handle_unusual;
continue;
- // string default_value = 11;
+ // string default_value = 11;
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) {
auto str = _internal_mutable_default_value();
@@ -931,29 +931,29 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Field)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // .google.protobuf.Field.Kind kind = 1;
+ (void) cached_has_bits;
+
+ // .google.protobuf.Field.Kind kind = 1;
if (this->_internal_kind() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->_internal_kind(), target);
}
- // .google.protobuf.Field.Cardinality cardinality = 2;
+ // .google.protobuf.Field.Cardinality cardinality = 2;
if (this->_internal_cardinality() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
2, this->_internal_cardinality(), target);
}
- // int32 number = 3;
+ // int32 number = 3;
if (this->_internal_number() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_number(), target);
}
- // string name = 4;
+ // string name = 4;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
@@ -963,7 +963,7 @@ failure:
4, this->_internal_name(), target);
}
- // string type_url = 6;
+ // string type_url = 6;
if (!this->_internal_type_url().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_type_url().data(), static_cast<int>(this->_internal_type_url().length()),
@@ -973,27 +973,27 @@ failure:
6, this->_internal_type_url(), target);
}
- // int32 oneof_index = 7;
+ // int32 oneof_index = 7;
if (this->_internal_oneof_index() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_oneof_index(), target);
}
- // bool packed = 8;
+ // bool packed = 8;
if (this->_internal_packed() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_packed(), target);
}
// repeated .google.protobuf.Option options = 9;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_options_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(9, this->_internal_options(i), target, stream);
}
- // string json_name = 10;
+ // string json_name = 10;
if (!this->_internal_json_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_json_name().data(), static_cast<int>(this->_internal_json_name().length()),
@@ -1003,7 +1003,7 @@ failure:
10, this->_internal_json_name(), target);
}
- // string default_value = 11;
+ // string default_value = 11;
if (!this->_internal_default_value().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_default_value().data(), static_cast<int>(this->_internal_default_value().length()),
@@ -1016,14 +1016,14 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Field)
return target;
}
-size_t Field::ByteSizeLong() const {
+size_t Field::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Field)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -1032,67 +1032,67 @@ size_t Field::ByteSizeLong() const {
// repeated .google.protobuf.Option options = 9;
total_size += 1UL * this->_internal_options_size();
for (const auto& msg : this->options_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
+ }
- // string name = 4;
+ // string name = 4;
if (!this->_internal_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
- // string type_url = 6;
+ // string type_url = 6;
if (!this->_internal_type_url().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_type_url());
}
- // string json_name = 10;
+ // string json_name = 10;
if (!this->_internal_json_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_json_name());
}
- // string default_value = 11;
+ // string default_value = 11;
if (!this->_internal_default_value().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_default_value());
}
- // .google.protobuf.Field.Kind kind = 1;
+ // .google.protobuf.Field.Kind kind = 1;
if (this->_internal_kind() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_kind());
}
- // .google.protobuf.Field.Cardinality cardinality = 2;
+ // .google.protobuf.Field.Cardinality cardinality = 2;
if (this->_internal_cardinality() != 0) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_cardinality());
}
- // int32 number = 3;
+ // int32 number = 3;
if (this->_internal_number() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_number());
}
- // int32 oneof_index = 7;
+ // int32 oneof_index = 7;
if (this->_internal_oneof_index() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_oneof_index());
}
- // bool packed = 8;
+ // bool packed = 8;
if (this->_internal_packed() != 0) {
- total_size += 1 + 1;
+ total_size += 1 + 1;
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -1119,23 +1119,23 @@ void Field::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Field::MergeFrom(const Field& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Field)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- options_.MergeFrom(from.options_);
+ (void) cached_has_bits;
+
+ options_.MergeFrom(from.options_);
if (!from._internal_name().empty()) {
_internal_set_name(from._internal_name());
}
if (!from._internal_type_url().empty()) {
_internal_set_type_url(from._internal_type_url());
- }
+ }
if (!from._internal_json_name().empty()) {
_internal_set_json_name(from._internal_json_name());
- }
+ }
if (!from._internal_default_value().empty()) {
_internal_set_default_value(from._internal_default_value());
- }
+ }
if (from._internal_kind() != 0) {
_internal_set_kind(from._internal_kind());
}
@@ -1158,7 +1158,7 @@ void Field::CopyFrom(const Field& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Field)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Field::IsInitialized() const {
@@ -1166,9 +1166,9 @@ bool Field::IsInitialized() const {
}
void Field::InternalSwap(Field* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- options_.InternalSwap(&other->options_);
+ options_.InternalSwap(&other->options_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, GetArenaForAllocation(),
@@ -1216,37 +1216,37 @@ Enum::_Internal::source_context(const Enum* msg) {
}
void Enum::clear_source_context() {
if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) {
- delete source_context_;
- }
+ delete source_context_;
+ }
source_context_ = nullptr;
-}
+}
Enum::Enum(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- enumvalue_(arena),
- options_(arena) {
- SharedCtor();
+ enumvalue_(arena),
+ options_(arena) {
+ SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
- // @@protoc_insertion_point(arena_constructor:google.protobuf.Enum)
-}
+ // @@protoc_insertion_point(arena_constructor:google.protobuf.Enum)
+}
Enum::Enum(const Enum& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
- enumvalue_(from.enumvalue_),
+ enumvalue_(from.enumvalue_),
options_(from.options_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
if (from._internal_has_source_context()) {
source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
- } else {
+ } else {
source_context_ = nullptr;
- }
- syntax_ = from.syntax_;
+ }
+ syntax_ = from.syntax_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.Enum)
}
@@ -1268,15 +1268,15 @@ Enum::~Enum() {
inline void Enum::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete source_context_;
+ if (this != internal_default_instance()) delete source_context_;
}
-void Enum::ArenaDtor(void* object) {
- Enum* _this = reinterpret_cast< Enum* >(object);
- (void)_this;
-}
+void Enum::ArenaDtor(void* object) {
+ Enum* _this = reinterpret_cast< Enum* >(object);
+ (void)_this;
+}
void Enum::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
-}
+}
void Enum::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
@@ -1284,15 +1284,15 @@ void Enum::SetCachedSize(int size) const {
void Enum::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Enum)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- enumvalue_.Clear();
- options_.Clear();
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ enumvalue_.Clear();
+ options_.Clear();
name_.ClearToEmpty();
if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) {
- delete source_context_;
- }
+ delete source_context_;
+ }
source_context_ = nullptr;
syntax_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
@@ -1304,7 +1304,7 @@ const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // string name = 1;
+ // string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
auto str = _internal_mutable_name();
@@ -1337,14 +1337,14 @@ const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
} else goto handle_unusual;
continue;
- // .google.protobuf.SourceContext source_context = 4;
+ // .google.protobuf.SourceContext source_context = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
- // .google.protobuf.Syntax syntax = 5;
+ // .google.protobuf.Syntax syntax = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -1379,9 +1379,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string name = 1;
+ (void) cached_has_bits;
+
+ // string name = 1;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
@@ -1392,7 +1392,7 @@ failure:
}
// repeated .google.protobuf.EnumValue enumvalue = 2;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_enumvalue_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -1400,14 +1400,14 @@ failure:
}
// repeated .google.protobuf.Option options = 3;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_options_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, this->_internal_options(i), target, stream);
}
- // .google.protobuf.SourceContext source_context = 4;
+ // .google.protobuf.SourceContext source_context = 4;
if (this->_internal_has_source_context()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -1415,7 +1415,7 @@ failure:
4, _Internal::source_context(this), target, stream);
}
- // .google.protobuf.Syntax syntax = 5;
+ // .google.protobuf.Syntax syntax = 5;
if (this->_internal_syntax() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
@@ -1425,14 +1425,14 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Enum)
return target;
}
-size_t Enum::ByteSizeLong() const {
+size_t Enum::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Enum)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -1441,9 +1441,9 @@ size_t Enum::ByteSizeLong() const {
// repeated .google.protobuf.EnumValue enumvalue = 2;
total_size += 1UL * this->_internal_enumvalue_size();
for (const auto& msg : this->enumvalue_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
+ }
// repeated .google.protobuf.Option options = 3;
total_size += 1UL * this->_internal_options_size();
@@ -1452,26 +1452,26 @@ size_t Enum::ByteSizeLong() const {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- // string name = 1;
+ // string name = 1;
if (!this->_internal_name().empty()) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
- }
-
- // .google.protobuf.SourceContext source_context = 4;
+ }
+
+ // .google.protobuf.SourceContext source_context = 4;
if (this->_internal_has_source_context()) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*source_context_);
- }
-
- // .google.protobuf.Syntax syntax = 5;
+ }
+
+ // .google.protobuf.Syntax syntax = 5;
if (this->_internal_syntax() != 0) {
- total_size += 1 +
+ total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_syntax());
- }
-
+ }
+
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
_internal_metadata_, total_size, &_cached_size_);
@@ -1496,10 +1496,10 @@ void Enum::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Enum::MergeFrom(const Enum& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
enumvalue_.MergeFrom(from.enumvalue_);
options_.MergeFrom(from.options_);
if (!from._internal_name().empty()) {
@@ -1518,7 +1518,7 @@ void Enum::CopyFrom(const Enum& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Enum)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Enum::IsInitialized() const {
@@ -1526,10 +1526,10 @@ bool Enum::IsInitialized() const {
}
void Enum::InternalSwap(Enum* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- enumvalue_.InternalSwap(&other->enumvalue_);
- options_.InternalSwap(&other->options_);
+ enumvalue_.InternalSwap(&other->enumvalue_);
+ options_.InternalSwap(&other->options_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, GetArenaForAllocation(),
@@ -1558,13 +1558,13 @@ class EnumValue::_Internal {
EnumValue::EnumValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- options_(arena) {
- SharedCtor();
+ options_(arena) {
+ SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
- // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValue)
-}
+ // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValue)
+}
EnumValue::EnumValue(const EnumValue& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
options_(from.options_) {
@@ -1573,8 +1573,8 @@ EnumValue::EnumValue(const EnumValue& from)
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
- number_ = from.number_;
+ }
+ number_ = from.number_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValue)
}
@@ -1595,12 +1595,12 @@ inline void EnumValue::SharedDtor() {
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
-void EnumValue::ArenaDtor(void* object) {
- EnumValue* _this = reinterpret_cast< EnumValue* >(object);
- (void)_this;
-}
+void EnumValue::ArenaDtor(void* object) {
+ EnumValue* _this = reinterpret_cast< EnumValue* >(object);
+ (void)_this;
+}
void EnumValue::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
-}
+}
void EnumValue::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
@@ -1608,10 +1608,10 @@ void EnumValue::SetCachedSize(int size) const {
void EnumValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- options_.Clear();
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ options_.Clear();
name_.ClearToEmpty();
number_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
@@ -1623,7 +1623,7 @@ const char* EnumValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // string name = 1;
+ // string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
auto str = _internal_mutable_name();
@@ -1632,7 +1632,7 @@ const char* EnumValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::
CHK_(ptr);
} else goto handle_unusual;
continue;
- // int32 number = 2;
+ // int32 number = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -1678,9 +1678,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string name = 1;
+ (void) cached_has_bits;
+
+ // string name = 1;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
@@ -1690,14 +1690,14 @@ failure:
1, this->_internal_name(), target);
}
- // int32 number = 2;
+ // int32 number = 2;
if (this->_internal_number() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_number(), target);
}
// repeated .google.protobuf.Option options = 3;
- for (unsigned int i = 0,
+ for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_options_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -1707,14 +1707,14 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValue)
return target;
}
-size_t EnumValue::ByteSizeLong() const {
+size_t EnumValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValue)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -1723,18 +1723,18 @@ size_t EnumValue::ByteSizeLong() const {
// repeated .google.protobuf.Option options = 3;
total_size += 1UL * this->_internal_options_size();
for (const auto& msg : this->options_) {
- total_size +=
+ total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
-
- // string name = 1;
+ }
+
+ // string name = 1;
if (!this->_internal_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
- // int32 number = 2;
+ // int32 number = 2;
if (this->_internal_number() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
@@ -1765,10 +1765,10 @@ void EnumValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void EnumValue::MergeFrom(const EnumValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValue)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
options_.MergeFrom(from.options_);
if (!from._internal_name().empty()) {
_internal_set_name(from._internal_name());
@@ -1783,7 +1783,7 @@ void EnumValue::CopyFrom(const EnumValue& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.EnumValue)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool EnumValue::IsInitialized() const {
@@ -1791,15 +1791,15 @@ bool EnumValue::IsInitialized() const {
}
void EnumValue::InternalSwap(EnumValue* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- options_.InternalSwap(&other->options_);
+ options_.InternalSwap(&other->options_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, GetArenaForAllocation(),
&other->name_, other->GetArenaForAllocation()
);
- swap(number_, other->number_);
+ swap(number_, other->number_);
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumValue::GetMetadata() const {
@@ -1821,10 +1821,10 @@ Option::_Internal::value(const Option* msg) {
}
void Option::clear_value() {
if (GetArenaForAllocation() == nullptr && value_ != nullptr) {
- delete value_;
- }
+ delete value_;
+ }
value_ = nullptr;
-}
+}
Option::Option(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
@@ -1832,8 +1832,8 @@ Option::Option(::PROTOBUF_NAMESPACE_ID::Arena* arena,
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
- // @@protoc_insertion_point(arena_constructor:google.protobuf.Option)
-}
+ // @@protoc_insertion_point(arena_constructor:google.protobuf.Option)
+}
Option::Option(const Option& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
@@ -1841,12 +1841,12 @@ Option::Option(const Option& from)
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
- }
+ }
if (from._internal_has_value()) {
value_ = new PROTOBUF_NAMESPACE_ID::Any(*from.value_);
- } else {
+ } else {
value_ = nullptr;
- }
+ }
// @@protoc_insertion_point(copy_constructor:google.protobuf.Option)
}
@@ -1865,15 +1865,15 @@ Option::~Option() {
inline void Option::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete value_;
+ if (this != internal_default_instance()) delete value_;
}
-void Option::ArenaDtor(void* object) {
- Option* _this = reinterpret_cast< Option* >(object);
- (void)_this;
-}
+void Option::ArenaDtor(void* object) {
+ Option* _this = reinterpret_cast< Option* >(object);
+ (void)_this;
+}
void Option::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
-}
+}
void Option::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
@@ -1881,13 +1881,13 @@ void Option::SetCachedSize(int size) const {
void Option::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Option)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
name_.ClearToEmpty();
if (GetArenaForAllocation() == nullptr && value_ != nullptr) {
- delete value_;
- }
+ delete value_;
+ }
value_ = nullptr;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1898,7 +1898,7 @@ const char* Option::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // string name = 1;
+ // string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
auto str = _internal_mutable_name();
@@ -1907,7 +1907,7 @@ const char* Option::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
CHK_(ptr);
} else goto handle_unusual;
continue;
- // .google.protobuf.Any value = 2;
+ // .google.protobuf.Any value = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_value(), ptr);
@@ -1941,9 +1941,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string name = 1;
+ (void) cached_has_bits;
+
+ // string name = 1;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
@@ -1953,7 +1953,7 @@ failure:
1, this->_internal_name(), target);
}
- // .google.protobuf.Any value = 2;
+ // .google.protobuf.Any value = 2;
if (this->_internal_has_value()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
@@ -1964,27 +1964,27 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Option)
return target;
}
-size_t Option::ByteSizeLong() const {
+size_t Option::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Option)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // string name = 1;
+ // string name = 1;
if (!this->_internal_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
- // .google.protobuf.Any value = 2;
+ // .google.protobuf.Any value = 2;
if (this->_internal_has_value()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
@@ -2015,10 +2015,10 @@ void Option::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Option::MergeFrom(const Option& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Option)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (!from._internal_name().empty()) {
_internal_set_name(from._internal_name());
}
@@ -2032,7 +2032,7 @@ void Option::CopyFrom(const Option& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Option)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Option::IsInitialized() const {
@@ -2040,14 +2040,14 @@ bool Option::IsInitialized() const {
}
void Option::InternalSwap(Option* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, GetArenaForAllocation(),
&other->name_, other->GetArenaForAllocation()
);
- swap(value_, other->value_);
+ swap(value_, other->value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Option::GetMetadata() const {
@@ -2070,7 +2070,7 @@ template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Enum* Arena::CreateMaybeMess
}
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::EnumValue* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::EnumValue >(Arena* arena) {
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::EnumValue >(arena);
-}
+}
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Option* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Option >(Arena* arena) {
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Option >(arena);
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/type.pb.h b/contrib/libs/protobuf/src/google/protobuf/type.pb.h
index 3cee6d3511..a99c06d180 100644
--- a/contrib/libs/protobuf/src/google/protobuf/type.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/type.pb.h
@@ -195,38 +195,38 @@ class PROTOBUF_EXPORT Type final :
CopyFrom(from);
return *this;
}
- inline Type& operator=(Type&& from) noexcept {
+ inline Type& operator=(Type&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const Type& default_instance() {
return *internal_default_instance();
}
- static inline const Type* internal_default_instance() {
- return reinterpret_cast<const Type*>(
- &_Type_default_instance_);
- }
+ static inline const Type* internal_default_instance() {
+ return reinterpret_cast<const Type*>(
+ &_Type_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 0;
-
- friend void swap(Type& a, Type& b) {
- a.Swap(&b);
- }
+ 0;
+
+ friend void swap(Type& a, Type& b) {
+ a.Swap(&b);
+ }
inline void Swap(Type* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -275,11 +275,11 @@ class PROTOBUF_EXPORT Type final :
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "google.protobuf.Type";
}
- protected:
+ protected:
explicit Type(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
private:
- static void ArenaDtor(void* object);
+ static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
@@ -327,12 +327,12 @@ class PROTOBUF_EXPORT Type final :
const TProtoStringType& oneofs(int index) const;
TProtoStringType* mutable_oneofs(int index);
void set_oneofs(int index, const TProtoStringType& value);
- void set_oneofs(int index, TProtoStringType&& value);
+ void set_oneofs(int index, TProtoStringType&& value);
void set_oneofs(int index, const char* value);
void set_oneofs(int index, const char* value, size_t size);
TProtoStringType* add_oneofs();
void add_oneofs(const TProtoStringType& value);
- void add_oneofs(TProtoStringType&& value);
+ void add_oneofs(TProtoStringType&& value);
void add_oneofs(const char* value);
void add_oneofs(const char* value, size_t size);
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>& oneofs() const;
@@ -360,21 +360,21 @@ class PROTOBUF_EXPORT Type final :
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
options() const;
- // string name = 1;
- void clear_name();
- const TProtoStringType& name() const;
+ // string name = 1;
+ void clear_name();
+ const TProtoStringType& name() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
void set_name(ArgT0&& arg0, ArgT... args);
- TProtoStringType* mutable_name();
+ TProtoStringType* mutable_name();
PROTOBUF_MUST_USE_RESULT TProtoStringType* release_name();
- void set_allocated_name(TProtoStringType* name);
+ void set_allocated_name(TProtoStringType* name);
private:
const TProtoStringType& _internal_name() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const TProtoStringType& value);
TProtoStringType* _internal_mutable_name();
public:
-
- // .google.protobuf.SourceContext source_context = 5;
+
+ // .google.protobuf.SourceContext source_context = 5;
bool has_source_context() const;
private:
bool _internal_has_source_context() const;
@@ -384,15 +384,15 @@ class PROTOBUF_EXPORT Type final :
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::SourceContext* release_source_context();
PROTOBUF_NAMESPACE_ID::SourceContext* mutable_source_context();
void set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
- private:
+ private:
const PROTOBUF_NAMESPACE_ID::SourceContext& _internal_source_context() const;
PROTOBUF_NAMESPACE_ID::SourceContext* _internal_mutable_source_context();
- public:
- void unsafe_arena_set_allocated_source_context(
+ public:
+ void unsafe_arena_set_allocated_source_context(
PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
PROTOBUF_NAMESPACE_ID::SourceContext* unsafe_arena_release_source_context();
- // .google.protobuf.Syntax syntax = 6;
+ // .google.protobuf.Syntax syntax = 6;
void clear_syntax();
PROTOBUF_NAMESPACE_ID::Syntax syntax() const;
void set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value);
@@ -406,8 +406,8 @@ class PROTOBUF_EXPORT Type final :
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Field > fields_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> oneofs_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option > options_;
@@ -436,38 +436,38 @@ class PROTOBUF_EXPORT Field final :
CopyFrom(from);
return *this;
}
- inline Field& operator=(Field&& from) noexcept {
+ inline Field& operator=(Field&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const Field& default_instance() {
return *internal_default_instance();
}
- static inline const Field* internal_default_instance() {
- return reinterpret_cast<const Field*>(
- &_Field_default_instance_);
- }
+ static inline const Field* internal_default_instance() {
+ return reinterpret_cast<const Field*>(
+ &_Field_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 1;
-
- friend void swap(Field& a, Field& b) {
- a.Swap(&b);
- }
+ 1;
+
+ friend void swap(Field& a, Field& b) {
+ a.Swap(&b);
+ }
inline void Swap(Field* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -516,11 +516,11 @@ class PROTOBUF_EXPORT Field final :
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "google.protobuf.Field";
}
- protected:
+ protected:
explicit Field(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
private:
- static void ArenaDtor(void* object);
+ static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
@@ -643,15 +643,15 @@ class PROTOBUF_EXPORT Field final :
kOneofIndexFieldNumber = 7,
kPackedFieldNumber = 8,
};
- // repeated .google.protobuf.Option options = 9;
- int options_size() const;
+ // repeated .google.protobuf.Option options = 9;
+ int options_size() const;
private:
int _internal_options_size() const;
public:
- void clear_options();
+ void clear_options();
PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
- mutable_options();
+ mutable_options();
private:
const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
@@ -659,9 +659,9 @@ class PROTOBUF_EXPORT Field final :
const PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
PROTOBUF_NAMESPACE_ID::Option* add_options();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
- options() const;
+ options() const;
- // string name = 4;
+ // string name = 4;
void clear_name();
const TProtoStringType& name() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -675,7 +675,7 @@ class PROTOBUF_EXPORT Field final :
TProtoStringType* _internal_mutable_name();
public:
- // string type_url = 6;
+ // string type_url = 6;
void clear_type_url();
const TProtoStringType& type_url() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -689,7 +689,7 @@ class PROTOBUF_EXPORT Field final :
TProtoStringType* _internal_mutable_type_url();
public:
- // string json_name = 10;
+ // string json_name = 10;
void clear_json_name();
const TProtoStringType& json_name() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -703,7 +703,7 @@ class PROTOBUF_EXPORT Field final :
TProtoStringType* _internal_mutable_json_name();
public:
- // string default_value = 11;
+ // string default_value = 11;
void clear_default_value();
const TProtoStringType& default_value() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -717,58 +717,58 @@ class PROTOBUF_EXPORT Field final :
TProtoStringType* _internal_mutable_default_value();
public:
- // .google.protobuf.Field.Kind kind = 1;
- void clear_kind();
+ // .google.protobuf.Field.Kind kind = 1;
+ void clear_kind();
PROTOBUF_NAMESPACE_ID::Field_Kind kind() const;
void set_kind(PROTOBUF_NAMESPACE_ID::Field_Kind value);
private:
PROTOBUF_NAMESPACE_ID::Field_Kind _internal_kind() const;
void _internal_set_kind(PROTOBUF_NAMESPACE_ID::Field_Kind value);
public:
-
- // .google.protobuf.Field.Cardinality cardinality = 2;
- void clear_cardinality();
+
+ // .google.protobuf.Field.Cardinality cardinality = 2;
+ void clear_cardinality();
PROTOBUF_NAMESPACE_ID::Field_Cardinality cardinality() const;
void set_cardinality(PROTOBUF_NAMESPACE_ID::Field_Cardinality value);
private:
PROTOBUF_NAMESPACE_ID::Field_Cardinality _internal_cardinality() const;
void _internal_set_cardinality(PROTOBUF_NAMESPACE_ID::Field_Cardinality value);
public:
-
- // int32 number = 3;
- void clear_number();
+
+ // int32 number = 3;
+ void clear_number();
::PROTOBUF_NAMESPACE_ID::int32 number() const;
void set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_number() const;
void _internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
-
- // int32 oneof_index = 7;
- void clear_oneof_index();
+
+ // int32 oneof_index = 7;
+ void clear_oneof_index();
::PROTOBUF_NAMESPACE_ID::int32 oneof_index() const;
void set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_oneof_index() const;
void _internal_set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
-
- // bool packed = 8;
- void clear_packed();
- bool packed() const;
- void set_packed(bool value);
+
+ // bool packed = 8;
+ void clear_packed();
+ bool packed() const;
+ void set_packed(bool value);
private:
bool _internal_packed() const;
void _internal_set_packed(bool value);
public:
-
+
// @@protoc_insertion_point(class_scope:google.protobuf.Field)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option > options_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_;
@@ -801,38 +801,38 @@ class PROTOBUF_EXPORT Enum final :
CopyFrom(from);
return *this;
}
- inline Enum& operator=(Enum&& from) noexcept {
+ inline Enum& operator=(Enum&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const Enum& default_instance() {
return *internal_default_instance();
}
- static inline const Enum* internal_default_instance() {
- return reinterpret_cast<const Enum*>(
- &_Enum_default_instance_);
- }
+ static inline const Enum* internal_default_instance() {
+ return reinterpret_cast<const Enum*>(
+ &_Enum_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 2;
-
- friend void swap(Enum& a, Enum& b) {
- a.Swap(&b);
- }
+ 2;
+
+ friend void swap(Enum& a, Enum& b) {
+ a.Swap(&b);
+ }
inline void Swap(Enum* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -881,11 +881,11 @@ class PROTOBUF_EXPORT Enum final :
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "google.protobuf.Enum";
}
- protected:
+ protected:
explicit Enum(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
private:
- static void ArenaDtor(void* object);
+ static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
@@ -941,21 +941,21 @@ class PROTOBUF_EXPORT Enum final :
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
options() const;
- // string name = 1;
- void clear_name();
- const TProtoStringType& name() const;
+ // string name = 1;
+ void clear_name();
+ const TProtoStringType& name() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
void set_name(ArgT0&& arg0, ArgT... args);
- TProtoStringType* mutable_name();
+ TProtoStringType* mutable_name();
PROTOBUF_MUST_USE_RESULT TProtoStringType* release_name();
- void set_allocated_name(TProtoStringType* name);
+ void set_allocated_name(TProtoStringType* name);
private:
const TProtoStringType& _internal_name() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const TProtoStringType& value);
TProtoStringType* _internal_mutable_name();
public:
-
- // .google.protobuf.SourceContext source_context = 4;
+
+ // .google.protobuf.SourceContext source_context = 4;
bool has_source_context() const;
private:
bool _internal_has_source_context() const;
@@ -965,15 +965,15 @@ class PROTOBUF_EXPORT Enum final :
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::SourceContext* release_source_context();
PROTOBUF_NAMESPACE_ID::SourceContext* mutable_source_context();
void set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
- private:
+ private:
const PROTOBUF_NAMESPACE_ID::SourceContext& _internal_source_context() const;
PROTOBUF_NAMESPACE_ID::SourceContext* _internal_mutable_source_context();
- public:
- void unsafe_arena_set_allocated_source_context(
+ public:
+ void unsafe_arena_set_allocated_source_context(
PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
PROTOBUF_NAMESPACE_ID::SourceContext* unsafe_arena_release_source_context();
- // .google.protobuf.Syntax syntax = 5;
+ // .google.protobuf.Syntax syntax = 5;
void clear_syntax();
PROTOBUF_NAMESPACE_ID::Syntax syntax() const;
void set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value);
@@ -987,8 +987,8 @@ class PROTOBUF_EXPORT Enum final :
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValue > enumvalue_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option > options_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
@@ -1016,38 +1016,38 @@ class PROTOBUF_EXPORT EnumValue final :
CopyFrom(from);
return *this;
}
- inline EnumValue& operator=(EnumValue&& from) noexcept {
+ inline EnumValue& operator=(EnumValue&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const EnumValue& default_instance() {
return *internal_default_instance();
}
- static inline const EnumValue* internal_default_instance() {
- return reinterpret_cast<const EnumValue*>(
- &_EnumValue_default_instance_);
- }
+ static inline const EnumValue* internal_default_instance() {
+ return reinterpret_cast<const EnumValue*>(
+ &_EnumValue_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 3;
-
- friend void swap(EnumValue& a, EnumValue& b) {
- a.Swap(&b);
- }
+ 3;
+
+ friend void swap(EnumValue& a, EnumValue& b) {
+ a.Swap(&b);
+ }
inline void Swap(EnumValue* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -1096,11 +1096,11 @@ class PROTOBUF_EXPORT EnumValue final :
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "google.protobuf.EnumValue";
}
- protected:
+ protected:
explicit EnumValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
private:
- static void ArenaDtor(void* object);
+ static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
@@ -1118,15 +1118,15 @@ class PROTOBUF_EXPORT EnumValue final :
kNameFieldNumber = 1,
kNumberFieldNumber = 2,
};
- // repeated .google.protobuf.Option options = 3;
- int options_size() const;
+ // repeated .google.protobuf.Option options = 3;
+ int options_size() const;
private:
int _internal_options_size() const;
public:
- void clear_options();
+ void clear_options();
PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
- mutable_options();
+ mutable_options();
private:
const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
@@ -1134,9 +1134,9 @@ class PROTOBUF_EXPORT EnumValue final :
const PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
PROTOBUF_NAMESPACE_ID::Option* add_options();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
- options() const;
-
- // string name = 1;
+ options() const;
+
+ // string name = 1;
void clear_name();
const TProtoStringType& name() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -1150,7 +1150,7 @@ class PROTOBUF_EXPORT EnumValue final :
TProtoStringType* _internal_mutable_name();
public:
- // int32 number = 2;
+ // int32 number = 2;
void clear_number();
::PROTOBUF_NAMESPACE_ID::int32 number() const;
void set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
@@ -1164,8 +1164,8 @@ class PROTOBUF_EXPORT EnumValue final :
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option > options_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
::PROTOBUF_NAMESPACE_ID::int32 number_;
@@ -1191,38 +1191,38 @@ class PROTOBUF_EXPORT Option final :
CopyFrom(from);
return *this;
}
- inline Option& operator=(Option&& from) noexcept {
+ inline Option& operator=(Option&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const Option& default_instance() {
return *internal_default_instance();
}
- static inline const Option* internal_default_instance() {
- return reinterpret_cast<const Option*>(
- &_Option_default_instance_);
- }
+ static inline const Option* internal_default_instance() {
+ return reinterpret_cast<const Option*>(
+ &_Option_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 4;
-
- friend void swap(Option& a, Option& b) {
- a.Swap(&b);
- }
+ 4;
+
+ friend void swap(Option& a, Option& b) {
+ a.Swap(&b);
+ }
inline void Swap(Option* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -1271,11 +1271,11 @@ class PROTOBUF_EXPORT Option final :
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "google.protobuf.Option";
}
- protected:
+ protected:
explicit Option(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
private:
- static void ArenaDtor(void* object);
+ static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
@@ -1292,7 +1292,7 @@ class PROTOBUF_EXPORT Option final :
kNameFieldNumber = 1,
kValueFieldNumber = 2,
};
- // string name = 1;
+ // string name = 1;
void clear_name();
const TProtoStringType& name() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -1306,7 +1306,7 @@ class PROTOBUF_EXPORT Option final :
TProtoStringType* _internal_mutable_name();
public:
- // .google.protobuf.Any value = 2;
+ // .google.protobuf.Any value = 2;
bool has_value() const;
private:
bool _internal_has_value() const;
@@ -1316,11 +1316,11 @@ class PROTOBUF_EXPORT Option final :
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::Any* release_value();
PROTOBUF_NAMESPACE_ID::Any* mutable_value();
void set_allocated_value(PROTOBUF_NAMESPACE_ID::Any* value);
- private:
+ private:
const PROTOBUF_NAMESPACE_ID::Any& _internal_value() const;
PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_value();
- public:
- void unsafe_arena_set_allocated_value(
+ public:
+ void unsafe_arena_set_allocated_value(
PROTOBUF_NAMESPACE_ID::Any* value);
PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_value();
@@ -1329,8 +1329,8 @@ class PROTOBUF_EXPORT Option final :
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
PROTOBUF_NAMESPACE_ID::Any* value_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
@@ -1341,13 +1341,13 @@ class PROTOBUF_EXPORT Option final :
// ===================================================================
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
// Type
-// string name = 1;
+// string name = 1;
inline void Type::clear_name() {
name_.ClearToEmpty();
}
@@ -1463,10 +1463,10 @@ inline void Type::set_oneofs(int index, const TProtoStringType& value) {
oneofs_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs)
}
-inline void Type::set_oneofs(int index, TProtoStringType&& value) {
+inline void Type::set_oneofs(int index, TProtoStringType&& value) {
oneofs_.Mutable(index)->assign(std::move(value));
- // @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs)
-}
+ // @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs)
+}
inline void Type::set_oneofs(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
oneofs_.Mutable(index)->assign(value);
@@ -1484,10 +1484,10 @@ inline void Type::add_oneofs(const TProtoStringType& value) {
oneofs_.Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs)
}
-inline void Type::add_oneofs(TProtoStringType&& value) {
- oneofs_.Add(std::move(value));
- // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs)
-}
+inline void Type::add_oneofs(TProtoStringType&& value) {
+ oneofs_.Add(std::move(value));
+ // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs)
+}
inline void Type::add_oneofs(const char* value) {
GOOGLE_DCHECK(value != nullptr);
oneofs_.Add()->assign(value);
@@ -1548,7 +1548,7 @@ Type::options() const {
return options_;
}
-// .google.protobuf.SourceContext source_context = 5;
+// .google.protobuf.SourceContext source_context = 5;
inline bool Type::_internal_has_source_context() const {
return this != internal_default_instance() && source_context_ != nullptr;
}
@@ -1604,7 +1604,7 @@ inline PROTOBUF_NAMESPACE_ID::SourceContext* Type::_internal_mutable_source_cont
if (source_context_ == nullptr) {
auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::SourceContext>(GetArenaForAllocation());
source_context_ = p;
- }
+ }
return source_context_;
}
inline PROTOBUF_NAMESPACE_ID::SourceContext* Type::mutable_source_context() {
@@ -1616,7 +1616,7 @@ inline void Type::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceCont
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_);
- }
+ }
if (source_context) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<
@@ -1625,7 +1625,7 @@ inline void Type::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceCont
if (message_arena != submessage_arena) {
source_context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, source_context, submessage_arena);
- }
+ }
} else {
@@ -1634,7 +1634,7 @@ inline void Type::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceCont
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.source_context)
}
-// .google.protobuf.Syntax syntax = 6;
+// .google.protobuf.Syntax syntax = 6;
inline void Type::clear_syntax() {
syntax_ = 0;
}
@@ -1658,7 +1658,7 @@ inline void Type::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) {
// Field
-// .google.protobuf.Field.Kind kind = 1;
+// .google.protobuf.Field.Kind kind = 1;
inline void Field::clear_kind() {
kind_ = 0;
}
@@ -1678,7 +1678,7 @@ inline void Field::set_kind(PROTOBUF_NAMESPACE_ID::Field_Kind value) {
// @@protoc_insertion_point(field_set:google.protobuf.Field.kind)
}
-// .google.protobuf.Field.Cardinality cardinality = 2;
+// .google.protobuf.Field.Cardinality cardinality = 2;
inline void Field::clear_cardinality() {
cardinality_ = 0;
}
@@ -1698,7 +1698,7 @@ inline void Field::set_cardinality(PROTOBUF_NAMESPACE_ID::Field_Cardinality valu
// @@protoc_insertion_point(field_set:google.protobuf.Field.cardinality)
}
-// int32 number = 3;
+// int32 number = 3;
inline void Field::clear_number() {
number_ = 0;
}
@@ -1718,7 +1718,7 @@ inline void Field::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) {
// @@protoc_insertion_point(field_set:google.protobuf.Field.number)
}
-// string name = 4;
+// string name = 4;
inline void Field::clear_name() {
name_.ClearToEmpty();
}
@@ -1764,7 +1764,7 @@ inline void Field::set_allocated_name(TProtoStringType* name) {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.name)
}
-// string type_url = 6;
+// string type_url = 6;
inline void Field::clear_type_url() {
type_url_.ClearToEmpty();
}
@@ -1810,7 +1810,7 @@ inline void Field::set_allocated_type_url(TProtoStringType* type_url) {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.type_url)
}
-// int32 oneof_index = 7;
+// int32 oneof_index = 7;
inline void Field::clear_oneof_index() {
oneof_index_ = 0;
}
@@ -1830,7 +1830,7 @@ inline void Field::set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value) {
// @@protoc_insertion_point(field_set:google.protobuf.Field.oneof_index)
}
-// bool packed = 8;
+// bool packed = 8;
inline void Field::clear_packed() {
packed_ = false;
}
@@ -1890,7 +1890,7 @@ Field::options() const {
return options_;
}
-// string json_name = 10;
+// string json_name = 10;
inline void Field::clear_json_name() {
json_name_.ClearToEmpty();
}
@@ -1936,7 +1936,7 @@ inline void Field::set_allocated_json_name(TProtoStringType* json_name) {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.json_name)
}
-// string default_value = 11;
+// string default_value = 11;
inline void Field::clear_default_value() {
default_value_.ClearToEmpty();
}
@@ -1986,7 +1986,7 @@ inline void Field::set_allocated_default_value(TProtoStringType* default_value)
// Enum
-// string name = 1;
+// string name = 1;
inline void Enum::clear_name() {
name_.ClearToEmpty();
}
@@ -2112,7 +2112,7 @@ Enum::options() const {
return options_;
}
-// .google.protobuf.SourceContext source_context = 4;
+// .google.protobuf.SourceContext source_context = 4;
inline bool Enum::_internal_has_source_context() const {
return this != internal_default_instance() && source_context_ != nullptr;
}
@@ -2168,7 +2168,7 @@ inline PROTOBUF_NAMESPACE_ID::SourceContext* Enum::_internal_mutable_source_cont
if (source_context_ == nullptr) {
auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::SourceContext>(GetArenaForAllocation());
source_context_ = p;
- }
+ }
return source_context_;
}
inline PROTOBUF_NAMESPACE_ID::SourceContext* Enum::mutable_source_context() {
@@ -2180,7 +2180,7 @@ inline void Enum::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceCont
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_);
- }
+ }
if (source_context) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<
@@ -2189,7 +2189,7 @@ inline void Enum::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceCont
if (message_arena != submessage_arena) {
source_context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, source_context, submessage_arena);
- }
+ }
} else {
@@ -2198,7 +2198,7 @@ inline void Enum::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceCont
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.source_context)
}
-// .google.protobuf.Syntax syntax = 5;
+// .google.protobuf.Syntax syntax = 5;
inline void Enum::clear_syntax() {
syntax_ = 0;
}
@@ -2222,7 +2222,7 @@ inline void Enum::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) {
// EnumValue
-// string name = 1;
+// string name = 1;
inline void EnumValue::clear_name() {
name_.ClearToEmpty();
}
@@ -2268,7 +2268,7 @@ inline void EnumValue::set_allocated_name(TProtoStringType* name) {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValue.name)
}
-// int32 number = 2;
+// int32 number = 2;
inline void EnumValue::clear_number() {
number_ = 0;
}
@@ -2332,7 +2332,7 @@ EnumValue::options() const {
// Option
-// string name = 1;
+// string name = 1;
inline void Option::clear_name() {
name_.ClearToEmpty();
}
@@ -2378,7 +2378,7 @@ inline void Option::set_allocated_name(TProtoStringType* name) {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.name)
}
-// .google.protobuf.Any value = 2;
+// .google.protobuf.Any value = 2;
inline bool Option::_internal_has_value() const {
return this != internal_default_instance() && value_ != nullptr;
}
@@ -2434,7 +2434,7 @@ inline PROTOBUF_NAMESPACE_ID::Any* Option::_internal_mutable_value() {
if (value_ == nullptr) {
auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Any>(GetArenaForAllocation());
value_ = p;
- }
+ }
return value_;
}
inline PROTOBUF_NAMESPACE_ID::Any* Option::mutable_value() {
@@ -2446,7 +2446,7 @@ inline void Option::set_allocated_value(PROTOBUF_NAMESPACE_ID::Any* value) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(value_);
- }
+ }
if (value) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<
@@ -2455,7 +2455,7 @@ inline void Option::set_allocated_value(PROTOBUF_NAMESPACE_ID::Any* value) {
if (message_arena != submessage_arena) {
value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, value, submessage_arena);
- }
+ }
} else {
@@ -2464,9 +2464,9 @@ inline void Option::set_allocated_value(PROTOBUF_NAMESPACE_ID::Any* value) {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.value)
}
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif // __GNUC__
// -------------------------------------------------------------------
// -------------------------------------------------------------------
@@ -2479,7 +2479,7 @@ inline void Option::set_allocated_value(PROTOBUF_NAMESPACE_ID::Any* value) {
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_CLOSE
-
+
PROTOBUF_NAMESPACE_OPEN
template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::Field_Kind> : ::std::true_type {};
diff --git a/contrib/libs/protobuf/src/google/protobuf/type.proto b/contrib/libs/protobuf/src/google/protobuf/type.proto
index 4c50715d3e..d3f6a68b83 100644
--- a/contrib/libs/protobuf/src/google/protobuf/type.proto
+++ b/contrib/libs/protobuf/src/google/protobuf/type.proto
@@ -36,7 +36,7 @@ import "google/protobuf/any.proto";
import "google/protobuf/source_context.proto";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option cc_enable_arenas = true;
+option cc_enable_arenas = true;
option java_package = "com.google.protobuf";
option java_outer_classname = "TypeProto";
option java_multiple_files = true;
@@ -166,15 +166,15 @@ message EnumValue {
// A protocol buffer option, which can be attached to a message, field,
// enumeration, etc.
message Option {
- // The option's name. For protobuf built-in options (options defined in
- // descriptor.proto), this is the short name. For example, `"map_entry"`.
- // For custom options, it should be the fully-qualified name. For example,
- // `"google.api.http"`.
+ // The option's name. For protobuf built-in options (options defined in
+ // descriptor.proto), this is the short name. For example, `"map_entry"`.
+ // For custom options, it should be the fully-qualified name. For example,
+ // `"google.api.http"`.
string name = 1;
- // The option's value packed in an Any message. If the value is a primitive,
- // the corresponding wrapper type defined in google/protobuf/wrappers.proto
- // should be used. If the value is an enum, it should be stored as an int32
- // value using the google.protobuf.Int32Value type.
+ // The option's value packed in an Any message. If the value is a primitive,
+ // the corresponding wrapper type defined in google/protobuf/wrappers.proto
+ // should be used. If the value is an enum, it should be stored as an int32
+ // value using the google.protobuf.Int32Value type.
Any value = 2;
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.cc b/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.cc
index 245df73716..dcb4409f9e 100644
--- a/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.cc
@@ -104,9 +104,9 @@ void UnknownFieldSet::MergeFromAndDestroy(UnknownFieldSet* other) {
void UnknownFieldSet::MergeToInternalMetadata(
const UnknownFieldSet& other, internal::InternalMetadata* metadata) {
metadata->mutable_unknown_fields<UnknownFieldSet>()->MergeFrom(other);
-}
-
-size_t UnknownFieldSet::SpaceUsedExcludingSelfLong() const {
+}
+
+size_t UnknownFieldSet::SpaceUsedExcludingSelfLong() const {
if (fields_.empty()) return 0;
size_t total_size = sizeof(fields_) + sizeof(UnknownField) * fields_.size();
@@ -115,11 +115,11 @@ size_t UnknownFieldSet::SpaceUsedExcludingSelfLong() const {
switch (field.type()) {
case UnknownField::TYPE_LENGTH_DELIMITED:
total_size += sizeof(*field.data_.length_delimited_.string_value) +
- internal::StringSpaceUsedExcludingSelfLong(
+ internal::StringSpaceUsedExcludingSelfLong(
*field.data_.length_delimited_.string_value);
break;
case UnknownField::TYPE_GROUP:
- total_size += field.data_.group_->SpaceUsedLong();
+ total_size += field.data_.group_->SpaceUsedLong();
break;
default:
break;
@@ -128,7 +128,7 @@ size_t UnknownFieldSet::SpaceUsedExcludingSelfLong() const {
return total_size;
}
-size_t UnknownFieldSet::SpaceUsedLong() const {
+size_t UnknownFieldSet::SpaceUsedLong() const {
return sizeof(*this) + SpaceUsedExcludingSelf();
}
@@ -136,7 +136,7 @@ void UnknownFieldSet::AddVarint(int number, uint64 value) {
UnknownField field;
field.number_ = number;
field.SetType(UnknownField::TYPE_VARINT);
- field.data_.varint_ = value;
+ field.data_.varint_ = value;
fields_.push_back(field);
}
@@ -144,7 +144,7 @@ void UnknownFieldSet::AddFixed32(int number, uint32 value) {
UnknownField field;
field.number_ = number;
field.SetType(UnknownField::TYPE_FIXED32);
- field.data_.fixed32_ = value;
+ field.data_.fixed32_ = value;
fields_.push_back(field);
}
@@ -152,7 +152,7 @@ void UnknownFieldSet::AddFixed64(int number, uint64 value) {
UnknownField field;
field.number_ = number;
field.SetType(UnknownField::TYPE_FIXED64);
- field.data_.fixed64_ = value;
+ field.data_.fixed64_ = value;
fields_.push_back(field);
}
@@ -170,9 +170,9 @@ UnknownFieldSet* UnknownFieldSet::AddGroup(int number) {
UnknownField field;
field.number_ = number;
field.SetType(UnknownField::TYPE_GROUP);
- field.data_.group_ = new UnknownFieldSet;
+ field.data_.group_ = new UnknownFieldSet;
fields_.push_back(field);
- return field.data_.group_;
+ return field.data_.group_;
}
void UnknownFieldSet::AddField(const UnknownField& field) {
@@ -244,7 +244,7 @@ void UnknownField::Delete() {
delete data_.length_delimited_.string_value;
break;
case UnknownField::TYPE_GROUP:
- delete data_.group_;
+ delete data_.group_;
break;
default:
break;
@@ -259,8 +259,8 @@ void UnknownField::DeepCopy(const UnknownField& other) {
break;
case UnknownField::TYPE_GROUP: {
UnknownFieldSet* group = new UnknownFieldSet();
- group->InternalMergeFrom(*data_.group_);
- data_.group_ = group;
+ group->InternalMergeFrom(*data_.group_);
+ data_.group_ = group;
break;
}
default:
diff --git a/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.h b/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.h
index b41778c1c2..e2a8f807d2 100644
--- a/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.h
+++ b/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.h
@@ -101,29 +101,29 @@ class PROTOBUF_EXPORT UnknownFieldSet {
// Similar to above, but this function will destroy the contents of other.
void MergeFromAndDestroy(UnknownFieldSet* other);
- // Merge the contents an UnknownFieldSet with the UnknownFieldSet in
- // *metadata, if there is one. If *metadata doesn't have an UnknownFieldSet
- // then add one to it and make it be a copy of the first arg.
+ // Merge the contents an UnknownFieldSet with the UnknownFieldSet in
+ // *metadata, if there is one. If *metadata doesn't have an UnknownFieldSet
+ // then add one to it and make it be a copy of the first arg.
static void MergeToInternalMetadata(const UnknownFieldSet& other,
internal::InternalMetadata* metadata);
-
+
// Swaps the contents of some other UnknownFieldSet with this one.
inline void Swap(UnknownFieldSet* x);
// Computes (an estimate of) the total number of bytes currently used for
// storing the unknown fields in memory. Does NOT include
// sizeof(*this) in the calculation.
- size_t SpaceUsedExcludingSelfLong() const;
+ size_t SpaceUsedExcludingSelfLong() const;
+
+ int SpaceUsedExcludingSelf() const {
+ return internal::ToIntSize(SpaceUsedExcludingSelfLong());
+ }
- int SpaceUsedExcludingSelf() const {
- return internal::ToIntSize(SpaceUsedExcludingSelfLong());
- }
-
// Version of SpaceUsed() including sizeof(*this).
- size_t SpaceUsedLong() const;
+ size_t SpaceUsedLong() const;
int SpaceUsed() const { return internal::ToIntSize(SpaceUsedLong()); }
-
+
// Returns the number of fields present in the UnknownFieldSet.
inline int field_count() const;
// Get a field in the set, where 0 <= index < field_count(). The fields
@@ -237,7 +237,7 @@ class PROTOBUF_EXPORT UnknownField {
TYPE_GROUP
};
- // The field's field number, as seen on the wire.
+ // The field's field number, as seen on the wire.
inline int number() const;
// The field type.
@@ -268,7 +268,7 @@ class PROTOBUF_EXPORT UnknownField {
output->EpsCopy()));
}
- inline size_t GetLengthDelimitedSize() const;
+ inline size_t GetLengthDelimitedSize() const;
uint8* InternalSerializeLengthDelimitedNoTag(
uint8* target, io::EpsCopyOutputStream* stream) const;
@@ -295,7 +295,7 @@ class PROTOBUF_EXPORT UnknownField {
uint64 fixed64_;
mutable union LengthDelimited length_delimited_;
UnknownFieldSet* group_;
- } data_;
+ } data_;
};
// ===================================================================
@@ -335,24 +335,24 @@ inline void UnknownFieldSet::AddLengthDelimited(int number,
}
-
-
-inline int UnknownField::number() const { return static_cast<int>(number_); }
+
+
+inline int UnknownField::number() const { return static_cast<int>(number_); }
inline UnknownField::Type UnknownField::type() const {
return static_cast<Type>(type_);
}
inline uint64 UnknownField::varint() const {
assert(type() == TYPE_VARINT);
- return data_.varint_;
+ return data_.varint_;
}
inline uint32 UnknownField::fixed32() const {
assert(type() == TYPE_FIXED32);
- return data_.fixed32_;
+ return data_.fixed32_;
}
inline uint64 UnknownField::fixed64() const {
assert(type() == TYPE_FIXED64);
- return data_.fixed64_;
+ return data_.fixed64_;
}
inline const TProtoStringType& UnknownField::length_delimited() const {
assert(type() == TYPE_LENGTH_DELIMITED);
@@ -360,20 +360,20 @@ inline const TProtoStringType& UnknownField::length_delimited() const {
}
inline const UnknownFieldSet& UnknownField::group() const {
assert(type() == TYPE_GROUP);
- return *data_.group_;
+ return *data_.group_;
}
inline void UnknownField::set_varint(uint64 value) {
assert(type() == TYPE_VARINT);
- data_.varint_ = value;
+ data_.varint_ = value;
}
inline void UnknownField::set_fixed32(uint32 value) {
assert(type() == TYPE_FIXED32);
- data_.fixed32_ = value;
+ data_.fixed32_ = value;
}
inline void UnknownField::set_fixed64(uint64 value) {
assert(type() == TYPE_FIXED64);
- data_.fixed64_ = value;
+ data_.fixed64_ = value;
}
inline void UnknownField::set_length_delimited(const TProtoStringType& value) {
assert(type() == TYPE_LENGTH_DELIMITED);
@@ -385,7 +385,7 @@ inline TProtoStringType* UnknownField::mutable_length_delimited() {
}
inline UnknownFieldSet* UnknownField::mutable_group() {
assert(type() == TYPE_GROUP);
- return data_.group_;
+ return data_.group_;
}
template <typename MessageType>
bool UnknownFieldSet::MergeFromMessage(const MessageType& message) {
@@ -394,7 +394,7 @@ bool UnknownFieldSet::MergeFromMessage(const MessageType& message) {
}
-inline size_t UnknownField::GetLengthDelimitedSize() const {
+inline size_t UnknownField::GetLengthDelimitedSize() const {
GOOGLE_DCHECK_EQ(TYPE_LENGTH_DELIMITED, type());
return data_.length_delimited_.string_value->size();
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.cc b/contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.cc
index 6cfe0f6b12..80cab309be 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.cc
@@ -28,100 +28,100 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Adapted from the patch of kenton@google.com (Kenton Varda)
+// Adapted from the patch of kenton@google.com (Kenton Varda)
// See https://github.com/protocolbuffers/protobuf/pull/710 for details.
-
+
#include <google/protobuf/util/delimited_message_util.h>
#include <google/protobuf/io/coded_stream.h>
-
-namespace google {
-namespace protobuf {
-namespace util {
-
+
+namespace google {
+namespace protobuf {
+namespace util {
+
bool SerializeDelimitedToFileDescriptor(const MessageLite& message,
int file_descriptor) {
- io::FileOutputStream output(file_descriptor);
- return SerializeDelimitedToZeroCopyStream(message, &output);
-}
-
+ io::FileOutputStream output(file_descriptor);
+ return SerializeDelimitedToZeroCopyStream(message, &output);
+}
+
bool SerializeDelimitedToOstream(const MessageLite& message,
std::ostream* output) {
- {
- io::OstreamOutputStream zero_copy_output(output);
+ {
+ io::OstreamOutputStream zero_copy_output(output);
if (!SerializeDelimitedToZeroCopyStream(message, &zero_copy_output))
return false;
- }
- return output->good();
-}
-
+ }
+ return output->good();
+}
+
bool ParseDelimitedFromZeroCopyStream(MessageLite* message,
io::ZeroCopyInputStream* input,
bool* clean_eof) {
io::CodedInputStream coded_input(input);
- return ParseDelimitedFromCodedStream(message, &coded_input, clean_eof);
-}
-
+ return ParseDelimitedFromCodedStream(message, &coded_input, clean_eof);
+}
+
bool ParseDelimitedFromCodedStream(MessageLite* message,
io::CodedInputStream* input,
bool* clean_eof) {
- if (clean_eof != NULL) *clean_eof = false;
- int start = input->CurrentPosition();
-
- // Read the size.
- uint32 size;
- if (!input->ReadVarint32(&size)) {
- if (clean_eof != NULL) *clean_eof = input->CurrentPosition() == start;
- return false;
- }
-
+ if (clean_eof != NULL) *clean_eof = false;
+ int start = input->CurrentPosition();
+
+ // Read the size.
+ uint32 size;
+ if (!input->ReadVarint32(&size)) {
+ if (clean_eof != NULL) *clean_eof = input->CurrentPosition() == start;
+ return false;
+ }
+
// Get the position after any size bytes have been read (and only the message
// itself remains).
int position_after_size = input->CurrentPosition();
- // Tell the stream not to read beyond that size.
+ // Tell the stream not to read beyond that size.
io::CodedInputStream::Limit limit = input->PushLimit(size);
-
- // Parse the message.
- if (!message->MergeFromCodedStream(input)) return false;
- if (!input->ConsumedEntireMessage()) return false;
+
+ // Parse the message.
+ if (!message->MergeFromCodedStream(input)) return false;
+ if (!input->ConsumedEntireMessage()) return false;
if (input->CurrentPosition() - position_after_size != static_cast<int>(size))
return false;
-
- // Release the limit.
- input->PopLimit(limit);
-
- return true;
-}
-
+
+ // Release the limit.
+ input->PopLimit(limit);
+
+ return true;
+}
+
bool SerializeDelimitedToZeroCopyStream(const MessageLite& message,
io::ZeroCopyOutputStream* output) {
io::CodedOutputStream coded_output(output);
- return SerializeDelimitedToCodedStream(message, &coded_output);
-}
-
+ return SerializeDelimitedToCodedStream(message, &coded_output);
+}
+
bool SerializeDelimitedToCodedStream(const MessageLite& message,
io::CodedOutputStream* output) {
- // Write the size.
+ // Write the size.
size_t size = message.ByteSizeLong();
if (size > INT_MAX) return false;
- output->WriteVarint32(size);
-
- // Write the content.
- uint8* buffer = output->GetDirectBufferForNBytesAndAdvance(size);
- if (buffer != NULL) {
- // Optimization: The message fits in one buffer, so use the faster
- // direct-to-array serialization path.
- message.SerializeWithCachedSizesToArray(buffer);
- } else {
- // Slightly-slower path when the message is multiple buffers.
- message.SerializeWithCachedSizes(output);
- if (output->HadError()) return false;
- }
-
- return true;
-}
-
-} // namespace util
-} // namespace protobuf
-} // namespace google
+ output->WriteVarint32(size);
+
+ // Write the content.
+ uint8* buffer = output->GetDirectBufferForNBytesAndAdvance(size);
+ if (buffer != NULL) {
+ // Optimization: The message fits in one buffer, so use the faster
+ // direct-to-array serialization path.
+ message.SerializeWithCachedSizesToArray(buffer);
+ } else {
+ // Slightly-slower path when the message is multiple buffers.
+ message.SerializeWithCachedSizes(output);
+ if (output->HadError()) return false;
+ }
+
+ return true;
+}
+
+} // namespace util
+} // namespace protobuf
+} // namespace google
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.h b/contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.h
index af2c12baa4..d3f7dbe8ad 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.h
@@ -28,81 +28,81 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Adapted from the patch of kenton@google.com (Kenton Varda)
+// Adapted from the patch of kenton@google.com (Kenton Varda)
// See https://github.com/protocolbuffers/protobuf/pull/710 for details.
-
-#ifndef GOOGLE_PROTOBUF_UTIL_DELIMITED_MESSAGE_UTIL_H__
-#define GOOGLE_PROTOBUF_UTIL_DELIMITED_MESSAGE_UTIL_H__
-
-#include <ostream>
-
+#ifndef GOOGLE_PROTOBUF_UTIL_DELIMITED_MESSAGE_UTIL_H__
+#define GOOGLE_PROTOBUF_UTIL_DELIMITED_MESSAGE_UTIL_H__
+
+
+#include <ostream>
+
#include <google/protobuf/message_lite.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
-
+
#include <google/protobuf/port_def.inc>
-namespace google {
-namespace protobuf {
-namespace util {
-
-// Write a single size-delimited message from the given stream. Delimited
-// format allows a single file or stream to contain multiple messages,
-// whereas normally writing multiple non-delimited messages to the same
-// stream would cause them to be merged. A delimited message is a varint
-// encoding the message size followed by a message of exactly that size.
-//
-// Note that if you want to *read* a delimited message from a file descriptor
-// or istream, you will need to construct an io::FileInputStream or
-// io::OstreamInputStream (implementations of io::ZeroCopyStream) and use the
-// utility function ParseDelimitedFromZeroCopyStream(). You must then
-// continue to use the same ZeroCopyInputStream to read all further data from
-// the stream until EOF. This is because these ZeroCopyInputStream
-// implementations are buffered: they read a big chunk of data at a time,
-// then parse it. As a result, they may read past the end of the delimited
-// message. There is no way for them to push the extra data back into the
-// underlying source, so instead you must keep using the same stream object.
+namespace google {
+namespace protobuf {
+namespace util {
+
+// Write a single size-delimited message from the given stream. Delimited
+// format allows a single file or stream to contain multiple messages,
+// whereas normally writing multiple non-delimited messages to the same
+// stream would cause them to be merged. A delimited message is a varint
+// encoding the message size followed by a message of exactly that size.
+//
+// Note that if you want to *read* a delimited message from a file descriptor
+// or istream, you will need to construct an io::FileInputStream or
+// io::OstreamInputStream (implementations of io::ZeroCopyStream) and use the
+// utility function ParseDelimitedFromZeroCopyStream(). You must then
+// continue to use the same ZeroCopyInputStream to read all further data from
+// the stream until EOF. This is because these ZeroCopyInputStream
+// implementations are buffered: they read a big chunk of data at a time,
+// then parse it. As a result, they may read past the end of the delimited
+// message. There is no way for them to push the extra data back into the
+// underlying source, so instead you must keep using the same stream object.
bool PROTOBUF_EXPORT SerializeDelimitedToFileDescriptor(
const MessageLite& message, int file_descriptor);
-
+
bool PROTOBUF_EXPORT SerializeDelimitedToOstream(const MessageLite& message,
std::ostream* output);
-
-// Read a single size-delimited message from the given stream. Delimited
-// format allows a single file or stream to contain multiple messages,
-// whereas normally parsing consumes the entire input. A delimited message
-// is a varint encoding the message size followed by a message of exactly
-// that size.
-//
-// If |clean_eof| is not NULL, then it will be set to indicate whether the
-// stream ended cleanly. That is, if the stream ends without this method
-// having read any data at all from it, then *clean_eof will be set true,
-// otherwise it will be set false. Note that these methods return false
-// on EOF, but they also return false on other errors, so |clean_eof| is
-// needed to distinguish a clean end from errors.
+
+// Read a single size-delimited message from the given stream. Delimited
+// format allows a single file or stream to contain multiple messages,
+// whereas normally parsing consumes the entire input. A delimited message
+// is a varint encoding the message size followed by a message of exactly
+// that size.
+//
+// If |clean_eof| is not NULL, then it will be set to indicate whether the
+// stream ended cleanly. That is, if the stream ends without this method
+// having read any data at all from it, then *clean_eof will be set true,
+// otherwise it will be set false. Note that these methods return false
+// on EOF, but they also return false on other errors, so |clean_eof| is
+// needed to distinguish a clean end from errors.
bool PROTOBUF_EXPORT ParseDelimitedFromZeroCopyStream(
MessageLite* message, io::ZeroCopyInputStream* input, bool* clean_eof);
-
+
bool PROTOBUF_EXPORT ParseDelimitedFromCodedStream(MessageLite* message,
io::CodedInputStream* input,
bool* clean_eof);
-
-// Write a single size-delimited message from the given stream. Delimited
-// format allows a single file or stream to contain multiple messages,
-// whereas normally writing multiple non-delimited messages to the same
-// stream would cause them to be merged. A delimited message is a varint
-// encoding the message size followed by a message of exactly that size.
+
+// Write a single size-delimited message from the given stream. Delimited
+// format allows a single file or stream to contain multiple messages,
+// whereas normally writing multiple non-delimited messages to the same
+// stream would cause them to be merged. A delimited message is a varint
+// encoding the message size followed by a message of exactly that size.
bool PROTOBUF_EXPORT SerializeDelimitedToZeroCopyStream(
const MessageLite& message, io::ZeroCopyOutputStream* output);
-
+
bool PROTOBUF_EXPORT SerializeDelimitedToCodedStream(
const MessageLite& message, io::CodedOutputStream* output);
-
-} // namespace util
-} // namespace protobuf
-} // namespace google
-
+
+} // namespace util
+} // namespace protobuf
+} // namespace google
+
#include <google/protobuf/port_undef.inc>
-#endif // GOOGLE_PROTOBUF_UTIL_DELIMITED_MESSAGE_UTIL_H__
+#endif // GOOGLE_PROTOBUF_UTIL_DELIMITED_MESSAGE_UTIL_H__
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/field_comparator.h b/contrib/libs/protobuf/src/google/protobuf/util/field_comparator.h
index 9771be161c..434400eb45 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/field_comparator.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/field_comparator.h
@@ -28,8 +28,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Defines classes for field comparison.
-
+// Defines classes for field comparison.
+
#ifndef GOOGLE_PROTOBUF_UTIL_FIELD_COMPARATOR_H__
#define GOOGLE_PROTOBUF_UTIL_FIELD_COMPARATOR_H__
@@ -243,7 +243,7 @@ class PROTOBUF_EXPORT SimpleFieldComparator : public FieldComparator {
// True iff default_tolerance_ has been explicitly set.
//
- // If false, then the default tolerance for floats and doubles is that which
+ // If false, then the default tolerance for floats and doubles is that which
// is used by MathUtil::AlmostEquals().
bool has_default_tolerance_;
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/field_mask_util.cc b/contrib/libs/protobuf/src/google/protobuf/util/field_mask_util.cc
index 9bc12e807a..959d5586d2 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/field_mask_util.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/field_mask_util.cc
@@ -136,12 +136,12 @@ bool FieldMaskUtil::FromJsonString(StringPiece str, FieldMask* out) {
return true;
}
-bool FieldMaskUtil::GetFieldDescriptors(
- const Descriptor* descriptor, StringPiece path,
- std::vector<const FieldDescriptor*>* field_descriptors) {
+bool FieldMaskUtil::GetFieldDescriptors(
+ const Descriptor* descriptor, StringPiece path,
+ std::vector<const FieldDescriptor*>* field_descriptors) {
if (field_descriptors != nullptr) {
- field_descriptors->clear();
- }
+ field_descriptors->clear();
+ }
std::vector<TProtoStringType> parts = Split(path, ".");
for (int i = 0; i < parts.size(); ++i) {
const TProtoStringType& field_name = parts[i];
@@ -153,8 +153,8 @@ bool FieldMaskUtil::GetFieldDescriptors(
return false;
}
if (field_descriptors != nullptr) {
- field_descriptors->push_back(field);
- }
+ field_descriptors->push_back(field);
+ }
if (!field->is_repeated() &&
field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
descriptor = field->message_type();
@@ -222,18 +222,18 @@ class FieldMaskTree {
MergeMessage(&root_, source, options, destination);
}
- // Add required field path of the message to this tree based on current tree
- // structure. If a message is present in the tree, add the path of its
- // required field to the tree. This is to make sure that after trimming a
- // message with required fields are set, check IsInitialized() will not fail.
- void AddRequiredFieldPath(const Descriptor* descriptor) {
- // Do nothing if the tree is empty.
- if (root_.children.empty()) {
- return;
- }
- AddRequiredFieldPath(&root_, descriptor);
- }
-
+ // Add required field path of the message to this tree based on current tree
+ // structure. If a message is present in the tree, add the path of its
+ // required field to the tree. This is to make sure that after trimming a
+ // message with required fields are set, check IsInitialized() will not fail.
+ void AddRequiredFieldPath(const Descriptor* descriptor) {
+ // Do nothing if the tree is empty.
+ if (root_.children.empty()) {
+ return;
+ }
+ AddRequiredFieldPath(&root_, descriptor);
+ }
+
// Trims all fields not specified by this tree from the given message.
// Returns true if the message is modified.
bool TrimMessage(Message* message) {
@@ -278,12 +278,12 @@ class FieldMaskTree {
const FieldMaskUtil::MergeOptions& options,
Message* destination);
- // Add required field path of the message to this tree based on current tree
- // structure. If a message is present in the tree, add the path of its
- // required field to the tree. This is to make sure that after trimming a
- // message with required fields are set, check IsInitialized() will not fail.
- void AddRequiredFieldPath(Node* node, const Descriptor* descriptor);
-
+ // Add required field path of the message to this tree based on current tree
+ // structure. If a message is present in the tree, add the path of its
+ // required field to the tree. This is to make sure that after trimming a
+ // message with required fields are set, check IsInitialized() will not fail.
+ void AddRequiredFieldPath(Node* node, const Descriptor* descriptor);
+
// Trims all fields not specified by this sub-tree from the given message.
// Returns true if the message is actually modified
bool TrimMessage(const Node* node, Message* message);
@@ -556,38 +556,38 @@ void FieldMaskTree::MergeMessage(const Node* node, const Message& source,
void FieldMaskTree::AddRequiredFieldPath(Node* node,
const Descriptor* descriptor) {
const int32_t field_count = descriptor->field_count();
- for (int index = 0; index < field_count; ++index) {
- const FieldDescriptor* field = descriptor->field(index);
- if (field->is_required()) {
+ for (int index = 0; index < field_count; ++index) {
+ const FieldDescriptor* field = descriptor->field(index);
+ if (field->is_required()) {
const TProtoStringType& node_name = field->name();
- Node*& child = node->children[node_name];
+ Node*& child = node->children[node_name];
if (child == nullptr) {
- // Add required field path to the tree
- child = new Node();
+ // Add required field path to the tree
+ child = new Node();
} else if (child->children.empty()) {
- // If the required field is in the tree and does not have any children,
- // do nothing.
- continue;
- }
- // Add required field in the children to the tree if the field is message.
- if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
- AddRequiredFieldPath(child, field->message_type());
- }
- } else if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
+ // If the required field is in the tree and does not have any children,
+ // do nothing.
+ continue;
+ }
+ // Add required field in the children to the tree if the field is message.
+ if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
+ AddRequiredFieldPath(child, field->message_type());
+ }
+ } else if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
std::map<TProtoStringType, Node*>::const_iterator it =
- node->children.find(field->name());
- if (it != node->children.end()) {
- // Add required fields in the children to the
- // tree if the field is a message and present in the tree.
- Node* child = it->second;
- if (!child->children.empty()) {
- AddRequiredFieldPath(child, field->message_type());
- }
- }
- }
- }
-}
-
+ node->children.find(field->name());
+ if (it != node->children.end()) {
+ // Add required fields in the children to the
+ // tree if the field is a message and present in the tree.
+ Node* child = it->second;
+ if (!child->children.empty()) {
+ AddRequiredFieldPath(child, field->message_type());
+ }
+ }
+ }
+ }
+}
+
bool FieldMaskTree::TrimMessage(const Node* node, Message* message) {
GOOGLE_DCHECK(!node->children.empty());
const Reflection* reflection = message->GetReflection();
@@ -597,8 +597,8 @@ bool FieldMaskTree::TrimMessage(const Node* node, Message* message) {
for (int index = 0; index < field_count; ++index) {
const FieldDescriptor* field = descriptor->field(index);
std::map<TProtoStringType, Node*>::const_iterator it =
- node->children.find(field->name());
- if (it == node->children.end()) {
+ node->children.find(field->name());
+ if (it == node->children.end()) {
if (field->is_repeated()) {
if (reflection->FieldSize(*message, field) != 0) {
modified = true;
@@ -611,8 +611,8 @@ bool FieldMaskTree::TrimMessage(const Node* node, Message* message) {
reflection->ClearField(message, field);
} else {
if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
- Node* child = it->second;
- if (!child->children.empty() && reflection->HasField(*message, field)) {
+ Node* child = it->second;
+ if (!child->children.empty() && reflection->HasField(*message, field)) {
bool nestedMessageChanged =
TrimMessage(child, reflection->MutableMessage(message, field));
modified = nestedMessageChanged || modified;
@@ -705,19 +705,19 @@ bool FieldMaskUtil::TrimMessage(const FieldMask& mask, Message* message) {
}
bool FieldMaskUtil::TrimMessage(const FieldMask& mask, Message* message,
- const TrimOptions& options) {
- // Build a FieldMaskTree and walk through the tree to merge all specified
- // fields.
- FieldMaskTree tree;
- tree.MergeFromFieldMask(mask);
+ const TrimOptions& options) {
+ // Build a FieldMaskTree and walk through the tree to merge all specified
+ // fields.
+ FieldMaskTree tree;
+ tree.MergeFromFieldMask(mask);
// If keep_required_fields is true, implicitly add required fields of
- // a message present in the tree to prevent from trimming.
- if (options.keep_required_fields()) {
+ // a message present in the tree to prevent from trimming.
+ if (options.keep_required_fields()) {
tree.AddRequiredFieldPath(GOOGLE_CHECK_NOTNULL(message->GetDescriptor()));
- }
+ }
return tree.TrimMessage(GOOGLE_CHECK_NOTNULL(message));
-}
-
+}
+
} // namespace util
} // namespace protobuf
} // namespace google
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/field_mask_util.h b/contrib/libs/protobuf/src/google/protobuf/util/field_mask_util.h
index 526f18c94a..70f8f55446 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/field_mask_util.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/field_mask_util.h
@@ -28,8 +28,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Defines utilities for the FieldMask well known type.
-
+// Defines utilities for the FieldMask well known type.
+
#ifndef GOOGLE_PROTOBUF_UTIL_FIELD_MASK_UTIL_H__
#define GOOGLE_PROTOBUF_UTIL_FIELD_MASK_UTIL_H__
@@ -78,14 +78,14 @@ class PROTOBUF_EXPORT FieldMaskUtil {
static bool ToJsonString(const FieldMask& mask, TProtoStringType* out);
static bool FromJsonString(StringPiece str, FieldMask* out);
- // Get the descriptors of the fields which the given path from the message
- // descriptor traverses, if field_descriptors is not null.
- // Return false if the path is not valid, and the content of field_descriptors
- // is unspecified.
- static bool GetFieldDescriptors(
- const Descriptor* descriptor, StringPiece path,
- std::vector<const FieldDescriptor*>* field_descriptors);
-
+ // Get the descriptors of the fields which the given path from the message
+ // descriptor traverses, if field_descriptors is not null.
+ // Return false if the path is not valid, and the content of field_descriptors
+ // is unspecified.
+ static bool GetFieldDescriptors(
+ const Descriptor* descriptor, StringPiece path,
+ std::vector<const FieldDescriptor*>* field_descriptors);
+
// Checks whether the given path is valid for type T.
template <typename T>
static bool IsValidPath(StringPiece path) {
@@ -97,7 +97,7 @@ class PROTOBUF_EXPORT FieldMaskUtil {
static bool IsValidFieldMask(const FieldMask& mask) {
for (int i = 0; i < mask.paths_size(); ++i) {
if (!GetFieldDescriptors(T::descriptor(), mask.paths(i), nullptr))
- return false;
+ return false;
}
return true;
}
@@ -165,19 +165,19 @@ class PROTOBUF_EXPORT FieldMaskUtil {
static void MergeMessageTo(const Message& source, const FieldMask& mask,
const MergeOptions& options, Message* destination);
- class TrimOptions;
+ class TrimOptions;
// Removes from 'message' any field that is not represented in the given
// FieldMask. If the FieldMask is empty, does nothing.
// Returns true if the message is modified.
static bool TrimMessage(const FieldMask& mask, Message* message);
- // Removes from 'message' any field that is not represented in the given
- // FieldMask with customized TrimOptions.
- // If the FieldMask is empty, does nothing.
+ // Removes from 'message' any field that is not represented in the given
+ // FieldMask with customized TrimOptions.
+ // If the FieldMask is empty, does nothing.
// Returns true if the message is modified.
static bool TrimMessage(const FieldMask& mask, Message* message,
- const TrimOptions& options);
-
+ const TrimOptions& options);
+
private:
friend class SnakeCaseCamelCaseTest;
// Converts a field name from snake_case to camelCase:
@@ -240,19 +240,19 @@ class PROTOBUF_EXPORT FieldMaskUtil::MergeOptions {
};
class PROTOBUF_EXPORT FieldMaskUtil::TrimOptions {
- public:
+ public:
TrimOptions() : keep_required_fields_(false) {}
- // When trimming message fields, the default behavior is to trim required
- // fields of the present message if they are not specified in the field mask.
- // If you instead want to keep required fields of the present message even
+ // When trimming message fields, the default behavior is to trim required
+ // fields of the present message if they are not specified in the field mask.
+ // If you instead want to keep required fields of the present message even
// they are not specified in the field mask, set this flag to true.
void set_keep_required_fields(bool value) { keep_required_fields_ = value; }
- bool keep_required_fields() const { return keep_required_fields_; }
-
- private:
- bool keep_required_fields_;
-};
-
+ bool keep_required_fields() const { return keep_required_fields_; }
+
+ private:
+ bool keep_required_fields_;
+};
+
} // namespace util
} // namespace protobuf
} // namespace google
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.cc b/contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.cc
index 7c3cdc41bc..777dadf820 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.cc
@@ -87,23 +87,23 @@ util::StatusOr<To> FloatingPointToIntConvertAndCheck(From before) {
// For conversion between double and float only.
util::StatusOr<double> FloatToDouble(float before) {
- // Casting float to double should just work as double has more precision
- // than float.
- return static_cast<double>(before);
-}
+ // Casting float to double should just work as double has more precision
+ // than float.
+ return static_cast<double>(before);
+}
util::StatusOr<float> DoubleToFloat(double before) {
if (std::isnan(before)) {
- return std::numeric_limits<float>::quiet_NaN();
+ return std::numeric_limits<float>::quiet_NaN();
} else if (!std::isfinite(before)) {
- // Converting a double +inf/-inf to float should just work.
- return static_cast<float>(before);
- } else if (before > std::numeric_limits<float>::max() ||
- before < -std::numeric_limits<float>::max()) {
- // Double value outside of the range of float.
+ // Converting a double +inf/-inf to float should just work.
+ return static_cast<float>(before);
+ } else if (before > std::numeric_limits<float>::max() ||
+ before < -std::numeric_limits<float>::max()) {
+ // Double value outside of the range of float.
return util::InvalidArgumentError(DoubleAsString(before));
} else {
- return static_cast<float>(before);
+ return static_cast<float>(before);
}
}
@@ -163,7 +163,7 @@ util::StatusOr<uint64_t> DataPiece::ToUint64() const {
util::StatusOr<double> DataPiece::ToDouble() const {
if (type_ == TYPE_FLOAT) {
- return FloatToDouble(float_);
+ return FloatToDouble(float_);
}
if (type_ == TYPE_STRING) {
if (str_ == "Infinity") return std::numeric_limits<double>::infinity();
@@ -171,19 +171,19 @@ util::StatusOr<double> DataPiece::ToDouble() const {
if (str_ == "NaN") return std::numeric_limits<double>::quiet_NaN();
util::StatusOr<double> value = StringToNumber<double>(safe_strtod);
if (value.ok() && !std::isfinite(value.value())) {
- // safe_strtod converts out-of-range values to +inf/-inf, but we want
- // to report them as errors.
+ // safe_strtod converts out-of-range values to +inf/-inf, but we want
+ // to report them as errors.
return util::InvalidArgumentError(StrCat("\"", str_, "\""));
- } else {
- return value;
- }
+ } else {
+ return value;
+ }
}
return GenericConvert<double>();
}
util::StatusOr<float> DataPiece::ToFloat() const {
if (type_ == TYPE_DOUBLE) {
- return DoubleToFloat(double_);
+ return DoubleToFloat(double_);
}
if (type_ == TYPE_STRING) {
if (str_ == "Infinity") return std::numeric_limits<float>::infinity();
@@ -282,16 +282,16 @@ util::StatusOr<int> DataPiece::ToEnum(const google::protobuf::Enum* enum_type,
const google::protobuf::EnumValue* value =
FindEnumValueByNameOrNull(enum_type, enum_name);
if (value != nullptr) return value->number();
-
- // Check if int version of enum is sent as string.
+
+ // Check if int version of enum is sent as string.
util::StatusOr<int32_t> int_value = ToInt32();
- if (int_value.ok()) {
- if (const google::protobuf::EnumValue* enum_value =
+ if (int_value.ok()) {
+ if (const google::protobuf::EnumValue* enum_value =
FindEnumValueByNumberOrNull(enum_type, int_value.value())) {
- return enum_value->number();
- }
- }
-
+ return enum_value->number();
+ }
+ }
+
// Next try a normalized name.
bool should_normalize_enum =
case_insensitive_enum_parsing || use_lower_camel_for_enums;
@@ -303,14 +303,14 @@ util::StatusOr<int> DataPiece::ToEnum(const google::protobuf::Enum* enum_type,
value = FindEnumValueByNameOrNull(enum_type, enum_name);
if (value != nullptr) return value->number();
}
-
- // If use_lower_camel_for_enums is true try with enum name without
- // underscore. This will also accept camel case names as the enum_name has
- // been normalized before.
- if (use_lower_camel_for_enums) {
- value = FindEnumValueByNameWithoutUnderscoreOrNull(enum_type, enum_name);
+
+ // If use_lower_camel_for_enums is true try with enum name without
+ // underscore. This will also accept camel case names as the enum_name has
+ // been normalized before.
+ if (use_lower_camel_for_enums) {
+ value = FindEnumValueByNameWithoutUnderscoreOrNull(enum_type, enum_name);
if (value != nullptr) return value->number();
- }
+ }
// If ignore_unknown_enum_values is true an unknown enum value is ignored.
if (ignore_unknown_enum_values) {
@@ -320,9 +320,9 @@ util::StatusOr<int> DataPiece::ToEnum(const google::protobuf::Enum* enum_type,
}
}
} else {
- // We don't need to check whether the value is actually declared in the
- // enum because we preserve unknown enum values as well.
- return ToInt32();
+ // We don't need to check whether the value is actually declared in the
+ // enum because we preserve unknown enum values as well.
+ return ToInt32();
}
return util::InvalidArgumentError(
ValueAsStringOrDefault("Cannot find enum with given value."));
@@ -398,7 +398,7 @@ bool DataPiece::DecodeBase64(StringPiece src, TProtoStringType* dest) const {
void DataPiece::InternalCopy(const DataPiece& other) {
type_ = other.type_;
- use_strict_base64_decoding_ = other.use_strict_base64_decoding_;
+ use_strict_base64_decoding_ = other.use_strict_base64_decoding_;
switch (type_) {
case TYPE_INT32:
case TYPE_INT64:
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.h b/contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.h
index c88523b49d..ac0029e44b 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.h
@@ -79,27 +79,27 @@ class PROTOBUF_EXPORT DataPiece {
explicit DataPiece(const int32_t value)
: type_(TYPE_INT32), i32_(value), use_strict_base64_decoding_(false) {}
#if defined(_32_) && (defined(_darwin_) || defined(_ios))
- explicit DataPiece(const int32 value)
- : type_(TYPE_INT32), i32_(value), use_strict_base64_decoding_(false) {}
+ explicit DataPiece(const int32 value)
+ : type_(TYPE_INT32), i32_(value), use_strict_base64_decoding_(false) {}
#endif
explicit DataPiece(const int64_t value)
: type_(TYPE_INT64), i64_(value), use_strict_base64_decoding_(false) {}
#if defined(_64_) && (defined(_darwin_) || defined(_ios_))
- explicit DataPiece(const int64 value)
- : type_(TYPE_INT64), i64_(value), use_strict_base64_decoding_(false) {}
+ explicit DataPiece(const int64 value)
+ : type_(TYPE_INT64), i64_(value), use_strict_base64_decoding_(false) {}
#endif
explicit DataPiece(const uint32_t value)
- : type_(TYPE_UINT32), u32_(value), use_strict_base64_decoding_(false) {}
+ : type_(TYPE_UINT32), u32_(value), use_strict_base64_decoding_(false) {}
explicit DataPiece(const uint64_t value)
- : type_(TYPE_UINT64), u64_(value), use_strict_base64_decoding_(false) {}
- explicit DataPiece(const double value)
- : type_(TYPE_DOUBLE),
- double_(value),
- use_strict_base64_decoding_(false) {}
- explicit DataPiece(const float value)
- : type_(TYPE_FLOAT), float_(value), use_strict_base64_decoding_(false) {}
- explicit DataPiece(const bool value)
- : type_(TYPE_BOOL), bool_(value), use_strict_base64_decoding_(false) {}
+ : type_(TYPE_UINT64), u64_(value), use_strict_base64_decoding_(false) {}
+ explicit DataPiece(const double value)
+ : type_(TYPE_DOUBLE),
+ double_(value),
+ use_strict_base64_decoding_(false) {}
+ explicit DataPiece(const float value)
+ : type_(TYPE_FLOAT), float_(value), use_strict_base64_decoding_(false) {}
+ explicit DataPiece(const bool value)
+ : type_(TYPE_BOOL), bool_(value), use_strict_base64_decoding_(false) {}
DataPiece(StringPiece value, bool use_strict_base64_decoding)
: type_(TYPE_STRING),
str_(value),
@@ -125,8 +125,8 @@ class PROTOBUF_EXPORT DataPiece {
// Accessors
Type type() const { return type_; }
- bool use_strict_base64_decoding() { return use_strict_base64_decoding_; }
-
+ bool use_strict_base64_decoding() { return use_strict_base64_decoding_; }
+
StringPiece str() const {
GOOGLE_LOG_IF(DFATAL, type_ != TYPE_STRING) << "Not a string type.";
return str_;
@@ -171,7 +171,7 @@ class PROTOBUF_EXPORT DataPiece {
// Helper to create NULL or ENUM types.
DataPiece(Type type, int32_t val)
- : type_(type), i32_(val), use_strict_base64_decoding_(false) {}
+ : type_(type), i32_(val), use_strict_base64_decoding_(false) {}
// Same as the ToEnum() method above but with additional flag to ignore
// unknown enum values.
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc b/contrib/libs/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc
index b7b69d52a5..9f5a91362f 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc
@@ -65,7 +65,7 @@ DefaultValueObjectWriter::DefaultValueObjectWriter(
current_(nullptr),
root_(nullptr),
suppress_empty_list_(false),
- preserve_proto_field_names_(false),
+ preserve_proto_field_names_(false),
use_ints_for_enums_(false),
ow_(ow) {}
@@ -163,10 +163,10 @@ DefaultValueObjectWriter* DefaultValueObjectWriter::RenderBytes(
if (current_ == nullptr) {
ow_->RenderBytes(name, value);
} else {
- // Since StringPiece is essentially a pointer, takes a copy of "value" to
- // avoid ownership issues.
+ // Since StringPiece is essentially a pointer, takes a copy of "value" to
+ // avoid ownership issues.
string_values_.emplace_back(new TProtoStringType(value));
- RenderDataPiece(name, DataPiece(*string_values_.back(), false, true));
+ RenderDataPiece(name, DataPiece(*string_values_.back(), false, true));
}
return this;
}
@@ -186,17 +186,17 @@ void DefaultValueObjectWriter::RegisterFieldScrubCallBack(
field_scrub_callback_ = std::move(field_scrub_callback);
}
-DefaultValueObjectWriter::Node* DefaultValueObjectWriter::CreateNewNode(
+DefaultValueObjectWriter::Node* DefaultValueObjectWriter::CreateNewNode(
const TProtoStringType& name, const google::protobuf::Type* type, NodeKind kind,
const DataPiece& data, bool is_placeholder,
const std::vector<TProtoStringType>& path, bool suppress_empty_list,
bool preserve_proto_field_names, bool use_ints_for_enums,
FieldScrubCallBack field_scrub_callback) {
- return new Node(name, type, kind, data, is_placeholder, path,
- suppress_empty_list, preserve_proto_field_names,
+ return new Node(name, type, kind, data, is_placeholder, path,
+ suppress_empty_list, preserve_proto_field_names,
use_ints_for_enums, std::move(field_scrub_callback));
-}
-
+}
+
DefaultValueObjectWriter::Node::Node(
const TProtoStringType& name, const google::protobuf::Type* type, NodeKind kind,
const DataPiece& data, bool is_placeholder,
@@ -211,10 +211,10 @@ DefaultValueObjectWriter::Node::Node(
is_placeholder_(is_placeholder),
path_(path),
suppress_empty_list_(suppress_empty_list),
- preserve_proto_field_names_(preserve_proto_field_names),
+ preserve_proto_field_names_(preserve_proto_field_names),
use_ints_for_enums_(use_ints_for_enums),
field_scrub_callback_(std::move(field_scrub_callback)) {}
-
+
DefaultValueObjectWriter::Node* DefaultValueObjectWriter::Node::FindChild(
StringPiece name) {
if (name.empty() || kind_ != OBJECT) {
@@ -374,9 +374,9 @@ void DefaultValueObjectWriter::Node::PopulateChildren(
}
// If oneof_index() != 0, the child field is part of a "oneof", which means
- // the child field is optional and we shouldn't populate its default
- // primitive value.
- if (field.oneof_index() != 0 && kind == PRIMITIVE) continue;
+ // the child field is optional and we shouldn't populate its default
+ // primitive value.
+ if (field.oneof_index() != 0 && kind == PRIMITIVE) continue;
// If the child field is of primitive type, sets its data to the default
// value of its type.
@@ -491,8 +491,8 @@ DefaultValueObjectWriter* DefaultValueObjectWriter::StartObject(
if (current_ == nullptr) {
std::vector<TProtoStringType> path;
root_.reset(CreateNewNode(TProtoStringType(name), &type_, OBJECT,
- DataPiece::NullData(), false, path,
- suppress_empty_list_, preserve_proto_field_names_,
+ DataPiece::NullData(), false, path,
+ suppress_empty_list_, preserve_proto_field_names_,
use_ints_for_enums_, field_scrub_callback_));
root_->PopulateChildren(typeinfo_);
current_ = root_.get();
@@ -505,12 +505,12 @@ DefaultValueObjectWriter* DefaultValueObjectWriter::StartObject(
// the type of current_ as the type of the new child.
std::unique_ptr<Node> node(
CreateNewNode(TProtoStringType(name),
- ((current_->kind() == LIST || current_->kind() == MAP)
- ? current_->type()
+ ((current_->kind() == LIST || current_->kind() == MAP)
+ ? current_->type()
: nullptr),
- OBJECT, DataPiece::NullData(), false,
+ OBJECT, DataPiece::NullData(), false,
child == nullptr ? current_->path() : child->path(),
- suppress_empty_list_, preserve_proto_field_names_,
+ suppress_empty_list_, preserve_proto_field_names_,
use_ints_for_enums_, field_scrub_callback_));
child = node.get();
current_->AddChild(node.release());
@@ -586,28 +586,28 @@ void DefaultValueObjectWriter::RenderDataPiece(StringPiece name,
const DataPiece& data) {
MaybePopulateChildrenOfAny(current_);
if (current_->type() != nullptr && current_->type()->name() == kAnyType &&
- name == "@type") {
+ name == "@type") {
util::StatusOr<TProtoStringType> data_string = data.ToString();
- if (data_string.ok()) {
+ if (data_string.ok()) {
const TProtoStringType& string_value = data_string.value();
- // If the type of current_ is "Any" and its "@type" field is being set
- // here, sets the type of current_ to be the type specified by the
- // "@type".
- util::StatusOr<const google::protobuf::Type*> found_type =
- typeinfo_->ResolveTypeUrl(string_value);
- if (!found_type.ok()) {
- GOOGLE_LOG(WARNING) << "Failed to resolve type '" << string_value << "'.";
- } else {
+ // If the type of current_ is "Any" and its "@type" field is being set
+ // here, sets the type of current_ to be the type specified by the
+ // "@type".
+ util::StatusOr<const google::protobuf::Type*> found_type =
+ typeinfo_->ResolveTypeUrl(string_value);
+ if (!found_type.ok()) {
+ GOOGLE_LOG(WARNING) << "Failed to resolve type '" << string_value << "'.";
+ } else {
current_->set_type(found_type.value());
- }
- current_->set_is_any(true);
- // If the "@type" field is placed after other fields, we should populate
- // other children of primitive type now. Otherwise, we should wait until
- // the first value field is rendered before we populate the children,
- // because the "value" field of a Any message could be omitted.
+ }
+ current_->set_is_any(true);
+ // If the "@type" field is placed after other fields, we should populate
+ // other children of primitive type now. Otherwise, we should wait until
+ // the first value field is rendered before we populate the children,
+ // because the "value" field of a Any message could be omitted.
if (current_->number_of_children() > 1 && current_->type() != nullptr) {
- current_->PopulateChildren(typeinfo_);
- }
+ current_->PopulateChildren(typeinfo_);
+ }
}
}
Node* child = current_->FindChild(name);
@@ -616,12 +616,12 @@ void DefaultValueObjectWriter::RenderDataPiece(StringPiece name,
std::unique_ptr<Node> node(
CreateNewNode(TProtoStringType(name), nullptr, PRIMITIVE, data, false,
child == nullptr ? current_->path() : child->path(),
- suppress_empty_list_, preserve_proto_field_names_,
+ suppress_empty_list_, preserve_proto_field_names_,
use_ints_for_enums_, field_scrub_callback_));
current_->AddChild(node.release());
} else {
child->set_data(data);
- child->set_is_placeholder(false);
+ child->set_is_placeholder(false);
}
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h b/contrib/libs/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h
index 9339ebd108..ff8af3df22 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h
@@ -127,16 +127,16 @@ class PROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter {
// are written.
void set_suppress_empty_list(bool value) { suppress_empty_list_ = value; }
- // If set to true, original proto field names are used
- void set_preserve_proto_field_names(bool value) {
- preserve_proto_field_names_ = value;
- }
-
+ // If set to true, original proto field names are used
+ void set_preserve_proto_field_names(bool value) {
+ preserve_proto_field_names_ = value;
+ }
+
// If set to true, enums are rendered as ints from output when default values
// are written.
void set_print_enums_as_ints(bool value) { use_ints_for_enums_ = value; }
- protected:
+ protected:
enum NodeKind {
PRIMITIVE = 0,
OBJECT = 1,
@@ -168,12 +168,12 @@ class PROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter {
// Populates children of this Node based on its type. If there are already
// children created, they will be merged to the result. Caller should pass
// in TypeInfo for looking up types of the children.
- virtual void PopulateChildren(const TypeInfo* typeinfo);
+ virtual void PopulateChildren(const TypeInfo* typeinfo);
// If this node is a leaf (has data), writes the current node to the
// ObjectWriter; if not, then recursively writes the children to the
// ObjectWriter.
- virtual void WriteTo(ObjectWriter* ow);
+ virtual void WriteTo(ObjectWriter* ow);
// Accessors
const TProtoStringType& name() const { return name_; }
@@ -198,7 +198,7 @@ class PROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter {
is_placeholder_ = is_placeholder;
}
- protected:
+ protected:
// Returns the Value Type of a map given the Type of the map entry and a
// TypeInfo instance.
const google::protobuf::Type* GetMapValueType(
@@ -231,45 +231,45 @@ class PROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter {
// Whether to suppress empty list output.
bool suppress_empty_list_;
- // Whether to preserve original proto field names
- bool preserve_proto_field_names_;
-
+ // Whether to preserve original proto field names
+ bool preserve_proto_field_names_;
+
// Whether to always print enums as ints
bool use_ints_for_enums_;
// Function for determining whether a field needs to be scrubbed or not.
FieldScrubCallBack field_scrub_callback_;
- private:
+ private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Node);
};
- // Creates a new Node and returns it. Caller owns memory of returned object.
+ // Creates a new Node and returns it. Caller owns memory of returned object.
virtual Node* CreateNewNode(const TProtoStringType& name,
- const google::protobuf::Type* type, NodeKind kind,
- const DataPiece& data, bool is_placeholder,
+ const google::protobuf::Type* type, NodeKind kind,
+ const DataPiece& data, bool is_placeholder,
const std::vector<TProtoStringType>& path,
- bool suppress_empty_list,
- bool preserve_proto_field_names,
+ bool suppress_empty_list,
+ bool preserve_proto_field_names,
bool use_ints_for_enums,
FieldScrubCallBack field_scrub_callback);
-
- // Creates a DataPiece containing the default value of the type of the field.
- static DataPiece CreateDefaultDataPieceForField(
+
+ // Creates a DataPiece containing the default value of the type of the field.
+ static DataPiece CreateDefaultDataPieceForField(
const google::protobuf::Field& field, const TypeInfo* typeinfo) {
return CreateDefaultDataPieceForField(field, typeinfo, false);
}
-
+
// Same as the above but with a flag to use ints instead of enum names.
static DataPiece CreateDefaultDataPieceForField(
const google::protobuf::Field& field, const TypeInfo* typeinfo,
bool use_ints_for_enums);
- protected:
- // Returns a pointer to current Node in tree.
- Node* current() { return current_; }
-
- private:
+ protected:
+ // Returns a pointer to current Node in tree.
+ Node* current() { return current_; }
+
+ private:
// Populates children of "node" if it is an "any" Node and its real type has
// been given.
void MaybePopulateChildrenOfAny(Node* node);
@@ -308,9 +308,9 @@ class PROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter {
// Whether to suppress output of empty lists.
bool suppress_empty_list_;
- // Whether to preserve original proto field names
- bool preserve_proto_field_names_;
-
+ // Whether to preserve original proto field names
+ bool preserve_proto_field_names_;
+
// Whether to always print enums as ints
bool use_ints_for_enums_;
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc b/contrib/libs/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc
index 57e5de72f7..94d2738cf6 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc
@@ -209,7 +209,7 @@ util::Status DecodeCompactFieldMaskPaths(StringPiece paths,
StrCat("Invalid FieldMask '", paths,
"'. Cannot find matching ')' for all '('."));
}
- return util::Status();
+ return util::Status();
}
} // namespace converter
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/json_escaping.cc b/contrib/libs/protobuf/src/google/protobuf/util/internal/json_escaping.cc
index b634f8d25d..e4fa8cf788 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/json_escaping.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/json_escaping.cc
@@ -282,19 +282,19 @@ StringPiece EscapeCodePoint(uint32_t cp, char* buffer,
cp >>= 6;
if (cp <= 0x1f) {
buffer[4] = cp | 0xc0;
- sp = StringPiece(buffer + 4, 2);
+ sp = StringPiece(buffer + 4, 2);
return sp;
}
buffer[4] = (cp & 0x3f) | 0x80;
cp >>= 6;
if (cp <= 0x0f) {
buffer[3] = cp | 0xe0;
- sp = StringPiece(buffer + 3, 3);
+ sp = StringPiece(buffer + 3, 3);
return sp;
}
buffer[3] = (cp & 0x3f) | 0x80;
buffer[2] = ((cp >> 6) & 0x07) | 0xf0;
- sp = StringPiece(buffer + 2, 4);
+ sp = StringPiece(buffer + 2, 4);
}
return sp;
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc b/contrib/libs/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc
index 36f29e6314..3a9b11ceca 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc
@@ -166,19 +166,19 @@ JsonObjectWriter* JsonObjectWriter::RenderNull(StringPiece name) {
return RenderSimple(name, "null");
}
-JsonObjectWriter* JsonObjectWriter::RenderNullAsEmpty(StringPiece name) {
- return RenderSimple(name, "");
-}
-
+JsonObjectWriter* JsonObjectWriter::RenderNullAsEmpty(StringPiece name) {
+ return RenderSimple(name, "");
+}
+
void JsonObjectWriter::WritePrefix(StringPiece name) {
bool not_first = !element()->is_first();
if (not_first) WriteChar(',');
if (not_first || !element()->is_root()) NewLine();
if (!name.empty() || element()->is_json_object()) {
WriteChar('"');
- if (!name.empty()) {
+ if (!name.empty()) {
JsonEscaping::Escape(name, &sink_);
- }
+ }
WriteRawString("\":");
if (!indent_string_.empty()) WriteChar(' ');
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/json_objectwriter.h b/contrib/libs/protobuf/src/google/protobuf/util/internal/json_objectwriter.h
index 14e73f870f..9088659be7 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/json_objectwriter.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/json_objectwriter.h
@@ -131,7 +131,7 @@ class PROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter {
StringPiece value) override;
JsonObjectWriter* RenderBytes(StringPiece name, StringPiece value) override;
JsonObjectWriter* RenderNull(StringPiece name) override;
- virtual JsonObjectWriter* RenderNullAsEmpty(StringPiece name);
+ virtual JsonObjectWriter* RenderNullAsEmpty(StringPiece name);
void set_use_websafe_base64_for_bytes(bool value) {
use_websafe_base64_for_bytes_ = value;
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc b/contrib/libs/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc
index 7332cec5ec..2d13148f46 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc
@@ -44,7 +44,7 @@
#include <google/protobuf/util/internal/object_writer.h>
#include <google/protobuf/util/internal/json_escaping.h>
-
+
namespace google {
namespace protobuf {
namespace util {
@@ -143,9 +143,9 @@ JsonStreamParser::JsonStreamParser(ObjectWriter* ow)
parsed_storage_(),
string_open_(0),
chunk_storage_(),
- coerce_to_utf8_(false),
+ coerce_to_utf8_(false),
utf8_replacement_character_(" "),
- allow_empty_null_(false),
+ allow_empty_null_(false),
allow_permissive_key_naming_(false),
loose_float_number_conversion_(false),
recursion_depth_(0),
@@ -167,7 +167,7 @@ util::Status JsonStreamParser::Parse(StringPiece json) {
// Don't point chunk to leftover_ because leftover_ will be updated in
// ParseChunk(chunk).
chunk_storage_.swap(leftover_);
- StrAppend(&chunk_storage_, json);
+ StrAppend(&chunk_storage_, json);
chunk = StringPiece(chunk_storage_);
}
@@ -178,11 +178,11 @@ util::Status JsonStreamParser::Parse(StringPiece json) {
// Any leftover characters are stashed in leftover_ for later parsing when
// there is more data available.
- StrAppend(&leftover_, chunk.substr(n));
+ StrAppend(&leftover_, chunk.substr(n));
return status;
} else {
- leftover_.assign(chunk.data(), chunk.size());
- return util::Status();
+ leftover_.assign(chunk.data(), chunk.size());
+ return util::Status();
}
}
@@ -190,7 +190,7 @@ util::Status JsonStreamParser::FinishParse() {
// If we do not expect anything and there is nothing left to parse we're all
// done.
if (stack_.empty() && leftover_.empty()) {
- return util::Status();
+ return util::Status();
}
// Lifetime needs to last until RunParser returns, so keep this variable
@@ -229,7 +229,7 @@ util::Status JsonStreamParser::FinishParse() {
util::Status JsonStreamParser::ParseChunk(StringPiece chunk) {
// Do not do any work if the chunk is empty.
- if (chunk.empty()) return util::Status();
+ if (chunk.empty()) return util::Status();
p_ = json_ = chunk;
@@ -253,7 +253,7 @@ util::Status JsonStreamParser::ParseChunk(StringPiece chunk) {
// unparsed data left, we save it for later parse.
leftover_ = TProtoStringType(p_);
}
- return util::Status();
+ return util::Status();
}
bool JsonStreamParser::IsInputAllWhiteSpaces(TokenType type) {
@@ -313,15 +313,15 @@ util::Status JsonStreamParser::RunParser() {
// If we have a key we still need to render, make sure to save off the
// contents in our own storage.
if (!key_.empty() && key_storage_.empty()) {
- StrAppend(&key_storage_, key_);
+ StrAppend(&key_storage_, key_);
key_ = StringPiece(key_storage_);
}
- result = util::Status();
+ result = util::Status();
}
return result;
}
}
- return util::Status();
+ return util::Status();
}
util::Status JsonStreamParser::ParseValue(TokenType type) {
@@ -343,10 +343,10 @@ util::Status JsonStreamParser::ParseValue(TokenType type) {
case UNKNOWN:
return ReportUnknown("Expected a value.", ParseErrorType::EXPECTED_VALUE);
default: {
- if (allow_empty_null_ && IsEmptyNullAllowed(type)) {
- return ParseEmptyNull();
- }
-
+ if (allow_empty_null_ && IsEmptyNullAllowed(type)) {
+ return ParseEmptyNull();
+ }
+
// Special case for having been cut off while parsing, wait for more data.
// This handles things like 'fals' being at the end of the string, we
// don't know if the next char would be e, completing it, or something
@@ -364,8 +364,8 @@ util::Status JsonStreamParser::ParseString() {
util::Status result = ParseStringHelper();
if (result.ok()) {
ow_->RenderString(key_, parsed_);
- key_ = StringPiece();
- parsed_ = StringPiece();
+ key_ = StringPiece();
+ parsed_ = StringPiece();
parsed_storage_.clear();
}
return result;
@@ -449,7 +449,7 @@ util::Status JsonStreamParser::ParseStringHelper() {
// start fresh.
string_open_ = 0;
Advance();
- return util::Status();
+ return util::Status();
}
// Normal character, just advance past it.
Advance();
@@ -539,7 +539,7 @@ util::Status JsonStreamParser::ParseUnicodeEscape() {
// Advance past the [final] code unit escape.
p_.remove_prefix(kUnicodeEscapedLength);
parsed_storage_.append(buf, len);
- return util::Status();
+ return util::Status();
}
util::Status JsonStreamParser::ParseNumber() {
@@ -549,17 +549,17 @@ util::Status JsonStreamParser::ParseNumber() {
switch (number.type) {
case NumberResult::DOUBLE:
ow_->RenderDouble(key_, number.double_val);
- key_ = StringPiece();
+ key_ = StringPiece();
break;
case NumberResult::INT:
ow_->RenderInt64(key_, number.int_val);
- key_ = StringPiece();
+ key_ = StringPiece();
break;
case NumberResult::UINT:
ow_->RenderUint64(key_, number.uint_val);
- key_ = StringPiece();
+ key_ = StringPiece();
break;
default:
@@ -677,9 +677,9 @@ util::Status JsonStreamParser::HandleBeginObject() {
if (!status.ok()) {
return status;
}
- key_ = StringPiece();
+ key_ = StringPiece();
stack_.push(ENTRY);
- return util::Status();
+ return util::Status();
}
util::Status JsonStreamParser::ParseObjectMid(TokenType type) {
@@ -693,13 +693,13 @@ util::Status JsonStreamParser::ParseObjectMid(TokenType type) {
Advance();
ow_->EndObject();
--recursion_depth_;
- return util::Status();
+ return util::Status();
}
// Found a comma, advance past it and get ready for an entry.
if (type == VALUE_SEPARATOR) {
Advance();
stack_.push(ENTRY);
- return util::Status();
+ return util::Status();
}
// Illegal token after key:value pair.
return ReportFailure("Expected , or } after key:value pair.",
@@ -717,7 +717,7 @@ util::Status JsonStreamParser::ParseEntry(TokenType type) {
ow_->EndObject();
Advance();
--recursion_depth_;
- return util::Status();
+ return util::Status();
}
util::Status result;
@@ -732,7 +732,7 @@ util::Status JsonStreamParser::ParseEntry(TokenType type) {
} else {
key_ = parsed_;
}
- parsed_ = StringPiece();
+ parsed_ = StringPiece();
}
} else if (type == BEGIN_KEY) {
// Key is a bare key (back compat), create a StringPiece pointing to it.
@@ -766,7 +766,7 @@ util::Status JsonStreamParser::ParseEntryMid(TokenType type) {
if (type == ENTRY_SEPARATOR) {
Advance();
stack_.push(VALUE);
- return util::Status();
+ return util::Status();
}
return ReportFailure("Expected : between key:value pair.",
ParseErrorType::EXPECTED_COLON);
@@ -776,9 +776,9 @@ util::Status JsonStreamParser::HandleBeginArray() {
GOOGLE_DCHECK_EQ('[', *p_.data());
Advance();
ow_->StartList(key_);
- key_ = StringPiece();
+ key_ = StringPiece();
stack_.push(ARRAY_VALUE);
- return util::Status();
+ return util::Status();
}
util::Status JsonStreamParser::ParseArrayValue(TokenType type) {
@@ -790,12 +790,12 @@ util::Status JsonStreamParser::ParseArrayValue(TokenType type) {
if (type == END_ARRAY) {
ow_->EndList();
Advance();
- return util::Status();
+ return util::Status();
}
// The ParseValue call may push something onto the stack so we need to make
- // sure an ARRAY_MID is after it, so we push it on now. Also, the parsing of
- // empty-null array value is relying on this ARRAY_MID token.
+ // sure an ARRAY_MID is after it, so we push it on now. Also, the parsing of
+ // empty-null array value is relying on this ARRAY_MID token.
stack_.push(ARRAY_MID);
util::Status result = ParseValue(type);
if (util::IsCancelled(result)) {
@@ -815,14 +815,14 @@ util::Status JsonStreamParser::ParseArrayMid(TokenType type) {
if (type == END_ARRAY) {
ow_->EndList();
Advance();
- return util::Status();
+ return util::Status();
}
// Found a comma, advance past it and expect an array value next.
if (type == VALUE_SEPARATOR) {
Advance();
stack_.push(ARRAY_VALUE);
- return util::Status();
+ return util::Status();
}
// Illegal token after array value.
return ReportFailure("Expected , or ] after array value.",
@@ -831,37 +831,37 @@ util::Status JsonStreamParser::ParseArrayMid(TokenType type) {
util::Status JsonStreamParser::ParseTrue() {
ow_->RenderBool(key_, true);
- key_ = StringPiece();
+ key_ = StringPiece();
p_.remove_prefix(kKeywordTrue.length());
- return util::Status();
+ return util::Status();
}
util::Status JsonStreamParser::ParseFalse() {
ow_->RenderBool(key_, false);
- key_ = StringPiece();
+ key_ = StringPiece();
p_.remove_prefix(kKeywordFalse.length());
- return util::Status();
+ return util::Status();
}
util::Status JsonStreamParser::ParseNull() {
ow_->RenderNull(key_);
- key_ = StringPiece();
+ key_ = StringPiece();
p_.remove_prefix(kKeywordNull.length());
- return util::Status();
-}
-
-util::Status JsonStreamParser::ParseEmptyNull() {
- ow_->RenderNull(key_);
- key_ = StringPiece();
- return util::Status();
-}
-
-bool JsonStreamParser::IsEmptyNullAllowed(TokenType type) {
- if (stack_.empty()) return false;
- return (stack_.top() == ARRAY_MID && type == VALUE_SEPARATOR) ||
- stack_.top() == OBJ_MID;
-}
-
+ return util::Status();
+}
+
+util::Status JsonStreamParser::ParseEmptyNull() {
+ ow_->RenderNull(key_);
+ key_ = StringPiece();
+ return util::Status();
+}
+
+bool JsonStreamParser::IsEmptyNullAllowed(TokenType type) {
+ if (stack_.empty()) return false;
+ return (stack_.top() == ARRAY_MID && type == VALUE_SEPARATOR) ||
+ stack_.top() == OBJ_MID;
+}
+
util::Status JsonStreamParser::ReportFailure(StringPiece message,
ParseErrorType parse_code) {
static const int kContextLength = 20;
@@ -939,7 +939,7 @@ util::Status JsonStreamParser::ParseKey() {
}
// Since we aren't using the key storage, clear it out.
key_storage_.clear();
- return util::Status();
+ return util::Status();
}
JsonStreamParser::TokenType JsonStreamParser::GetNextTokenType() {
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/json_stream_parser.h b/contrib/libs/protobuf/src/google/protobuf/util/internal/json_stream_parser.h
index ca54103311..96cdd954ce 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/json_stream_parser.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/json_stream_parser.h
@@ -225,11 +225,11 @@ class PROTOBUF_EXPORT JsonStreamParser {
util::Status ParseTrue();
util::Status ParseFalse();
util::Status ParseNull();
- util::Status ParseEmptyNull();
+ util::Status ParseEmptyNull();
+
+ // Whether an empty-null is allowed in the current state.
+ bool IsEmptyNullAllowed(TokenType type);
- // Whether an empty-null is allowed in the current state.
- bool IsEmptyNullAllowed(TokenType type);
-
// Whether the whole input is all whitespaces.
bool IsInputAllWhiteSpaces(TokenType type);
@@ -319,17 +319,17 @@ class PROTOBUF_EXPORT JsonStreamParser {
// Replacement character for invalid UTF-8 code points.
TProtoStringType utf8_replacement_character_;
- // Whether allows empty string represented null array value or object entry
- // value.
- bool allow_empty_null_;
-
+ // Whether allows empty string represented null array value or object entry
+ // value.
+ bool allow_empty_null_;
+
// Whether unquoted object keys can contain embedded non-alphanumeric
// characters when this is unambiguous for parsing.
bool allow_permissive_key_naming_;
- // Whether allows out-of-range floating point numbers or reject them.
- bool loose_float_number_conversion_;
-
+ // Whether allows out-of-range floating point numbers or reject them.
+ bool loose_float_number_conversion_;
+
// Tracks current recursion depth.
mutable int recursion_depth_;
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/proto_writer.cc b/contrib/libs/protobuf/src/google/protobuf/util/internal/proto_writer.cc
index 847a3efba5..9257b1081f 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/proto_writer.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/proto_writer.cc
@@ -65,7 +65,7 @@ ProtoWriter::ProtoWriter(TypeResolver* type_resolver,
done_(false),
ignore_unknown_fields_(false),
ignore_unknown_enum_values_(false),
- use_lower_camel_for_enums_(false),
+ use_lower_camel_for_enums_(false),
case_insensitive_enum_parsing_(true),
use_json_name_in_missing_fields_(false),
element_(nullptr),
@@ -87,7 +87,7 @@ ProtoWriter::ProtoWriter(const TypeInfo* typeinfo,
done_(false),
ignore_unknown_fields_(false),
ignore_unknown_enum_values_(false),
- use_lower_camel_for_enums_(false),
+ use_lower_camel_for_enums_(false),
case_insensitive_enum_parsing_(true),
use_json_name_in_missing_fields_(false),
element_(nullptr),
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/proto_writer.h b/contrib/libs/protobuf/src/google/protobuf/util/internal/proto_writer.h
index dd03670d2e..f10e73be35 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/proto_writer.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/proto_writer.h
@@ -153,10 +153,10 @@ class PROTOBUF_EXPORT ProtoWriter : public StructuredObjectWriter {
ignore_unknown_enum_values_ = ignore_unknown_enum_values;
}
- void set_use_lower_camel_for_enums(bool use_lower_camel_for_enums) {
- use_lower_camel_for_enums_ = use_lower_camel_for_enums;
- }
-
+ void set_use_lower_camel_for_enums(bool use_lower_camel_for_enums) {
+ use_lower_camel_for_enums_ = use_lower_camel_for_enums;
+ }
+
void set_case_insensitive_enum_parsing(bool case_insensitive_enum_parsing) {
case_insensitive_enum_parsing_ = case_insensitive_enum_parsing;
}
@@ -339,10 +339,10 @@ class PROTOBUF_EXPORT ProtoWriter : public StructuredObjectWriter {
// If true, don't report unknown enum values to the listener.
bool ignore_unknown_enum_values_;
- // If true, check if enum name in camel case or without underscore matches the
- // field name.
- bool use_lower_camel_for_enums_;
-
+ // If true, check if enum name in camel case or without underscore matches the
+ // field name.
+ bool use_lower_camel_for_enums_;
+
// If true, check if enum name in UPPER_CASE matches the field name.
bool case_insensitive_enum_parsing_;
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc b/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc
index 446b9ac301..da423a7dc7 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc
@@ -191,10 +191,10 @@ util::Status ProtoStreamObjectSource::WriteMessage(
field = FindAndVerifyField(type, tag);
if (field != nullptr) {
if (render_options_.preserve_proto_field_names) {
- field_name = field->name();
- } else {
- field_name = field->json_name();
- }
+ field_name = field->name();
+ } else {
+ field_name = field->json_name();
+ }
}
}
if (field == nullptr) {
@@ -226,7 +226,7 @@ util::Status ProtoStreamObjectSource::WriteMessage(
if (include_start_and_end) {
ow->EndObject();
}
- return util::Status();
+ return util::Status();
}
util::StatusOr<uint32_t> ProtoStreamObjectSource::RenderList(
@@ -307,7 +307,7 @@ util::Status ProtoStreamObjectSource::RenderPacked(
RETURN_IF_ERROR(RenderField(field, StringPiece(), ow));
}
stream_->PopLimit(old_limit);
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderTimestamp(
@@ -329,7 +329,7 @@ util::Status ProtoStreamObjectSource::RenderTimestamp(
ow->RenderString(field_name,
::google::protobuf::internal::FormatTime(seconds, nanos));
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderDuration(
@@ -369,9 +369,9 @@ util::Status ProtoStreamObjectSource::RenderDuration(
nanos,
false
)
- .c_str());
+ .c_str());
ow->RenderString(field_name, formatted_duration);
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderDouble(
@@ -384,7 +384,7 @@ util::Status ProtoStreamObjectSource::RenderDouble(
os->stream_->ReadTag();
}
ow->RenderDouble(field_name, bit_cast<double>(buffer64));
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderFloat(
@@ -397,7 +397,7 @@ util::Status ProtoStreamObjectSource::RenderFloat(
os->stream_->ReadTag();
}
ow->RenderFloat(field_name, bit_cast<float>(buffer32));
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderInt64(
@@ -410,7 +410,7 @@ util::Status ProtoStreamObjectSource::RenderInt64(
os->stream_->ReadTag();
}
ow->RenderInt64(field_name, bit_cast<int64_t>(buffer64));
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderUInt64(
@@ -423,7 +423,7 @@ util::Status ProtoStreamObjectSource::RenderUInt64(
os->stream_->ReadTag();
}
ow->RenderUint64(field_name, bit_cast<uint64_t>(buffer64));
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderInt32(
@@ -436,7 +436,7 @@ util::Status ProtoStreamObjectSource::RenderInt32(
os->stream_->ReadTag();
}
ow->RenderInt32(field_name, bit_cast<int32_t>(buffer32));
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderUInt32(
@@ -449,7 +449,7 @@ util::Status ProtoStreamObjectSource::RenderUInt32(
os->stream_->ReadTag();
}
ow->RenderUint32(field_name, bit_cast<uint32_t>(buffer32));
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderBool(
@@ -463,7 +463,7 @@ util::Status ProtoStreamObjectSource::RenderBool(
os->stream_->ReadTag();
}
ow->RenderBool(field_name, buffer64 != 0);
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderString(
@@ -478,7 +478,7 @@ util::Status ProtoStreamObjectSource::RenderString(
os->stream_->ReadTag();
}
ow->RenderString(field_name, str);
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderBytes(
@@ -493,7 +493,7 @@ util::Status ProtoStreamObjectSource::RenderBytes(
os->stream_->ReadTag();
}
ow->RenderBytes(field_name, str);
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderStruct(
@@ -516,7 +516,7 @@ util::Status ProtoStreamObjectSource::RenderStruct(
}
}
ow->EndObject();
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderStructValue(
@@ -532,7 +532,7 @@ util::Status ProtoStreamObjectSource::RenderStructValue(
}
RETURN_IF_ERROR(os->RenderField(field, field_name, ow));
}
- return util::Status();
+ return util::Status();
}
// TODO(skarvaje): Avoid code duplication of for loops and SkipField logic.
@@ -545,7 +545,7 @@ util::Status ProtoStreamObjectSource::RenderStructListValue(
if (tag == 0) {
ow->StartList(field_name);
ow->EndList();
- return util::Status();
+ return util::Status();
}
while (tag != 0) {
@@ -557,7 +557,7 @@ util::Status ProtoStreamObjectSource::RenderStructListValue(
}
ASSIGN_OR_RETURN(tag, os->RenderList(field, field_name, tag, ow));
}
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderAny(
@@ -598,7 +598,7 @@ util::Status ProtoStreamObjectSource::RenderAny(
ow->RenderString("@type", type_url);
}
ow->EndObject();
- return util::Status();
+ return util::Status();
}
// If there is a value but no type, we cannot render it, so report an error.
@@ -661,7 +661,7 @@ util::Status ProtoStreamObjectSource::RenderFieldMask(
combined.append(ConvertFieldMaskPath(str, &ToCamelCase));
}
ow->RenderString(field_name, combined);
- return util::Status();
+ return util::Status();
}
@@ -759,7 +759,7 @@ util::Status ProtoStreamObjectSource::RenderField(
// Render all other non-message types.
return RenderNonMessageField(field, field_name, ow);
}
- return util::Status();
+ return util::Status();
}
util::Status ProtoStreamObjectSource::RenderNonMessageField(
@@ -849,25 +849,25 @@ util::Status ProtoStreamObjectSource::RenderNonMessageField(
// up.
const google::protobuf::Enum* en =
typeinfo_->GetEnumByTypeUrl(field->type_url());
- // Lookup the name of the enum, and render that. Unknown enum values
- // are printed as integers.
+ // Lookup the name of the enum, and render that. Unknown enum values
+ // are printed as integers.
if (en != nullptr) {
const google::protobuf::EnumValue* enum_value =
FindEnumValueByNumber(*en, buffer32);
if (enum_value != nullptr) {
if (render_options_.use_ints_for_enums) {
- ow->RenderInt32(field_name, buffer32);
+ ow->RenderInt32(field_name, buffer32);
} else if (render_options_.use_lower_camel_for_enums) {
ow->RenderString(field_name,
EnumValueNameToLowerCamelCase(enum_value->name()));
- } else {
+ } else {
ow->RenderString(field_name, enum_value->name());
- }
+ }
} else {
ow->RenderInt32(field_name, buffer32);
}
} else {
- ow->RenderInt32(field_name, buffer32);
+ ow->RenderInt32(field_name, buffer32);
}
break;
}
@@ -886,7 +886,7 @@ util::Status ProtoStreamObjectSource::RenderNonMessageField(
default:
break;
}
- return util::Status();
+ return util::Status();
}
// TODO(skarvaje): Fix this to avoid code duplication.
@@ -1054,7 +1054,7 @@ util::Status ProtoStreamObjectSource::IncrementRecursionDepth(
StrCat("Message too deep. Max recursion depth reached for type '",
type_name, "', field '", field_name, "'"));
}
- return util::Status();
+ return util::Status();
}
namespace {
@@ -1092,10 +1092,10 @@ const google::protobuf::EnumValue* FindEnumValueByNumber(
// TODO(skarvaje): Look into optimizing this by not doing computation on
// double.
const TProtoStringType FormatNanos(uint32_t nanos, bool with_trailing_zeros) {
- if (nanos == 0) {
- return with_trailing_zeros ? ".000" : "";
- }
-
+ if (nanos == 0) {
+ return with_trailing_zeros ? ".000" : "";
+ }
+
const char* format = (nanos % 1000 != 0) ? "%.9f"
: (nanos % 1000000 != 0) ? "%.6f"
: "%.3f";
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectsource.h b/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectsource.h
index 4da5fa3660..32aa500b09 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectsource.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectsource.h
@@ -113,7 +113,7 @@ class PROTOBUF_EXPORT ProtoStreamObjectSource : public ObjectSource {
bool preserve_proto_field_names = false;
};
-
+
ProtoStreamObjectSource(io::CodedInputStream* stream,
TypeResolver* type_resolver,
const google::protobuf::Type& type)
@@ -122,7 +122,7 @@ class PROTOBUF_EXPORT ProtoStreamObjectSource : public ObjectSource {
TypeResolver* type_resolver,
const google::protobuf::Type& type,
const RenderOptions& render_options);
-
+
~ProtoStreamObjectSource() override;
util::Status NamedWriteTo(StringPiece name,
@@ -147,29 +147,29 @@ class PROTOBUF_EXPORT ProtoStreamObjectSource : public ObjectSource {
bool include_start_and_end,
ObjectWriter* ow) const;
- // Renders a repeating field (packed or unpacked). Returns the next tag after
- // reading all sequential repeating elements. The caller should use this tag
- // before reading more tags from the stream.
+ // Renders a repeating field (packed or unpacked). Returns the next tag after
+ // reading all sequential repeating elements. The caller should use this tag
+ // before reading more tags from the stream.
virtual util::StatusOr<uint32_t> RenderList(
const google::protobuf::Field* field, StringPiece name,
uint32_t list_tag, ObjectWriter* ow) const;
-
- // Looks up a field and verify its consistency with wire type in tag.
- const google::protobuf::Field* FindAndVerifyField(
+
+ // Looks up a field and verify its consistency with wire type in tag.
+ const google::protobuf::Field* FindAndVerifyField(
const google::protobuf::Type& type, uint32_t tag) const;
-
- // Renders a field value to the ObjectWriter.
+
+ // Renders a field value to the ObjectWriter.
virtual util::Status RenderField(const google::protobuf::Field* field,
StringPiece field_name,
ObjectWriter* ow) const;
-
- // Reads field value according to Field spec in 'field' and returns the read
- // value as string. This only works for primitive datatypes (no message
- // types).
+
+ // Reads field value according to Field spec in 'field' and returns the read
+ // value as string. This only works for primitive datatypes (no message
+ // types).
const TProtoStringType ReadFieldValueAsString(
- const google::protobuf::Field& field) const;
-
-
+ const google::protobuf::Field& field) const;
+
+
// Returns the input stream.
io::CodedInputStream* stream() const { return stream_; }
@@ -298,7 +298,7 @@ class PROTOBUF_EXPORT ProtoStreamObjectSource : public ObjectSource {
// Type information for all the types used in the descriptor. Used to find
// google::protobuf::Type of nested messages/enums.
const TypeInfo* typeinfo_;
-
+
// Whether this class owns the typeinfo_ object. If true the typeinfo_ object
// should be deleted in the destructor.
bool own_typeinfo_;
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc b/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc
index 7e046d953e..5ac24d0ac0 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc
@@ -71,7 +71,7 @@ ProtoStreamObjectWriter::ProtoStreamObjectWriter(
options_(options) {
set_ignore_unknown_fields(options_.ignore_unknown_fields);
set_ignore_unknown_enum_values(options_.ignore_unknown_enum_values);
- set_use_lower_camel_for_enums(options_.use_lower_camel_for_enums);
+ set_use_lower_camel_for_enums(options_.use_lower_camel_for_enums);
set_case_insensitive_enum_parsing(options_.case_insensitive_enum_parsing);
set_use_json_name_in_missing_fields(options.use_json_name_in_missing_fields);
}
@@ -195,7 +195,7 @@ Status GetNanosFromStringPiece(StringPiece s_nanos,
*nanos = i_nanos * conversion;
}
- return Status();
+ return Status();
}
} // namespace
@@ -215,11 +215,11 @@ ProtoStreamObjectWriter::AnyWriter::~AnyWriter() {}
void ProtoStreamObjectWriter::AnyWriter::StartObject(StringPiece name) {
++depth_;
// If an object writer is absent, that means we have not called StartAny()
- // before reaching here, which happens when we have data before the "@type"
- // field.
+ // before reaching here, which happens when we have data before the "@type"
+ // field.
if (ow_ == nullptr) {
- // Save data before the "@type" field for later replay.
- uninterpreted_events_.push_back(Event(Event::START_OBJECT, name));
+ // Save data before the "@type" field for later replay.
+ uninterpreted_events_.push_back(Event(Event::START_OBJECT, name));
} else if (is_well_known_type_ && depth_ == 1) {
// For well-known types, the only other field besides "@type" should be a
// "value" field.
@@ -240,14 +240,14 @@ void ProtoStreamObjectWriter::AnyWriter::StartObject(StringPiece name) {
bool ProtoStreamObjectWriter::AnyWriter::EndObject() {
--depth_;
if (ow_ == nullptr) {
- if (depth_ >= 0) {
- // Save data before the "@type" field for later replay.
- uninterpreted_events_.push_back(Event(Event::END_OBJECT));
- }
- } else if (depth_ >= 0 || !is_well_known_type_) {
- // As long as depth_ >= 0, we know we haven't reached the end of Any.
- // Propagate these EndObject() calls to the contained ow_. For regular
- // message types, we propagate the end of Any as well.
+ if (depth_ >= 0) {
+ // Save data before the "@type" field for later replay.
+ uninterpreted_events_.push_back(Event(Event::END_OBJECT));
+ }
+ } else if (depth_ >= 0 || !is_well_known_type_) {
+ // As long as depth_ >= 0, we know we haven't reached the end of Any.
+ // Propagate these EndObject() calls to the contained ow_. For regular
+ // message types, we propagate the end of Any as well.
ow_->EndObject();
}
// A negative depth_ implies that we have reached the end of Any
@@ -262,8 +262,8 @@ bool ProtoStreamObjectWriter::AnyWriter::EndObject() {
void ProtoStreamObjectWriter::AnyWriter::StartList(StringPiece name) {
++depth_;
if (ow_ == nullptr) {
- // Save data before the "@type" field for later replay.
- uninterpreted_events_.push_back(Event(Event::START_LIST, name));
+ // Save data before the "@type" field for later replay.
+ uninterpreted_events_.push_back(Event(Event::START_LIST, name));
} else if (is_well_known_type_ && depth_ == 1) {
if (name != "value" && !invalid_) {
parent_->InvalidValue("Any",
@@ -283,9 +283,9 @@ void ProtoStreamObjectWriter::AnyWriter::EndList() {
depth_ = 0;
}
if (ow_ == nullptr) {
- // Save data before the "@type" field for later replay.
- uninterpreted_events_.push_back(Event(Event::END_LIST));
- } else {
+ // Save data before the "@type" field for later replay.
+ uninterpreted_events_.push_back(Event(Event::END_LIST));
+ } else {
ow_->EndList();
}
}
@@ -297,8 +297,8 @@ void ProtoStreamObjectWriter::AnyWriter::RenderDataPiece(
if (depth_ == 0 && ow_ == nullptr && name == "@type") {
StartAny(value);
} else if (ow_ == nullptr) {
- // Save data before the "@type" field.
- uninterpreted_events_.push_back(Event(name, value));
+ // Save data before the "@type" field.
+ uninterpreted_events_.push_back(Event(name, value));
} else if (depth_ == 0 && is_well_known_type_) {
if (name != "value" && !invalid_) {
parent_->InvalidValue("Any",
@@ -308,7 +308,7 @@ void ProtoStreamObjectWriter::AnyWriter::RenderDataPiece(
if (well_known_type_render_ == nullptr) {
// Only Any and Struct don't have a special type render but both of
// them expect a JSON object (i.e., a StartObject() call).
- if (value.type() != DataPiece::TYPE_NULL && !invalid_) {
+ if (value.type() != DataPiece::TYPE_NULL && !invalid_) {
parent_->InvalidValue("Any", "Expect a JSON object.");
invalid_ = true;
}
@@ -374,30 +374,30 @@ void ProtoStreamObjectWriter::AnyWriter::StartAny(const DataPiece& value) {
if (!is_well_known_type_) {
ow_->StartObject("");
}
-
- // Now we know the proto type and can interpret all data fields we gathered
- // before the "@type" field.
- for (int i = 0; i < uninterpreted_events_.size(); ++i) {
- uninterpreted_events_[i].Replay(this);
- }
+
+ // Now we know the proto type and can interpret all data fields we gathered
+ // before the "@type" field.
+ for (int i = 0; i < uninterpreted_events_.size(); ++i) {
+ uninterpreted_events_[i].Replay(this);
+ }
}
void ProtoStreamObjectWriter::AnyWriter::WriteAny() {
if (ow_ == nullptr) {
- if (uninterpreted_events_.empty()) {
- // We never got any content, so just return immediately, which is
- // equivalent to writing an empty Any.
- return;
- } else {
- // There are uninterpreted data, but we never got a "@type" field.
- if (!invalid_) {
+ if (uninterpreted_events_.empty()) {
+ // We never got any content, so just return immediately, which is
+ // equivalent to writing an empty Any.
+ return;
+ } else {
+ // There are uninterpreted data, but we never got a "@type" field.
+ if (!invalid_) {
parent_->InvalidValue("Any",
StrCat("Missing @type for any field in ",
parent_->master_type_.name()));
- invalid_ = true;
- }
- return;
- }
+ invalid_ = true;
+ }
+ return;
+ }
}
// Render the type_url and value fields directly to the stream.
// type_url has tag 1 and value has tag 2.
@@ -407,41 +407,41 @@ void ProtoStreamObjectWriter::AnyWriter::WriteAny() {
}
}
-void ProtoStreamObjectWriter::AnyWriter::Event::Replay(
- AnyWriter* writer) const {
- switch (type_) {
- case START_OBJECT:
- writer->StartObject(name_);
- break;
- case END_OBJECT:
- writer->EndObject();
- break;
- case START_LIST:
- writer->StartList(name_);
- break;
- case END_LIST:
- writer->EndList();
- break;
- case RENDER_DATA_PIECE:
- writer->RenderDataPiece(name_, value_);
- break;
- }
-}
-
-void ProtoStreamObjectWriter::AnyWriter::Event::DeepCopy() {
- // DataPiece only contains a string reference. To make sure the referenced
- // string value stays valid, we make a copy of the string value and update
- // DataPiece to reference our own copy.
- if (value_.type() == DataPiece::TYPE_STRING) {
- StrAppend(&value_storage_, value_.str());
- value_ = DataPiece(value_storage_, value_.use_strict_base64_decoding());
- } else if (value_.type() == DataPiece::TYPE_BYTES) {
+void ProtoStreamObjectWriter::AnyWriter::Event::Replay(
+ AnyWriter* writer) const {
+ switch (type_) {
+ case START_OBJECT:
+ writer->StartObject(name_);
+ break;
+ case END_OBJECT:
+ writer->EndObject();
+ break;
+ case START_LIST:
+ writer->StartList(name_);
+ break;
+ case END_LIST:
+ writer->EndList();
+ break;
+ case RENDER_DATA_PIECE:
+ writer->RenderDataPiece(name_, value_);
+ break;
+ }
+}
+
+void ProtoStreamObjectWriter::AnyWriter::Event::DeepCopy() {
+ // DataPiece only contains a string reference. To make sure the referenced
+ // string value stays valid, we make a copy of the string value and update
+ // DataPiece to reference our own copy.
+ if (value_.type() == DataPiece::TYPE_STRING) {
+ StrAppend(&value_storage_, value_.str());
+ value_ = DataPiece(value_storage_, value_.use_strict_base64_decoding());
+ } else if (value_.type() == DataPiece::TYPE_BYTES) {
value_storage_ = value_.ToBytes().value();
- value_ =
- DataPiece(value_storage_, true, value_.use_strict_base64_decoding());
- }
-}
-
+ value_ =
+ DataPiece(value_storage_, true, value_.use_strict_base64_decoding());
+ }
+}
+
ProtoStreamObjectWriter::Item::Item(ProtoStreamObjectWriter* enclosing,
ItemType item_type, bool is_placeholder,
bool is_list)
@@ -952,7 +952,7 @@ Status ProtoStreamObjectWriter::RenderStructValue(ProtoStreamObjectWriter* ow,
if (int_value.ok()) {
ow->ProtoWriter::RenderDataPiece(
"string_value", DataPiece(StrCat(int_value.value()), true));
- return Status();
+ return Status();
}
}
struct_field_name = "number_value";
@@ -979,22 +979,22 @@ Status ProtoStreamObjectWriter::RenderStructValue(ProtoStreamObjectWriter* ow,
ow->ProtoWriter::RenderDataPiece(
"string_value",
DataPiece(SimpleDtoa(float_value.value()), true));
- return Status();
+ return Status();
}
}
struct_field_name = "number_value";
break;
}
case DataPiece::TYPE_DOUBLE: {
- if (ow->options_.struct_integers_as_strings) {
+ if (ow->options_.struct_integers_as_strings) {
util::StatusOr<double> double_value = data.ToDouble();
- if (double_value.ok()) {
- ow->ProtoWriter::RenderDataPiece(
- "string_value",
+ if (double_value.ok()) {
+ ow->ProtoWriter::RenderDataPiece(
+ "string_value",
DataPiece(SimpleDtoa(double_value.value()), true));
- return Status();
- }
- }
+ return Status();
+ }
+ }
struct_field_name = "number_value";
break;
}
@@ -1017,12 +1017,12 @@ Status ProtoStreamObjectWriter::RenderStructValue(ProtoStreamObjectWriter* ow,
}
}
ow->ProtoWriter::RenderDataPiece(struct_field_name, data);
- return Status();
+ return Status();
}
Status ProtoStreamObjectWriter::RenderTimestamp(ProtoStreamObjectWriter* ow,
const DataPiece& data) {
- if (data.type() == DataPiece::TYPE_NULL) return Status();
+ if (data.type() == DataPiece::TYPE_NULL) return Status();
if (data.type() != DataPiece::TYPE_STRING) {
return util::InvalidArgumentError(
StrCat("Invalid data type for timestamp, value is ",
@@ -1041,19 +1041,19 @@ Status ProtoStreamObjectWriter::RenderTimestamp(ProtoStreamObjectWriter* ow,
ow->ProtoWriter::RenderDataPiece("seconds", DataPiece(seconds));
ow->ProtoWriter::RenderDataPiece("nanos", DataPiece(nanos));
- return Status();
+ return Status();
}
static inline util::Status RenderOneFieldPath(ProtoStreamObjectWriter* ow,
StringPiece path) {
ow->ProtoWriter::RenderDataPiece(
"paths", DataPiece(ConvertFieldMaskPath(path, &ToSnakeCase), true));
- return Status();
+ return Status();
}
Status ProtoStreamObjectWriter::RenderFieldMask(ProtoStreamObjectWriter* ow,
const DataPiece& data) {
- if (data.type() == DataPiece::TYPE_NULL) return Status();
+ if (data.type() == DataPiece::TYPE_NULL) return Status();
if (data.type() != DataPiece::TYPE_STRING) {
return util::InvalidArgumentError(
StrCat("Invalid data type for field mask, value is ",
@@ -1069,7 +1069,7 @@ Status ProtoStreamObjectWriter::RenderFieldMask(ProtoStreamObjectWriter* ow,
Status ProtoStreamObjectWriter::RenderDuration(ProtoStreamObjectWriter* ow,
const DataPiece& data) {
- if (data.type() == DataPiece::TYPE_NULL) return Status();
+ if (data.type() == DataPiece::TYPE_NULL) return Status();
if (data.type() != DataPiece::TYPE_STRING) {
return util::InvalidArgumentError(
StrCat("Invalid data type for duration, value is ",
@@ -1114,14 +1114,14 @@ Status ProtoStreamObjectWriter::RenderDuration(ProtoStreamObjectWriter* ow,
ow->ProtoWriter::RenderDataPiece("seconds", DataPiece(seconds));
ow->ProtoWriter::RenderDataPiece("nanos", DataPiece(nanos));
- return Status();
+ return Status();
}
Status ProtoStreamObjectWriter::RenderWrapperType(ProtoStreamObjectWriter* ow,
const DataPiece& data) {
- if (data.type() == DataPiece::TYPE_NULL) return Status();
+ if (data.type() == DataPiece::TYPE_NULL) return Status();
ow->ProtoWriter::RenderDataPiece("value", data);
- return Status();
+ return Status();
}
ProtoStreamObjectWriter* ProtoStreamObjectWriter::RenderDataPiece(
@@ -1216,17 +1216,17 @@ ProtoStreamObjectWriter* ProtoStreamObjectWriter::RenderDataPiece(
// Check if the field is of special type. Render it accordingly if so.
const TypeRenderer* type_renderer = FindTypeRenderer(field->type_url());
if (type_renderer != nullptr) {
- // Pass through null value only for google.protobuf.Value. For other
- // types we ignore null value just like for regular field types.
- if (data.type() != DataPiece::TYPE_NULL ||
- field->type_url() == kStructValueTypeUrl) {
- Push(name, Item::MESSAGE, false, false);
- status = (*type_renderer)(this, data);
- if (!status.ok()) {
- InvalidValue(field->type_url(),
+ // Pass through null value only for google.protobuf.Value. For other
+ // types we ignore null value just like for regular field types.
+ if (data.type() != DataPiece::TYPE_NULL ||
+ field->type_url() == kStructValueTypeUrl) {
+ Push(name, Item::MESSAGE, false, false);
+ status = (*type_renderer)(this, data);
+ if (!status.ok()) {
+ InvalidValue(field->type_url(),
StrCat("Field '", name, "', ", status.message()));
- }
- Pop();
+ }
+ Pop();
}
return this;
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h b/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h
index 8aa76e46c2..d70fa425ea 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h
@@ -69,14 +69,14 @@ class PROTOBUF_EXPORT ProtoStreamObjectWriter : public ProtoWriter {
public:
// Options that control ProtoStreamObjectWriter class's behavior.
struct Options {
- // Treats numeric inputs in google.protobuf.Struct as strings. Normally,
- // numeric values are returned in double field "number_value" of
+ // Treats numeric inputs in google.protobuf.Struct as strings. Normally,
+ // numeric values are returned in double field "number_value" of
// google.protobuf.Struct. However, this can cause precision loss for
- // int64/uint64/double inputs. This option is provided for cases that want
- // to preserve number precision.
- //
- // TODO(skarvaje): Rename to struct_numbers_as_strings as it covers double
- // as well.
+ // int64/uint64/double inputs. This option is provided for cases that want
+ // to preserve number precision.
+ //
+ // TODO(skarvaje): Rename to struct_numbers_as_strings as it covers double
+ // as well.
bool struct_integers_as_strings;
// Not treat unknown fields as an error. If there is an unknown fields,
@@ -87,10 +87,10 @@ class PROTOBUF_EXPORT ProtoStreamObjectWriter : public ProtoWriter {
// Ignore unknown enum values.
bool ignore_unknown_enum_values;
- // If true, check if enum name in camel case or without underscore matches
- // the field name.
- bool use_lower_camel_for_enums;
-
+ // If true, check if enum name in camel case or without underscore matches
+ // the field name.
+ bool use_lower_camel_for_enums;
+
// If true, check if enum name in UPPER_CASE matches the field name.
bool case_insensitive_enum_parsing;
@@ -123,8 +123,8 @@ class PROTOBUF_EXPORT ProtoStreamObjectWriter : public ProtoWriter {
bool use_json_name_in_missing_fields;
Options()
- : struct_integers_as_strings(false),
- ignore_unknown_fields(false),
+ : struct_integers_as_strings(false),
+ ignore_unknown_fields(false),
ignore_unknown_enum_values(false),
use_lower_camel_for_enums(false),
case_insensitive_enum_parsing(false),
@@ -192,55 +192,55 @@ class PROTOBUF_EXPORT ProtoStreamObjectWriter : public ProtoWriter {
void RenderDataPiece(StringPiece name, const DataPiece& value);
private:
- // Before the "@type" field is encountered, we store all incoming data
- // into this Event struct and replay them after we get the "@type" field.
+ // Before the "@type" field is encountered, we store all incoming data
+ // into this Event struct and replay them after we get the "@type" field.
class PROTOBUF_EXPORT Event {
- public:
- enum Type {
- START_OBJECT = 0,
- END_OBJECT = 1,
- START_LIST = 2,
- END_LIST = 3,
- RENDER_DATA_PIECE = 4,
- };
-
- // Constructor for END_OBJECT and END_LIST events.
- explicit Event(Type type) : type_(type), value_(DataPiece::NullData()) {}
-
- // Constructor for START_OBJECT and START_LIST events.
- explicit Event(Type type, StringPiece name)
+ public:
+ enum Type {
+ START_OBJECT = 0,
+ END_OBJECT = 1,
+ START_LIST = 2,
+ END_LIST = 3,
+ RENDER_DATA_PIECE = 4,
+ };
+
+ // Constructor for END_OBJECT and END_LIST events.
+ explicit Event(Type type) : type_(type), value_(DataPiece::NullData()) {}
+
+ // Constructor for START_OBJECT and START_LIST events.
+ explicit Event(Type type, StringPiece name)
: type_(type), name_(name), value_(DataPiece::NullData()) {}
-
- // Constructor for RENDER_DATA_PIECE events.
- explicit Event(StringPiece name, const DataPiece& value)
+
+ // Constructor for RENDER_DATA_PIECE events.
+ explicit Event(StringPiece name, const DataPiece& value)
: type_(RENDER_DATA_PIECE), name_(name), value_(value) {
- DeepCopy();
- }
-
- Event(const Event& other)
- : type_(other.type_), name_(other.name_), value_(other.value_) {
- DeepCopy();
- }
-
- Event& operator=(const Event& other) {
- type_ = other.type_;
- name_ = other.name_;
- value_ = other.value_;
- DeepCopy();
- return *this;
- }
-
- void Replay(AnyWriter* writer) const;
-
- private:
- void DeepCopy();
-
- Type type_;
+ DeepCopy();
+ }
+
+ Event(const Event& other)
+ : type_(other.type_), name_(other.name_), value_(other.value_) {
+ DeepCopy();
+ }
+
+ Event& operator=(const Event& other) {
+ type_ = other.type_;
+ name_ = other.name_;
+ value_ = other.value_;
+ DeepCopy();
+ return *this;
+ }
+
+ void Replay(AnyWriter* writer) const;
+
+ private:
+ void DeepCopy();
+
+ Type type_;
TProtoStringType name_;
- DataPiece value_;
+ DataPiece value_;
TProtoStringType value_storage_;
- };
-
+ };
+
// Handles starting up the any once we have a type.
void StartAny(const DataPiece& value);
@@ -276,9 +276,9 @@ class PROTOBUF_EXPORT ProtoStreamObjectWriter : public ProtoWriter {
// }
bool is_well_known_type_;
TypeRenderer* well_known_type_render_;
-
- // Store data before the "@type" field.
- std::vector<Event> uninterpreted_events_;
+
+ // Store data before the "@type" field.
+ std::vector<Event> uninterpreted_events_;
};
// Represents an item in a stack of items used to keep state between
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/type_info.cc b/contrib/libs/protobuf/src/google/protobuf/util/internal/type_info.cc
index 527097322a..6a4ea2a768 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/type_info.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/type_info.cc
@@ -61,8 +61,8 @@ class TypeInfoForTypeResolver : public TypeInfo {
util::StatusOr<const google::protobuf::Type*> ResolveTypeUrl(
StringPiece type_url) const override {
- std::map<StringPiece, StatusOrType>::iterator it =
- cached_types_.find(type_url);
+ std::map<StringPiece, StatusOrType>::iterator it =
+ cached_types_.find(type_url);
if (it != cached_types_.end()) {
return it->second;
}
@@ -87,8 +87,8 @@ class TypeInfoForTypeResolver : public TypeInfo {
const google::protobuf::Enum* GetEnumByTypeUrl(
StringPiece type_url) const override {
- std::map<StringPiece, StatusOrEnum>::iterator it =
- cached_enums_.find(type_url);
+ std::map<StringPiece, StatusOrEnum>::iterator it =
+ cached_enums_.find(type_url);
if (it != cached_enums_.end()) {
return it->second.ok() ? it->second.value() : NULL;
}
@@ -109,12 +109,12 @@ class TypeInfoForTypeResolver : public TypeInfo {
const google::protobuf::Field* FindField(
const google::protobuf::Type* type,
StringPiece camel_case_name) const override {
- std::map<const google::protobuf::Type*, CamelCaseNameTable>::const_iterator
- it = indexed_types_.find(type);
- const CamelCaseNameTable& camel_case_name_table =
- (it == indexed_types_.end())
- ? PopulateNameLookupTable(type, &indexed_types_[type])
- : it->second;
+ std::map<const google::protobuf::Type*, CamelCaseNameTable>::const_iterator
+ it = indexed_types_.find(type);
+ const CamelCaseNameTable& camel_case_name_table =
+ (it == indexed_types_.end())
+ ? PopulateNameLookupTable(type, &indexed_types_[type])
+ : it->second;
StringPiece name = FindWithDefault(
camel_case_name_table, camel_case_name, StringPiece());
if (name.empty()) {
@@ -127,7 +127,7 @@ class TypeInfoForTypeResolver : public TypeInfo {
private:
typedef util::StatusOr<const google::protobuf::Type*> StatusOrType;
typedef util::StatusOr<const google::protobuf::Enum*> StatusOrEnum;
- typedef std::map<StringPiece, StringPiece> CamelCaseNameTable;
+ typedef std::map<StringPiece, StringPiece> CamelCaseNameTable;
template <typename T>
static void DeleteCachedTypes(std::map<StringPiece, T>* cached_types) {
@@ -140,9 +140,9 @@ class TypeInfoForTypeResolver : public TypeInfo {
}
}
- const CamelCaseNameTable& PopulateNameLookupTable(
- const google::protobuf::Type* type,
- CamelCaseNameTable* camel_case_name_table) const {
+ const CamelCaseNameTable& PopulateNameLookupTable(
+ const google::protobuf::Type* type,
+ CamelCaseNameTable* camel_case_name_table) const {
for (int i = 0; i < type->fields_size(); ++i) {
const google::protobuf::Field& field = type->fields(i);
StringPiece name = field.name();
@@ -155,20 +155,20 @@ class TypeInfoForTypeResolver : public TypeInfo {
<< "'.";
}
}
- return *camel_case_name_table;
+ return *camel_case_name_table;
}
TypeResolver* type_resolver_;
// Stores string values that will be referenced by StringPieces in
- // cached_types_, cached_enums_.
+ // cached_types_, cached_enums_.
mutable std::set<TProtoStringType> string_storage_;
mutable std::map<StringPiece, StatusOrType> cached_types_;
mutable std::map<StringPiece, StatusOrEnum> cached_enums_;
- mutable std::map<const google::protobuf::Type*, CamelCaseNameTable>
- indexed_types_;
+ mutable std::map<const google::protobuf::Type*, CamelCaseNameTable>
+ indexed_types_;
};
} // namespace
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/utility.cc b/contrib/libs/protobuf/src/google/protobuf/util/internal/utility.cc
index 33269f33fb..acceb63347 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/utility.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/utility.cc
@@ -30,11 +30,11 @@
#include <google/protobuf/util/internal/utility.h>
-#include <algorithm>
+#include <algorithm>
#include <cmath>
#include <cstdint>
#include <limits>
-
+
#include <google/protobuf/stubs/callback.h>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/logging.h>
@@ -45,8 +45,8 @@
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/map_util.h>
-#include <util/string/util.h>
-
+#include <util/string/util.h>
+
// clang-format off
#include <google/protobuf/port_def.inc>
// clang-format on
@@ -132,10 +132,10 @@ const StringPiece GetTypeWithoutUrl(StringPiece type_url) {
return type_url.substr(kTypeUrlSize + 1);
} else {
size_t idx = type_url.rfind('/');
- if (idx != type_url.npos) {
- type_url.remove_prefix(idx + 1);
- }
- return type_url;
+ if (idx != type_url.npos) {
+ type_url.remove_prefix(idx + 1);
+ }
+ return type_url;
}
}
@@ -181,19 +181,19 @@ const google::protobuf::Field* FindJsonFieldInTypeOrNull(
return nullptr;
}
-const google::protobuf::Field* FindFieldInTypeByNumberOrNull(
+const google::protobuf::Field* FindFieldInTypeByNumberOrNull(
const google::protobuf::Type* type, int32_t number) {
if (type != nullptr) {
- for (int i = 0; i < type->fields_size(); ++i) {
- const google::protobuf::Field& field = type->fields(i);
- if (field.number() == number) {
- return &field;
- }
- }
- }
+ for (int i = 0; i < type->fields_size(); ++i) {
+ const google::protobuf::Field& field = type->fields(i);
+ if (field.number() == number) {
+ return &field;
+ }
+ }
+ }
return nullptr;
-}
-
+}
+
const google::protobuf::EnumValue* FindEnumValueByNameOrNull(
const google::protobuf::Enum* enum_type, StringPiece enum_name) {
if (enum_type != nullptr) {
@@ -220,29 +220,29 @@ const google::protobuf::EnumValue* FindEnumValueByNumberOrNull(
return nullptr;
}
-const google::protobuf::EnumValue* FindEnumValueByNameWithoutUnderscoreOrNull(
- const google::protobuf::Enum* enum_type, StringPiece enum_name) {
+const google::protobuf::EnumValue* FindEnumValueByNameWithoutUnderscoreOrNull(
+ const google::protobuf::Enum* enum_type, StringPiece enum_name) {
if (enum_type != nullptr) {
- for (int i = 0; i < enum_type->enumvalue_size(); ++i) {
- const google::protobuf::EnumValue& enum_value = enum_type->enumvalue(i);
+ for (int i = 0; i < enum_type->enumvalue_size(); ++i) {
+ const google::protobuf::EnumValue& enum_value = enum_type->enumvalue(i);
TProtoStringType enum_name_without_underscore = enum_value.name();
-
- // Remove underscore from the name.
+
+ // Remove underscore from the name.
RemoveAll(enum_name_without_underscore, '_');
- // Make the name uppercase.
+ // Make the name uppercase.
for (TProtoStringType::iterator it = enum_name_without_underscore.begin();
- it != enum_name_without_underscore.end(); ++it) {
- *it = ascii_toupper(*it);
- }
-
- if (enum_name_without_underscore == enum_name) {
- return &enum_value;
- }
- }
- }
+ it != enum_name_without_underscore.end(); ++it) {
+ *it = ascii_toupper(*it);
+ }
+
+ if (enum_name_without_underscore == enum_name) {
+ return &enum_value;
+ }
+ }
+ }
return nullptr;
-}
-
+}
+
TProtoStringType EnumValueNameToLowerCamelCase(StringPiece input) {
TProtoStringType input_string(input);
input_string.to_lower();
@@ -363,18 +363,18 @@ bool IsValidBoolString(StringPiece bool_string) {
bool IsMap(const google::protobuf::Field& field,
const google::protobuf::Type& type) {
return field.cardinality() == google::protobuf::Field::CARDINALITY_REPEATED &&
- (GetBoolOptionOrDefault(type.options(), "map_entry", false) ||
+ (GetBoolOptionOrDefault(type.options(), "map_entry", false) ||
GetBoolOptionOrDefault(type.options(),
- "google.protobuf.MessageOptions.map_entry",
- false));
+ "google.protobuf.MessageOptions.map_entry",
+ false));
}
bool IsMessageSetWireFormat(const google::protobuf::Type& type) {
- return GetBoolOptionOrDefault(type.options(), "message_set_wire_format",
- false) ||
- GetBoolOptionOrDefault(
- type.options(),
- "google.protobuf.MessageOptions.message_set_wire_format", false);
+ return GetBoolOptionOrDefault(type.options(), "message_set_wire_format",
+ false) ||
+ GetBoolOptionOrDefault(
+ type.options(),
+ "google.protobuf.MessageOptions.message_set_wire_format", false);
}
TProtoStringType DoubleAsString(double value) {
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/utility.h b/contrib/libs/protobuf/src/google/protobuf/util/internal/utility.h
index 4edf5424ef..f1a1cf44d4 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/utility.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/utility.h
@@ -126,10 +126,10 @@ const google::protobuf::Field* FindFieldInTypeOrNull(
const google::protobuf::Field* FindJsonFieldInTypeOrNull(
const google::protobuf::Type* type, StringPiece json_name);
-// Similar to FindFieldInTypeOrNull, but this looks up fields by number.
-const google::protobuf::Field* FindFieldInTypeByNumberOrNull(
+// Similar to FindFieldInTypeOrNull, but this looks up fields by number.
+const google::protobuf::Field* FindFieldInTypeByNumberOrNull(
const google::protobuf::Type* type, int32_t number);
-
+
// Finds and returns the EnumValue identified by enum_name in the passed tech
// Enum object. Returns nullptr if none found.
const google::protobuf::EnumValue* FindEnumValueByNameOrNull(
@@ -140,13 +140,13 @@ const google::protobuf::EnumValue* FindEnumValueByNameOrNull(
const google::protobuf::EnumValue* FindEnumValueByNumberOrNull(
const google::protobuf::Enum* enum_type, int32_t value);
-// Finds and returns the EnumValue identified by enum_name without underscore in
+// Finds and returns the EnumValue identified by enum_name without underscore in
// the passed tech Enum object. Returns nullptr if none found.
-// For Ex. if enum_name is ACTIONANDADVENTURE it can get accepted if
-// EnumValue's name is action_and_adventure or ACTION_AND_ADVENTURE.
-const google::protobuf::EnumValue* FindEnumValueByNameWithoutUnderscoreOrNull(
- const google::protobuf::Enum* enum_type, StringPiece enum_name);
-
+// For Ex. if enum_name is ACTIONANDADVENTURE it can get accepted if
+// EnumValue's name is action_and_adventure or ACTION_AND_ADVENTURE.
+const google::protobuf::EnumValue* FindEnumValueByNameWithoutUnderscoreOrNull(
+ const google::protobuf::Enum* enum_type, StringPiece enum_name);
+
// Converts input to camel-case and returns it.
PROTOBUF_EXPORT TProtoStringType ToCamelCase(const StringPiece input);
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/json_util.cc b/contrib/libs/protobuf/src/google/protobuf/util/json_util.cc
index bfbc7de7c6..d96bd8e17e 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/json_util.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/json_util.cc
@@ -56,28 +56,28 @@ namespace protobuf {
namespace util {
namespace internal {
-ZeroCopyStreamByteSink::~ZeroCopyStreamByteSink() {
+ZeroCopyStreamByteSink::~ZeroCopyStreamByteSink() {
if (buffer_size_ > 0) {
stream_->BackUp(buffer_size_);
}
-}
-
+}
+
void ZeroCopyStreamByteSink::Append(const char* bytes, size_t len) {
- while (true) {
- if (len <= buffer_size_) {
- memcpy(buffer_, bytes, len);
- buffer_ = static_cast<char*>(buffer_) + len;
- buffer_size_ -= len;
- return;
- }
+ while (true) {
+ if (len <= buffer_size_) {
+ memcpy(buffer_, bytes, len);
+ buffer_ = static_cast<char*>(buffer_) + len;
+ buffer_size_ -= len;
+ return;
+ }
if (buffer_size_ > 0) {
memcpy(buffer_, bytes, buffer_size_);
bytes += buffer_size_;
len -= buffer_size_;
}
- if (!stream_->Next(&buffer_, &buffer_size_)) {
+ if (!stream_->Next(&buffer_, &buffer_size_)) {
// There isn't a way for ByteSink to report errors.
- buffer_size_ = 0;
+ buffer_size_ = 0;
return;
}
}
@@ -104,8 +104,8 @@ util::Status BinaryToJsonStream(TypeResolver* resolver,
if (options.always_print_primitive_fields) {
converter::DefaultValueObjectWriter default_value_writer(resolver, type,
&json_writer);
- default_value_writer.set_preserve_proto_field_names(
- options.preserve_proto_field_names);
+ default_value_writer.set_preserve_proto_field_names(
+ options.preserve_proto_field_names);
default_value_writer.set_print_enums_as_ints(
options.always_print_enums_as_ints);
return proto_source.WriteTo(&default_value_writer);
@@ -128,7 +128,7 @@ util::Status BinaryToJsonString(TypeResolver* resolver,
namespace {
class StatusErrorListener : public converter::ErrorListener {
public:
- StatusErrorListener() {}
+ StatusErrorListener() {}
~StatusErrorListener() override {}
util::Status GetStatus() { return status_; }
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/json_util.h b/contrib/libs/protobuf/src/google/protobuf/util/json_util.h
index 888fca187a..7be7f4222c 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/json_util.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/json_util.h
@@ -74,17 +74,17 @@ struct JsonPrintOptions {
// int32 field set to 0 will be omitted. Set this flag to true will override
// the default behavior and print primitive fields regardless of their values.
bool always_print_primitive_fields;
- // Whether to always print enums as ints. By default they are rendered as
- // strings.
- bool always_print_enums_as_ints;
- // Whether to preserve proto field names
- bool preserve_proto_field_names;
-
- JsonPrintOptions()
- : add_whitespace(false),
- always_print_primitive_fields(false),
- always_print_enums_as_ints(false),
- preserve_proto_field_names(false) {}
+ // Whether to always print enums as ints. By default they are rendered as
+ // strings.
+ bool always_print_enums_as_ints;
+ // Whether to preserve proto field names
+ bool preserve_proto_field_names;
+
+ JsonPrintOptions()
+ : add_whitespace(false),
+ always_print_primitive_fields(false),
+ always_print_enums_as_ints(false),
+ preserve_proto_field_names(false) {}
};
// DEPRECATED. Use JsonPrintOptions instead.
@@ -182,14 +182,14 @@ class PROTOBUF_EXPORT ZeroCopyStreamByteSink : public strings::ByteSink {
public:
explicit ZeroCopyStreamByteSink(io::ZeroCopyOutputStream* stream)
: stream_(stream), buffer_(NULL), buffer_size_(0) {}
- ~ZeroCopyStreamByteSink();
+ ~ZeroCopyStreamByteSink();
void Append(const char* bytes, size_t len) override;
private:
io::ZeroCopyOutputStream* stream_;
- void* buffer_;
- int buffer_size_;
+ void* buffer_;
+ int buffer_size_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ZeroCopyStreamByteSink);
};
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.cc b/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.cc
index 2e1f2c71c9..2573fcdc3d 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.cc
@@ -204,32 +204,32 @@ void MatchIndicesPostProcessorForSmartList(std::vector<int>* match_list1,
}
}
-MessageDifferencer::MapEntryKeyComparator::MapEntryKeyComparator(
- MessageDifferencer* message_differencer)
- : message_differencer_(message_differencer) {}
-
-bool MessageDifferencer::MapEntryKeyComparator::IsMatch(
- const Message& message1, const Message& message2,
- const std::vector<SpecificField>& parent_fields) const {
- // Map entry has its key in the field with tag 1. See the comment for
- // map_entry in MessageOptions.
- const FieldDescriptor* key = message1.GetDescriptor()->FindFieldByNumber(1);
- // If key is not present in message1 and we're doing partial comparison or if
- // map key is explicitly ignored treat the field as set instead,
- const bool treat_as_set =
- (message_differencer_->scope() == PARTIAL &&
- !message1.GetReflection()->HasField(message1, key)) ||
- message_differencer_->IsIgnored(message1, message2, key, parent_fields);
-
- std::vector<SpecificField> current_parent_fields(parent_fields);
- if (treat_as_set) {
- return message_differencer_->Compare(message1, message2,
- &current_parent_fields);
- }
- return message_differencer_->CompareFieldValueUsingParentFields(
- message1, message2, key, -1, -1, &current_parent_fields);
-}
-
+MessageDifferencer::MapEntryKeyComparator::MapEntryKeyComparator(
+ MessageDifferencer* message_differencer)
+ : message_differencer_(message_differencer) {}
+
+bool MessageDifferencer::MapEntryKeyComparator::IsMatch(
+ const Message& message1, const Message& message2,
+ const std::vector<SpecificField>& parent_fields) const {
+ // Map entry has its key in the field with tag 1. See the comment for
+ // map_entry in MessageOptions.
+ const FieldDescriptor* key = message1.GetDescriptor()->FindFieldByNumber(1);
+ // If key is not present in message1 and we're doing partial comparison or if
+ // map key is explicitly ignored treat the field as set instead,
+ const bool treat_as_set =
+ (message_differencer_->scope() == PARTIAL &&
+ !message1.GetReflection()->HasField(message1, key)) ||
+ message_differencer_->IsIgnored(message1, message2, key, parent_fields);
+
+ std::vector<SpecificField> current_parent_fields(parent_fields);
+ if (treat_as_set) {
+ return message_differencer_->Compare(message1, message2,
+ &current_parent_fields);
+ }
+ return message_differencer_->CompareFieldValueUsingParentFields(
+ message1, message2, key, -1, -1, &current_parent_fields);
+}
+
bool MessageDifferencer::Equals(const Message& message1,
const Message& message2) {
MessageDifferencer differencer;
@@ -269,9 +269,9 @@ MessageDifferencer::MessageDifferencer()
message_field_comparison_(EQUAL),
scope_(FULL),
repeated_field_comparison_(AS_LIST),
- map_entry_key_comparator_(this),
+ map_entry_key_comparator_(this),
report_matches_(false),
- report_moves_(true),
+ report_moves_(true),
report_ignores_(true),
output_string_(nullptr),
match_indices_for_smart_list_callback_(
@@ -568,10 +568,10 @@ bool MessageDifferencer::Compare(const Message& message1,
std::unique_ptr<Message> data2;
if (unpack_any_field_.UnpackAny(message1, &data1) &&
unpack_any_field_.UnpackAny(message2, &data2)) {
- // Avoid DFATAL for different descriptors in google.protobuf.Any payloads.
- if (data1->GetDescriptor() != data2->GetDescriptor()) {
- return false;
- }
+ // Avoid DFATAL for different descriptors in google.protobuf.Any payloads.
+ if (data1->GetDescriptor() != data2->GetDescriptor()) {
+ return false;
+ }
return Compare(*data1, *data2, parent_fields);
}
}
@@ -614,15 +614,15 @@ FieldDescriptorArray MessageDifferencer::RetrieveFields(const Message& message,
if (descriptor->options().map_entry()) {
if (this->scope_ == PARTIAL && base_message) {
reflection->ListFields(message, &tmp_message_fields_);
- } else {
- // Map entry fields are always considered present.
+ } else {
+ // Map entry fields are always considered present.
for (int i = 0; i < descriptor->field_count(); i++) {
tmp_message_fields_.push_back(descriptor->field(i));
- }
- }
- } else {
+ }
+ }
+ } else {
reflection->ListFields(message, &tmp_message_fields_);
- }
+ }
// Add sentinel values to deal with the
// case where the number of the fields in
// each list are different.
@@ -751,7 +751,7 @@ bool MessageDifferencer::CompareWithFieldsInternal(
}
if (reporter_ != NULL) {
- assert(field1 != NULL);
+ assert(field1 != NULL);
int count = field1->is_repeated()
? reflection1->FieldSize(message1, field1)
: 1;
@@ -836,7 +836,7 @@ bool MessageDifferencer::CompareWithFieldsInternal(
}
bool fieldDifferent = false;
- assert(field1 != NULL);
+ assert(field1 != NULL);
if (field1->is_map()) {
fieldDifferent =
!CompareMapField(message1, message2, field1, parent_fields);
@@ -872,10 +872,10 @@ bool MessageDifferencer::CompareWithFieldsInternal(
return !isDifferent;
}
-bool MessageDifferencer::IsMatch(
- const FieldDescriptor* repeated_field,
- const MapKeyComparator* key_comparator, const Message* message1,
- const Message* message2, const std::vector<SpecificField>& parent_fields,
+bool MessageDifferencer::IsMatch(
+ const FieldDescriptor* repeated_field,
+ const MapKeyComparator* key_comparator, const Message* message1,
+ const Message* message2, const std::vector<SpecificField>& parent_fields,
Reporter* reporter, int index1, int index2) {
std::vector<SpecificField> current_parent_fields(parent_fields);
if (repeated_field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) {
@@ -904,8 +904,8 @@ bool MessageDifferencer::IsMatch(
reflection2->GetRepeatedMessage(*message2, repeated_field, index2);
SpecificField specific_field;
specific_field.field = repeated_field;
- specific_field.index = index1;
- specific_field.new_index = index2;
+ specific_field.index = index1;
+ specific_field.new_index = index2;
current_parent_fields.push_back(specific_field);
match = key_comparator->IsMatch(m1, m2, current_parent_fields);
}
@@ -1162,8 +1162,8 @@ bool MessageDifferencer::CompareRepeatedRep(
parent_fields->pop_back();
fieldDifferent = true;
} else if (reporter_ != NULL &&
- specific_field.index != specific_field.new_index &&
- !specific_field.field->is_map() && report_moves_) {
+ specific_field.index != specific_field.new_index &&
+ !specific_field.field->is_map() && report_moves_) {
parent_fields->push_back(specific_field);
reporter_->ReportMoved(message1, message2, *parent_fields);
parent_fields->pop_back();
@@ -1193,7 +1193,7 @@ bool MessageDifferencer::CompareRepeatedRep(
for (int i = 0; i < count1; ++i) {
if (!simple_list && match_list1[i] != -1) continue;
if (simple_list && i < count2) continue;
- assert(reporter_ != NULL);
+ assert(reporter_ != NULL);
specific_field.index = i;
parent_fields->push_back(specific_field);
reporter_->ReportDeleted(message1, message2, *parent_fields);
@@ -1257,7 +1257,7 @@ bool MessageDifferencer::CompareFieldValueUsingParentFields(
bool MessageDifferencer::CheckPathChanged(
const std::vector<SpecificField>& field_path) {
for (const SpecificField& specific_field : field_path) {
- // Don't check indexes for map entries -- maps are unordered.
+ // Don't check indexes for map entries -- maps are unordered.
if (specific_field.field != nullptr && specific_field.field->is_map())
continue;
if (specific_field.index != specific_field.new_index) return true;
@@ -1317,8 +1317,8 @@ bool MessageDifferencer::IsIgnored(
bool MessageDifferencer::IsUnknownFieldIgnored(
const Message& message1, const Message& message2,
- const SpecificField& field,
- const std::vector<SpecificField>& parent_fields) {
+ const SpecificField& field,
+ const std::vector<SpecificField>& parent_fields) {
for (IgnoreCriteria* criteria : ignore_criteria_) {
if (criteria->IsUnknownFieldIgnored(message1, message2, field,
parent_fields)) {
@@ -1328,19 +1328,19 @@ bool MessageDifferencer::IsUnknownFieldIgnored(
return false;
}
-const MessageDifferencer::MapKeyComparator*
-MessageDifferencer ::GetMapKeyComparator(const FieldDescriptor* field) const {
+const MessageDifferencer::MapKeyComparator*
+MessageDifferencer ::GetMapKeyComparator(const FieldDescriptor* field) const {
if (!field->is_repeated()) return NULL;
- FieldKeyComparatorMap::const_iterator it =
- map_field_key_comparator_.find(field);
- if (it != map_field_key_comparator_.end()) {
- return it->second;
- }
- if (field->is_map()) {
- // field cannot already be treated as list or set since TreatAsList() and
- // TreatAsSet() call GetMapKeyComparator() and fail if it returns non-NULL.
- return &map_entry_key_comparator_;
- }
+ FieldKeyComparatorMap::const_iterator it =
+ map_field_key_comparator_.find(field);
+ if (it != map_field_key_comparator_.end()) {
+ return it->second;
+ }
+ if (field->is_map()) {
+ // field cannot already be treated as list or set since TreatAsList() and
+ // TreatAsSet() call GetMapKeyComparator() and fail if it returns non-NULL.
+ return &map_entry_key_comparator_;
+ }
return NULL;
}
@@ -1682,8 +1682,8 @@ int MaximumMatcher::FindMaximumMatch(bool early_return) {
bool MaximumMatcher::Match(int left, int right) {
std::pair<int, int> p(left, right);
- std::map<std::pair<int, int>, bool>::iterator it =
- cached_match_results_.find(p);
+ std::map<std::pair<int, int>, bool>::iterator it =
+ cached_match_results_.find(p);
if (it != cached_match_results_.end()) {
return it->second;
}
@@ -1931,10 +1931,10 @@ void MessageDifferencer::StreamReporter::PrintPath(
printer_->PrintRaw(specific_field.field->name());
}
- if (specific_field.field->is_map()) {
+ if (specific_field.field->is_map()) {
PrintMapKey(field_path, left_side, specific_field, i);
- continue;
- }
+ continue;
+ }
} else {
printer_->PrintRaw(StrCat(specific_field.unknown_field_number));
}
@@ -1948,7 +1948,7 @@ void MessageDifferencer::StreamReporter::PrintPath(
}
}
-
+
void MessageDifferencer::StreamReporter::PrintValue(
const Message& message, const std::vector<SpecificField>& field_path,
bool left_side) {
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.h b/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.h
index bafe008562..b68c24b7de 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.h
@@ -307,8 +307,8 @@ class PROTOBUF_EXPORT MessageDifferencer {
// Note this is a different function since the last SpecificField in field
// path has a null field. This could break existing Reporter.
virtual void ReportUnknownFieldIgnored(
- const Message& /* message1 */, const Message& /* message2 */,
- const std::vector<SpecificField>& /* field_path */) {}
+ const Message& /* message1 */, const Message& /* message2 */,
+ const std::vector<SpecificField>& /* field_path */) {}
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Reporter);
@@ -321,9 +321,9 @@ class PROTOBUF_EXPORT MessageDifferencer {
MapKeyComparator();
virtual ~MapKeyComparator();
- virtual bool IsMatch(
+ virtual bool IsMatch(
const Message& /* message1 */, const Message& /* message2 */,
- const std::vector<SpecificField>& /* parent_fields */) const {
+ const std::vector<SpecificField>& /* parent_fields */) const {
GOOGLE_CHECK(false) << "IsMatch() is not implemented.";
return false;
}
@@ -346,16 +346,16 @@ class PROTOBUF_EXPORT MessageDifferencer {
// Returns true if the field should be ignored.
virtual bool IsIgnored(
const Message& /* message1 */, const Message& /* message2 */,
- const FieldDescriptor* /* field */,
- const std::vector<SpecificField>& /* parent_fields */) = 0;
+ const FieldDescriptor* /* field */,
+ const std::vector<SpecificField>& /* parent_fields */) = 0;
// Returns true if the unknown field should be ignored.
// Note: This will be called for unknown fields as well in which case
// field.field will be null.
virtual bool IsUnknownFieldIgnored(
- const Message& /* message1 */, const Message& /* message2 */,
- const SpecificField& /* field */,
- const std::vector<SpecificField>& /* parent_fields */) {
+ const Message& /* message1 */, const Message& /* message2 */,
+ const SpecificField& /* field */,
+ const std::vector<SpecificField>& /* parent_fields */) {
return false;
}
};
@@ -560,17 +560,17 @@ class PROTOBUF_EXPORT MessageDifferencer {
report_matches_ = report_matches;
}
- // Tells the differencer whether or not to report moves (in a set or map
- // repeated field). This method must be called before Compare. The default for
- // a new differencer is true.
+ // Tells the differencer whether or not to report moves (in a set or map
+ // repeated field). This method must be called before Compare. The default for
+ // a new differencer is true.
void set_report_moves(bool report_moves) { report_moves_ = report_moves; }
// Tells the differencer whether or not to report ignored values. This method
// must be called before Compare. The default for a new differencer is true.
void set_report_ignores(bool report_ignores) {
report_ignores_ = report_ignores;
- }
-
+ }
+
// Sets the scope of the comparison (as defined in the Scope enumeration
// above) that is used by this differencer when determining which fields to
// compare between the messages.
@@ -606,10 +606,10 @@ class PROTOBUF_EXPORT MessageDifferencer {
// Same as above, except comparing only the list of fields specified by the
// two vectors of FieldDescriptors.
- bool CompareWithFields(
- const Message& message1, const Message& message2,
- const std::vector<const FieldDescriptor*>& message1_fields,
- const std::vector<const FieldDescriptor*>& message2_fields);
+ bool CompareWithFields(
+ const Message& message1, const Message& message2,
+ const std::vector<const FieldDescriptor*>& message1_fields,
+ const std::vector<const FieldDescriptor*>& message2_fields);
// Automatically creates a reporter that will output the differences
// found (if any) to the specified output string pointer. Note that this
@@ -718,19 +718,19 @@ class PROTOBUF_EXPORT MessageDifferencer {
// relies on some private methods of MessageDifferencer. That's why this
// class is declared as a nested class of MessageDifferencer.
class MultipleFieldsMapKeyComparator;
-
- // A MapKeyComparator for use with map_entries.
+
+ // A MapKeyComparator for use with map_entries.
class PROTOBUF_EXPORT MapEntryKeyComparator : public MapKeyComparator {
- public:
- explicit MapEntryKeyComparator(MessageDifferencer* message_differencer);
+ public:
+ explicit MapEntryKeyComparator(MessageDifferencer* message_differencer);
bool IsMatch(
const Message& message1, const Message& message2,
const std::vector<SpecificField>& parent_fields) const override;
-
- private:
- MessageDifferencer* message_differencer_;
- };
-
+
+ private:
+ MessageDifferencer* message_differencer_;
+ };
+
// Returns true if field1's number() is less than field2's.
static bool FieldBefore(const FieldDescriptor* field1,
const FieldDescriptor* field2);
@@ -815,10 +815,10 @@ class PROTOBUF_EXPORT MessageDifferencer {
// list of parent messages if it needs to recursively compare the given field.
// To avoid confusing users you should not set it to NULL unless you modified
// Reporter to handle the change of parent_fields correctly.
- bool CompareFieldValueUsingParentFields(
+ bool CompareFieldValueUsingParentFields(
const Message& message1, const Message& message2,
const FieldDescriptor* field, int index1, int index2,
- std::vector<SpecificField>* parent_fields);
+ std::vector<SpecificField>* parent_fields);
// Compares the specified field on the two messages, returning comparison
// result, as returned by appropriate FieldComparator.
@@ -866,10 +866,10 @@ class PROTOBUF_EXPORT MessageDifferencer {
const SpecificField& field,
const std::vector<SpecificField>& parent_fields);
- // Returns MapKeyComparator* when this field has been configured to be treated
- // as a map or its is_map() return true. If not, returns NULL.
- const MapKeyComparator* GetMapKeyComparator(
- const FieldDescriptor* field) const;
+ // Returns MapKeyComparator* when this field has been configured to be treated
+ // as a map or its is_map() return true. If not, returns NULL.
+ const MapKeyComparator* GetMapKeyComparator(
+ const FieldDescriptor* field) const;
// Attempts to match indices of a repeated field, so that the contained values
// match. Clears output vectors and sets their values to indices of paired
@@ -879,11 +879,11 @@ class PROTOBUF_EXPORT MessageDifferencer {
// This method returns false if the match failed. However, it doesn't mean
// that the comparison succeeds when this method returns true (you need to
// double-check in this case).
- bool MatchRepeatedFieldIndices(
+ bool MatchRepeatedFieldIndices(
const Message& message1, const Message& message2,
- const FieldDescriptor* repeated_field,
+ const FieldDescriptor* repeated_field,
const MapKeyComparator* key_comparator,
- const std::vector<SpecificField>& parent_fields,
+ const std::vector<SpecificField>& parent_fields,
std::vector<int>* match_list1, std::vector<int>* match_list2);
// Checks if index is equal to new_index in all the specific fields.
@@ -920,7 +920,7 @@ class PROTOBUF_EXPORT MessageDifferencer {
// MapKeyComparator is created for comparison purpose.
std::vector<MapKeyComparator*> owned_key_comparators_;
FieldKeyComparatorMap map_field_key_comparator_;
- MapEntryKeyComparator map_entry_key_comparator_;
+ MapEntryKeyComparator map_entry_key_comparator_;
std::vector<IgnoreCriteria*> ignore_criteria_;
// Reused multiple times in RetrieveFields to avoid extra allocations
std::vector<const FieldDescriptor*> tmp_message_fields_;
@@ -934,7 +934,7 @@ class PROTOBUF_EXPORT MessageDifferencer {
enum { kFCDefault, kFCBase } field_comparator_kind_ = kFCDefault;
bool report_matches_;
- bool report_moves_;
+ bool report_moves_;
bool report_ignores_;
TProtoStringType* output_string_;
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/time_util.cc b/contrib/libs/protobuf/src/google/protobuf/util/time_util.cc
index 0f6688f7f8..1b2056a785 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/time_util.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/time_util.cc
@@ -146,13 +146,13 @@ int64_t RoundTowardZero(int64_t value, int64_t divider) {
} // namespace
// Actually define these static const integers. Required by C++ standard (but
-// some compilers don't like it).
-#ifndef _MSC_VER
+// some compilers don't like it).
+#ifndef _MSC_VER
const int64_t TimeUtil::kTimestampMinSeconds;
const int64_t TimeUtil::kTimestampMaxSeconds;
const int64_t TimeUtil::kDurationMaxSeconds;
const int64_t TimeUtil::kDurationMinSeconds;
-#endif // !_MSC_VER
+#endif // !_MSC_VER
TProtoStringType TimeUtil::ToString(const Timestamp& timestamp) {
return FormatTime(timestamp.seconds(), timestamp.nanos());
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/time_util.h b/contrib/libs/protobuf/src/google/protobuf/util/time_util.h
index bef0e0f390..0a297e9e64 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/time_util.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/time_util.h
@@ -28,14 +28,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Defines utilities for the Timestamp and Duration well known types.
-
+// Defines utilities for the Timestamp and Duration well known types.
+
#ifndef GOOGLE_PROTOBUF_UTIL_TIME_UTIL_H__
#define GOOGLE_PROTOBUF_UTIL_TIME_UTIL_H__
#include <cstdint>
#include <ctime>
-#include <ostream>
+#include <ostream>
#include <string>
#ifdef _MSC_VER
#ifdef _XBOX_ONE
@@ -59,7 +59,7 @@ namespace google {
namespace protobuf {
namespace util {
-// Utility functions for Timestamp and Duration.
+// Utility functions for Timestamp and Duration.
class PROTOBUF_EXPORT TimeUtil {
typedef google::protobuf::Timestamp Timestamp;
typedef google::protobuf::Duration Duration;
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/type_resolver.h b/contrib/libs/protobuf/src/google/protobuf/util/type_resolver.h
index abde1ca827..9bf967a803 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/type_resolver.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/type_resolver.h
@@ -28,8 +28,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Defines a TypeResolver for the Any message.
-
+// Defines a TypeResolver for the Any message.
+
#ifndef GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_H__
#define GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_H__
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/type_resolver_util.cc b/contrib/libs/protobuf/src/google/protobuf/util/type_resolver_util.cc
index cade5078ee..6fafbcb652 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/type_resolver_util.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/type_resolver_util.cc
@@ -74,11 +74,11 @@ class DescriptorPoolTypeResolver : public TypeResolver {
Type* type) override {
TProtoStringType type_name;
util::Status status = ParseTypeUrl(type_url, &type_name);
- if (!status.ok()) {
- return status;
+ if (!status.ok()) {
+ return status;
}
-
- const Descriptor* descriptor = pool_->FindMessageTypeByName(type_name);
+
+ const Descriptor* descriptor = pool_->FindMessageTypeByName(type_name);
if (descriptor == NULL) {
return util::NotFoundError("Invalid type URL, unknown type: " +
type_name);
@@ -91,10 +91,10 @@ class DescriptorPoolTypeResolver : public TypeResolver {
Enum* enum_type) override {
TProtoStringType type_name;
util::Status status = ParseTypeUrl(type_url, &type_name);
- if (!status.ok()) {
- return status;
+ if (!status.ok()) {
+ return status;
}
-
+
const EnumDescriptor* descriptor = pool_->FindEnumTypeByName(type_name);
if (descriptor == NULL) {
return util::InvalidArgumentError("Invalid type URL, unknown type: " +
@@ -305,15 +305,15 @@ class DescriptorPoolTypeResolver : public TypeResolver {
util::Status ParseTypeUrl(const TProtoStringType& type_url,
TProtoStringType* type_name) {
- if (type_url.substr(0, url_prefix_.size() + 1) != url_prefix_ + "/") {
+ if (type_url.substr(0, url_prefix_.size() + 1) != url_prefix_ + "/") {
return util::InvalidArgumentError(
StrCat("Invalid type URL, type URLs must be of the form '",
url_prefix_, "/<typename>', got: ", type_url));
- }
- *type_name = type_url.substr(url_prefix_.size() + 1);
+ }
+ *type_name = type_url.substr(url_prefix_.size() + 1);
return util::Status();
- }
-
+ }
+
TProtoStringType DefaultValueAsString(const FieldDescriptor* descriptor) {
switch (descriptor->cpp_type()) {
case FieldDescriptor::CPPTYPE_INT32:
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/type_resolver_util.h b/contrib/libs/protobuf/src/google/protobuf/util/type_resolver_util.h
index 4252ce8ef3..035b385634 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/type_resolver_util.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/type_resolver_util.h
@@ -28,8 +28,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Defines utilities for the TypeResolver.
-
+// Defines utilities for the TypeResolver.
+
#ifndef GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_UTIL_H__
#define GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_UTIL_H__
diff --git a/contrib/libs/protobuf/src/google/protobuf/wire_format.cc b/contrib/libs/protobuf/src/google/protobuf/wire_format.cc
index 2363b6ca7b..cb0b32465f 100644
--- a/contrib/libs/protobuf/src/google/protobuf/wire_format.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/wire_format.cc
@@ -57,16 +57,16 @@
#include <google/protobuf/port_def.inc>
-const size_t kMapEntryTagByteSize = 2;
-
+const size_t kMapEntryTagByteSize = 2;
+
namespace google {
namespace protobuf {
namespace internal {
-// Forward declare static functions
-static size_t MapValueRefDataOnlyByteSize(const FieldDescriptor* field,
+// Forward declare static functions
+static size_t MapValueRefDataOnlyByteSize(const FieldDescriptor* field,
const MapValueConstRef& value);
-
+
// ===================================================================
bool UnknownFieldSetFieldSkipper::SkipField(io::CodedInputStream* input,
@@ -85,8 +85,8 @@ void UnknownFieldSetFieldSkipper::SkipUnknownEnum(int field_number, int value) {
bool WireFormat::SkipField(io::CodedInputStream* input, uint32 tag,
UnknownFieldSet* unknown_fields) {
int number = WireFormatLite::GetTagFieldNumber(tag);
- // Field number 0 is illegal.
- if (number == 0) return false;
+ // Field number 0 is illegal.
+ if (number == 0) return false;
switch (WireFormatLite::GetTagWireType(tag)) {
case WireFormatLite::WIRETYPE_VARINT: {
@@ -263,9 +263,9 @@ uint8* WireFormat::InternalSerializeUnknownMessageSetItemsToArray(
return target;
}
-size_t WireFormat::ComputeUnknownFieldsSize(
+size_t WireFormat::ComputeUnknownFieldsSize(
const UnknownFieldSet& unknown_fields) {
- size_t size = 0;
+ size_t size = 0;
for (int i = 0; i < unknown_fields.field_count(); i++) {
const UnknownField& field = unknown_fields.field(i);
@@ -305,9 +305,9 @@ size_t WireFormat::ComputeUnknownFieldsSize(
return size;
}
-size_t WireFormat::ComputeUnknownMessageSetItemsSize(
+size_t WireFormat::ComputeUnknownMessageSetItemsSize(
const UnknownFieldSet& unknown_fields) {
- size_t size = 0;
+ size_t size = 0;
for (int i = 0; i < unknown_fields.field_count(); i++) {
const UnknownField& field = unknown_fields.field(i);
@@ -1036,16 +1036,16 @@ uint8* WireFormat::_InternalSerialize(const Message& message, uint8* target,
const Reflection* message_reflection = message.GetReflection();
std::vector<const FieldDescriptor*> fields;
-
- // Fields of map entry should always be serialized.
- if (descriptor->options().map_entry()) {
- for (int i = 0; i < descriptor->field_count(); i++) {
- fields.push_back(descriptor->field(i));
- }
- } else {
- message_reflection->ListFields(message, &fields);
- }
-
+
+ // Fields of map entry should always be serialized.
+ if (descriptor->options().map_entry()) {
+ for (int i = 0; i < descriptor->field_count(); i++) {
+ fields.push_back(descriptor->field(i));
+ }
+ } else {
+ message_reflection->ListFields(message, &fields);
+ }
+
for (auto field : fields) {
target = InternalSerializeField(field, message, target, stream);
}
@@ -1063,64 +1063,64 @@ uint8* SerializeMapKeyWithCachedSizes(const FieldDescriptor* field,
const MapKey& value, uint8* target,
io::EpsCopyOutputStream* stream) {
target = stream->EnsureSpace(target);
- switch (field->type()) {
- case FieldDescriptor::TYPE_DOUBLE:
- case FieldDescriptor::TYPE_FLOAT:
- case FieldDescriptor::TYPE_GROUP:
- case FieldDescriptor::TYPE_MESSAGE:
- case FieldDescriptor::TYPE_BYTES:
- case FieldDescriptor::TYPE_ENUM:
- GOOGLE_LOG(FATAL) << "Unsupported";
- break;
+ switch (field->type()) {
+ case FieldDescriptor::TYPE_DOUBLE:
+ case FieldDescriptor::TYPE_FLOAT:
+ case FieldDescriptor::TYPE_GROUP:
+ case FieldDescriptor::TYPE_MESSAGE:
+ case FieldDescriptor::TYPE_BYTES:
+ case FieldDescriptor::TYPE_ENUM:
+ GOOGLE_LOG(FATAL) << "Unsupported";
+ break;
#define CASE_TYPE(FieldType, CamelFieldType, CamelCppType) \
case FieldDescriptor::TYPE_##FieldType: \
target = WireFormatLite::Write##CamelFieldType##ToArray( \
1, value.Get##CamelCppType##Value(), target); \
- break;
- CASE_TYPE(INT64, Int64, Int64)
- CASE_TYPE(UINT64, UInt64, UInt64)
- CASE_TYPE(INT32, Int32, Int32)
- CASE_TYPE(FIXED64, Fixed64, UInt64)
- CASE_TYPE(FIXED32, Fixed32, UInt32)
- CASE_TYPE(BOOL, Bool, Bool)
- CASE_TYPE(UINT32, UInt32, UInt32)
- CASE_TYPE(SFIXED32, SFixed32, Int32)
- CASE_TYPE(SFIXED64, SFixed64, Int64)
- CASE_TYPE(SINT32, SInt32, Int32)
- CASE_TYPE(SINT64, SInt64, Int64)
-#undef CASE_TYPE
+ break;
+ CASE_TYPE(INT64, Int64, Int64)
+ CASE_TYPE(UINT64, UInt64, UInt64)
+ CASE_TYPE(INT32, Int32, Int32)
+ CASE_TYPE(FIXED64, Fixed64, UInt64)
+ CASE_TYPE(FIXED32, Fixed32, UInt32)
+ CASE_TYPE(BOOL, Bool, Bool)
+ CASE_TYPE(UINT32, UInt32, UInt32)
+ CASE_TYPE(SFIXED32, SFixed32, Int32)
+ CASE_TYPE(SFIXED64, SFixed64, Int64)
+ CASE_TYPE(SINT32, SInt32, Int32)
+ CASE_TYPE(SINT64, SInt64, Int64)
+#undef CASE_TYPE
case FieldDescriptor::TYPE_STRING:
target = stream->WriteString(1, value.GetStringValue(), target);
break;
- }
+ }
return target;
-}
-
+}
+
static uint8* SerializeMapValueRefWithCachedSizes(
const FieldDescriptor* field, const MapValueConstRef& value, uint8* target,
io::EpsCopyOutputStream* stream) {
target = stream->EnsureSpace(target);
- switch (field->type()) {
+ switch (field->type()) {
#define CASE_TYPE(FieldType, CamelFieldType, CamelCppType) \
case FieldDescriptor::TYPE_##FieldType: \
target = WireFormatLite::Write##CamelFieldType##ToArray( \
2, value.Get##CamelCppType##Value(), target); \
- break;
- CASE_TYPE(INT64, Int64, Int64)
- CASE_TYPE(UINT64, UInt64, UInt64)
- CASE_TYPE(INT32, Int32, Int32)
- CASE_TYPE(FIXED64, Fixed64, UInt64)
- CASE_TYPE(FIXED32, Fixed32, UInt32)
- CASE_TYPE(BOOL, Bool, Bool)
- CASE_TYPE(UINT32, UInt32, UInt32)
- CASE_TYPE(SFIXED32, SFixed32, Int32)
- CASE_TYPE(SFIXED64, SFixed64, Int64)
- CASE_TYPE(SINT32, SInt32, Int32)
- CASE_TYPE(SINT64, SInt64, Int64)
- CASE_TYPE(ENUM, Enum, Enum)
- CASE_TYPE(DOUBLE, Double, Double)
- CASE_TYPE(FLOAT, Float, Float)
-#undef CASE_TYPE
+ break;
+ CASE_TYPE(INT64, Int64, Int64)
+ CASE_TYPE(UINT64, UInt64, UInt64)
+ CASE_TYPE(INT32, Int32, Int32)
+ CASE_TYPE(FIXED64, Fixed64, UInt64)
+ CASE_TYPE(FIXED32, Fixed32, UInt32)
+ CASE_TYPE(BOOL, Bool, Bool)
+ CASE_TYPE(UINT32, UInt32, UInt32)
+ CASE_TYPE(SFIXED32, SFixed32, Int32)
+ CASE_TYPE(SFIXED64, SFixed64, Int64)
+ CASE_TYPE(SINT32, SInt32, Int32)
+ CASE_TYPE(SINT64, SInt64, Int64)
+ CASE_TYPE(ENUM, Enum, Enum)
+ CASE_TYPE(DOUBLE, Double, Double)
+ CASE_TYPE(FLOAT, Float, Float)
+#undef CASE_TYPE
case FieldDescriptor::TYPE_STRING:
case FieldDescriptor::TYPE_BYTES:
target = stream->WriteString(2, value.GetStringValue(), target);
@@ -1133,64 +1133,64 @@ static uint8* SerializeMapValueRefWithCachedSizes(
target = WireFormatLite::InternalWriteGroup(2, value.GetMessageValue(),
target, stream);
break;
- }
+ }
return target;
-}
-
-class MapKeySorter {
- public:
- static std::vector<MapKey> SortKey(const Message& message,
- const Reflection* reflection,
- const FieldDescriptor* field) {
- std::vector<MapKey> sorted_key_list;
- for (MapIterator it =
- reflection->MapBegin(const_cast<Message*>(&message), field);
- it != reflection->MapEnd(const_cast<Message*>(&message), field);
- ++it) {
- sorted_key_list.push_back(it.GetKey());
- }
- MapKeyComparator comparator;
- std::sort(sorted_key_list.begin(), sorted_key_list.end(), comparator);
- return sorted_key_list;
- }
-
- private:
- class MapKeyComparator {
- public:
- bool operator()(const MapKey& a, const MapKey& b) const {
- GOOGLE_DCHECK(a.type() == b.type());
- switch (a.type()) {
-#define CASE_TYPE(CppType, CamelCppType) \
- case FieldDescriptor::CPPTYPE_##CppType: { \
- return a.Get##CamelCppType##Value() < b.Get##CamelCppType##Value(); \
- }
- CASE_TYPE(STRING, String)
- CASE_TYPE(INT64, Int64)
- CASE_TYPE(INT32, Int32)
- CASE_TYPE(UINT64, UInt64)
- CASE_TYPE(UINT32, UInt32)
- CASE_TYPE(BOOL, Bool)
-#undef CASE_TYPE
-
- default:
- GOOGLE_LOG(DFATAL) << "Invalid key for map field.";
- return true;
- }
- }
- };
-};
-
+}
+
+class MapKeySorter {
+ public:
+ static std::vector<MapKey> SortKey(const Message& message,
+ const Reflection* reflection,
+ const FieldDescriptor* field) {
+ std::vector<MapKey> sorted_key_list;
+ for (MapIterator it =
+ reflection->MapBegin(const_cast<Message*>(&message), field);
+ it != reflection->MapEnd(const_cast<Message*>(&message), field);
+ ++it) {
+ sorted_key_list.push_back(it.GetKey());
+ }
+ MapKeyComparator comparator;
+ std::sort(sorted_key_list.begin(), sorted_key_list.end(), comparator);
+ return sorted_key_list;
+ }
+
+ private:
+ class MapKeyComparator {
+ public:
+ bool operator()(const MapKey& a, const MapKey& b) const {
+ GOOGLE_DCHECK(a.type() == b.type());
+ switch (a.type()) {
+#define CASE_TYPE(CppType, CamelCppType) \
+ case FieldDescriptor::CPPTYPE_##CppType: { \
+ return a.Get##CamelCppType##Value() < b.Get##CamelCppType##Value(); \
+ }
+ CASE_TYPE(STRING, String)
+ CASE_TYPE(INT64, Int64)
+ CASE_TYPE(INT32, Int32)
+ CASE_TYPE(UINT64, UInt64)
+ CASE_TYPE(UINT32, UInt32)
+ CASE_TYPE(BOOL, Bool)
+#undef CASE_TYPE
+
+ default:
+ GOOGLE_LOG(DFATAL) << "Invalid key for map field.";
+ return true;
+ }
+ }
+ };
+};
+
static uint8* InternalSerializeMapEntry(const FieldDescriptor* field,
const MapKey& key,
const MapValueConstRef& value,
uint8* target,
io::EpsCopyOutputStream* stream) {
- const FieldDescriptor* key_field = field->message_type()->field(0);
- const FieldDescriptor* value_field = field->message_type()->field(1);
-
- size_t size = kMapEntryTagByteSize;
- size += MapKeyDataOnlyByteSize(key_field, key);
- size += MapValueRefDataOnlyByteSize(value_field, value);
+ const FieldDescriptor* key_field = field->message_type()->field(0);
+ const FieldDescriptor* value_field = field->message_type()->field(1);
+
+ size_t size = kMapEntryTagByteSize;
+ size += MapKeyDataOnlyByteSize(key_field, key);
+ size += MapValueRefDataOnlyByteSize(value_field, value);
target = stream->EnsureSpace(target);
target = WireFormatLite::WriteTagToArray(
field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target);
@@ -1199,8 +1199,8 @@ static uint8* InternalSerializeMapEntry(const FieldDescriptor* field,
target =
SerializeMapValueRefWithCachedSizes(value_field, value, target, stream);
return target;
-}
-
+}
+
uint8* WireFormat::InternalSerializeField(const FieldDescriptor* field,
const Message& message, uint8* target,
io::EpsCopyOutputStream* stream) {
@@ -1213,66 +1213,66 @@ uint8* WireFormat::InternalSerializeField(const FieldDescriptor* field,
return InternalSerializeMessageSetItem(field, message, target, stream);
}
- // For map fields, we can use either repeated field reflection or map
- // reflection. Our choice has some subtle effects. If we use repeated field
- // reflection here, then the repeated field representation becomes
- // authoritative for this field: any existing references that came from map
- // reflection remain valid for reading, but mutations to them are lost and
- // will be overwritten next time we call map reflection!
- //
- // So far this mainly affects Python, which keeps long-term references to map
- // values around, and always uses map reflection. See: b/35918691
- //
- // Here we choose to use map reflection API as long as the internal
- // map is valid. In this way, the serialization doesn't change map field's
- // internal state and existing references that came from map reflection remain
- // valid for both reading and writing.
- if (field->is_map()) {
+ // For map fields, we can use either repeated field reflection or map
+ // reflection. Our choice has some subtle effects. If we use repeated field
+ // reflection here, then the repeated field representation becomes
+ // authoritative for this field: any existing references that came from map
+ // reflection remain valid for reading, but mutations to them are lost and
+ // will be overwritten next time we call map reflection!
+ //
+ // So far this mainly affects Python, which keeps long-term references to map
+ // values around, and always uses map reflection. See: b/35918691
+ //
+ // Here we choose to use map reflection API as long as the internal
+ // map is valid. In this way, the serialization doesn't change map field's
+ // internal state and existing references that came from map reflection remain
+ // valid for both reading and writing.
+ if (field->is_map()) {
const MapFieldBase* map_field =
message_reflection->GetMapData(message, field);
- if (map_field->IsMapValid()) {
+ if (map_field->IsMapValid()) {
if (stream->IsSerializationDeterministic()) {
- std::vector<MapKey> sorted_key_list =
- MapKeySorter::SortKey(message, message_reflection, field);
- for (std::vector<MapKey>::iterator it = sorted_key_list.begin();
- it != sorted_key_list.end(); ++it) {
+ std::vector<MapKey> sorted_key_list =
+ MapKeySorter::SortKey(message, message_reflection, field);
+ for (std::vector<MapKey>::iterator it = sorted_key_list.begin();
+ it != sorted_key_list.end(); ++it) {
MapValueConstRef map_value;
message_reflection->LookupMapValue(message, field, *it, &map_value);
target =
InternalSerializeMapEntry(field, *it, map_value, target, stream);
- }
- } else {
- for (MapIterator it = message_reflection->MapBegin(
- const_cast<Message*>(&message), field);
- it !=
- message_reflection->MapEnd(const_cast<Message*>(&message), field);
- ++it) {
+ }
+ } else {
+ for (MapIterator it = message_reflection->MapBegin(
+ const_cast<Message*>(&message), field);
+ it !=
+ message_reflection->MapEnd(const_cast<Message*>(&message), field);
+ ++it) {
target = InternalSerializeMapEntry(field, it.GetKey(),
it.GetValueRef(), target, stream);
- }
- }
-
+ }
+ }
+
return target;
- }
- }
+ }
+ }
int count = 0;
if (field->is_repeated()) {
count = message_reflection->FieldSize(message, field);
- } else if (field->containing_type()->options().map_entry()) {
- // Map entry fields always need to be serialized.
- count = 1;
+ } else if (field->containing_type()->options().map_entry()) {
+ // Map entry fields always need to be serialized.
+ count = 1;
} else if (message_reflection->HasField(message, field)) {
count = 1;
}
- // map_entries is for maps that'll be deterministically serialized.
- std::vector<const Message*> map_entries;
+ // map_entries is for maps that'll be deterministically serialized.
+ std::vector<const Message*> map_entries;
if (count > 1 && field->is_map() && stream->IsSerializationDeterministic()) {
- map_entries =
- DynamicMapSorter::Sort(message, count, message_reflection, field);
- }
-
+ map_entries =
+ DynamicMapSorter::Sort(message, count, message_reflection, field);
+ }
+
if (field->is_packed()) {
if (count == 0) return target;
target = stream->EnsureSpace(target);
@@ -1443,23 +1443,23 @@ uint8* WireFormat::InternalSerializeMessageSetItem(
// ===================================================================
-size_t WireFormat::ByteSize(const Message& message) {
+size_t WireFormat::ByteSize(const Message& message) {
const Descriptor* descriptor = message.GetDescriptor();
const Reflection* message_reflection = message.GetReflection();
- size_t our_size = 0;
+ size_t our_size = 0;
std::vector<const FieldDescriptor*> fields;
-
- // Fields of map entry should always be serialized.
- if (descriptor->options().map_entry()) {
- for (int i = 0; i < descriptor->field_count(); i++) {
- fields.push_back(descriptor->field(i));
- }
- } else {
- message_reflection->ListFields(message, &fields);
- }
-
+
+ // Fields of map entry should always be serialized.
+ if (descriptor->options().map_entry()) {
+ for (int i = 0; i < descriptor->field_count(); i++) {
+ fields.push_back(descriptor->field(i));
+ }
+ } else {
+ message_reflection->ListFields(message, &fields);
+ }
+
for (const FieldDescriptor* field : fields) {
our_size += FieldByteSize(field, message);
}
@@ -1486,7 +1486,7 @@ size_t WireFormat::FieldByteSize(const FieldDescriptor* field,
return MessageSetItemByteSize(field, message);
}
- size_t count = 0;
+ size_t count = 0;
if (field->is_repeated()) {
if (field->is_map()) {
const MapFieldBase* map_field =
@@ -1499,15 +1499,15 @@ size_t WireFormat::FieldByteSize(const FieldDescriptor* field,
} else {
count = FromIntSize(message_reflection->FieldSize(message, field));
}
- } else if (field->containing_type()->options().map_entry()) {
- // Map entry fields always need to be serialized.
- count = 1;
+ } else if (field->containing_type()->options().map_entry()) {
+ // Map entry fields always need to be serialized.
+ count = 1;
} else if (message_reflection->HasField(message, field)) {
count = 1;
}
- const size_t data_size = FieldDataOnlyByteSize(field, message);
- size_t our_size = data_size;
+ const size_t data_size = FieldDataOnlyByteSize(field, message);
+ size_t our_size = data_size;
if (field->is_packed()) {
if (data_size > 0) {
// Packed fields get serialized like a string, not their native type.
@@ -1524,117 +1524,117 @@ size_t WireFormat::FieldByteSize(const FieldDescriptor* field,
size_t MapKeyDataOnlyByteSize(const FieldDescriptor* field,
const MapKey& value) {
- GOOGLE_DCHECK_EQ(FieldDescriptor::TypeToCppType(field->type()), value.type());
- switch (field->type()) {
- case FieldDescriptor::TYPE_DOUBLE:
- case FieldDescriptor::TYPE_FLOAT:
- case FieldDescriptor::TYPE_GROUP:
- case FieldDescriptor::TYPE_MESSAGE:
- case FieldDescriptor::TYPE_BYTES:
- case FieldDescriptor::TYPE_ENUM:
- GOOGLE_LOG(FATAL) << "Unsupported";
- return 0;
-#define CASE_TYPE(FieldType, CamelFieldType, CamelCppType) \
- case FieldDescriptor::TYPE_##FieldType: \
- return WireFormatLite::CamelFieldType##Size( \
- value.Get##CamelCppType##Value());
-
-#define FIXED_CASE_TYPE(FieldType, CamelFieldType) \
- case FieldDescriptor::TYPE_##FieldType: \
- return WireFormatLite::k##CamelFieldType##Size;
-
- CASE_TYPE(INT32, Int32, Int32);
- CASE_TYPE(INT64, Int64, Int64);
- CASE_TYPE(UINT32, UInt32, UInt32);
- CASE_TYPE(UINT64, UInt64, UInt64);
- CASE_TYPE(SINT32, SInt32, Int32);
- CASE_TYPE(SINT64, SInt64, Int64);
- CASE_TYPE(STRING, String, String);
- FIXED_CASE_TYPE(FIXED32, Fixed32);
- FIXED_CASE_TYPE(FIXED64, Fixed64);
- FIXED_CASE_TYPE(SFIXED32, SFixed32);
- FIXED_CASE_TYPE(SFIXED64, SFixed64);
- FIXED_CASE_TYPE(BOOL, Bool);
-
-#undef CASE_TYPE
-#undef FIXED_CASE_TYPE
- }
- GOOGLE_LOG(FATAL) << "Cannot get here";
- return 0;
-}
-
-static size_t MapValueRefDataOnlyByteSize(const FieldDescriptor* field,
+ GOOGLE_DCHECK_EQ(FieldDescriptor::TypeToCppType(field->type()), value.type());
+ switch (field->type()) {
+ case FieldDescriptor::TYPE_DOUBLE:
+ case FieldDescriptor::TYPE_FLOAT:
+ case FieldDescriptor::TYPE_GROUP:
+ case FieldDescriptor::TYPE_MESSAGE:
+ case FieldDescriptor::TYPE_BYTES:
+ case FieldDescriptor::TYPE_ENUM:
+ GOOGLE_LOG(FATAL) << "Unsupported";
+ return 0;
+#define CASE_TYPE(FieldType, CamelFieldType, CamelCppType) \
+ case FieldDescriptor::TYPE_##FieldType: \
+ return WireFormatLite::CamelFieldType##Size( \
+ value.Get##CamelCppType##Value());
+
+#define FIXED_CASE_TYPE(FieldType, CamelFieldType) \
+ case FieldDescriptor::TYPE_##FieldType: \
+ return WireFormatLite::k##CamelFieldType##Size;
+
+ CASE_TYPE(INT32, Int32, Int32);
+ CASE_TYPE(INT64, Int64, Int64);
+ CASE_TYPE(UINT32, UInt32, UInt32);
+ CASE_TYPE(UINT64, UInt64, UInt64);
+ CASE_TYPE(SINT32, SInt32, Int32);
+ CASE_TYPE(SINT64, SInt64, Int64);
+ CASE_TYPE(STRING, String, String);
+ FIXED_CASE_TYPE(FIXED32, Fixed32);
+ FIXED_CASE_TYPE(FIXED64, Fixed64);
+ FIXED_CASE_TYPE(SFIXED32, SFixed32);
+ FIXED_CASE_TYPE(SFIXED64, SFixed64);
+ FIXED_CASE_TYPE(BOOL, Bool);
+
+#undef CASE_TYPE
+#undef FIXED_CASE_TYPE
+ }
+ GOOGLE_LOG(FATAL) << "Cannot get here";
+ return 0;
+}
+
+static size_t MapValueRefDataOnlyByteSize(const FieldDescriptor* field,
const MapValueConstRef& value) {
- switch (field->type()) {
- case FieldDescriptor::TYPE_GROUP:
- GOOGLE_LOG(FATAL) << "Unsupported";
- return 0;
-#define CASE_TYPE(FieldType, CamelFieldType, CamelCppType) \
- case FieldDescriptor::TYPE_##FieldType: \
- return WireFormatLite::CamelFieldType##Size( \
- value.Get##CamelCppType##Value());
-
-#define FIXED_CASE_TYPE(FieldType, CamelFieldType) \
- case FieldDescriptor::TYPE_##FieldType: \
- return WireFormatLite::k##CamelFieldType##Size;
-
- CASE_TYPE(INT32, Int32, Int32);
- CASE_TYPE(INT64, Int64, Int64);
- CASE_TYPE(UINT32, UInt32, UInt32);
- CASE_TYPE(UINT64, UInt64, UInt64);
- CASE_TYPE(SINT32, SInt32, Int32);
- CASE_TYPE(SINT64, SInt64, Int64);
- CASE_TYPE(STRING, String, String);
- CASE_TYPE(BYTES, Bytes, String);
- CASE_TYPE(ENUM, Enum, Enum);
- CASE_TYPE(MESSAGE, Message, Message);
- FIXED_CASE_TYPE(FIXED32, Fixed32);
- FIXED_CASE_TYPE(FIXED64, Fixed64);
- FIXED_CASE_TYPE(SFIXED32, SFixed32);
- FIXED_CASE_TYPE(SFIXED64, SFixed64);
- FIXED_CASE_TYPE(DOUBLE, Double);
- FIXED_CASE_TYPE(FLOAT, Float);
- FIXED_CASE_TYPE(BOOL, Bool);
-
-#undef CASE_TYPE
-#undef FIXED_CASE_TYPE
- }
- GOOGLE_LOG(FATAL) << "Cannot get here";
- return 0;
-}
-
+ switch (field->type()) {
+ case FieldDescriptor::TYPE_GROUP:
+ GOOGLE_LOG(FATAL) << "Unsupported";
+ return 0;
+#define CASE_TYPE(FieldType, CamelFieldType, CamelCppType) \
+ case FieldDescriptor::TYPE_##FieldType: \
+ return WireFormatLite::CamelFieldType##Size( \
+ value.Get##CamelCppType##Value());
+
+#define FIXED_CASE_TYPE(FieldType, CamelFieldType) \
+ case FieldDescriptor::TYPE_##FieldType: \
+ return WireFormatLite::k##CamelFieldType##Size;
+
+ CASE_TYPE(INT32, Int32, Int32);
+ CASE_TYPE(INT64, Int64, Int64);
+ CASE_TYPE(UINT32, UInt32, UInt32);
+ CASE_TYPE(UINT64, UInt64, UInt64);
+ CASE_TYPE(SINT32, SInt32, Int32);
+ CASE_TYPE(SINT64, SInt64, Int64);
+ CASE_TYPE(STRING, String, String);
+ CASE_TYPE(BYTES, Bytes, String);
+ CASE_TYPE(ENUM, Enum, Enum);
+ CASE_TYPE(MESSAGE, Message, Message);
+ FIXED_CASE_TYPE(FIXED32, Fixed32);
+ FIXED_CASE_TYPE(FIXED64, Fixed64);
+ FIXED_CASE_TYPE(SFIXED32, SFixed32);
+ FIXED_CASE_TYPE(SFIXED64, SFixed64);
+ FIXED_CASE_TYPE(DOUBLE, Double);
+ FIXED_CASE_TYPE(FLOAT, Float);
+ FIXED_CASE_TYPE(BOOL, Bool);
+
+#undef CASE_TYPE
+#undef FIXED_CASE_TYPE
+ }
+ GOOGLE_LOG(FATAL) << "Cannot get here";
+ return 0;
+}
+
size_t WireFormat::FieldDataOnlyByteSize(const FieldDescriptor* field,
const Message& message) {
const Reflection* message_reflection = message.GetReflection();
- size_t data_size = 0;
-
- if (field->is_map()) {
+ size_t data_size = 0;
+
+ if (field->is_map()) {
const MapFieldBase* map_field =
message_reflection->GetMapData(message, field);
- if (map_field->IsMapValid()) {
- MapIterator iter(const_cast<Message*>(&message), field);
- MapIterator end(const_cast<Message*>(&message), field);
- const FieldDescriptor* key_field = field->message_type()->field(0);
- const FieldDescriptor* value_field = field->message_type()->field(1);
- for (map_field->MapBegin(&iter), map_field->MapEnd(&end); iter != end;
- ++iter) {
- size_t size = kMapEntryTagByteSize;
- size += MapKeyDataOnlyByteSize(key_field, iter.GetKey());
- size += MapValueRefDataOnlyByteSize(value_field, iter.GetValueRef());
- data_size += WireFormatLite::LengthDelimitedSize(size);
- }
- return data_size;
- }
- }
-
- size_t count = 0;
+ if (map_field->IsMapValid()) {
+ MapIterator iter(const_cast<Message*>(&message), field);
+ MapIterator end(const_cast<Message*>(&message), field);
+ const FieldDescriptor* key_field = field->message_type()->field(0);
+ const FieldDescriptor* value_field = field->message_type()->field(1);
+ for (map_field->MapBegin(&iter), map_field->MapEnd(&end); iter != end;
+ ++iter) {
+ size_t size = kMapEntryTagByteSize;
+ size += MapKeyDataOnlyByteSize(key_field, iter.GetKey());
+ size += MapValueRefDataOnlyByteSize(value_field, iter.GetValueRef());
+ data_size += WireFormatLite::LengthDelimitedSize(size);
+ }
+ return data_size;
+ }
+ }
+
+ size_t count = 0;
if (field->is_repeated()) {
- count =
- internal::FromIntSize(message_reflection->FieldSize(message, field));
- } else if (field->containing_type()->options().map_entry()) {
- // Map entry fields always need to be serialized.
- count = 1;
+ count =
+ internal::FromIntSize(message_reflection->FieldSize(message, field));
+ } else if (field->containing_type()->options().map_entry()) {
+ // Map entry fields always need to be serialized.
+ count = 1;
} else if (message_reflection->HasField(message, field)) {
count = 1;
}
@@ -1718,14 +1718,14 @@ size_t WireFormat::MessageSetItemByteSize(const FieldDescriptor* field,
const Message& message) {
const Reflection* message_reflection = message.GetReflection();
- size_t our_size = WireFormatLite::kMessageSetItemTagsSize;
+ size_t our_size = WireFormatLite::kMessageSetItemTagsSize;
// type_id
our_size += io::CodedOutputStream::VarintSize32(field->number());
// message
const Message& sub_message = message_reflection->GetMessage(message, field);
- size_t message_size = sub_message.ByteSizeLong();
+ size_t message_size = sub_message.ByteSizeLong();
our_size += io::CodedOutputStream::VarintSize32(message_size);
our_size += message_size;
diff --git a/contrib/libs/protobuf/src/google/protobuf/wire_format.h b/contrib/libs/protobuf/src/google/protobuf/wire_format.h
index 04bd4a83a4..d4ffbdfd7b 100644
--- a/contrib/libs/protobuf/src/google/protobuf/wire_format.h
+++ b/contrib/libs/protobuf/src/google/protobuf/wire_format.h
@@ -89,7 +89,7 @@ class PROTOBUF_EXPORT WireFormat {
// Compute the byte size of a tag. For groups, this includes both the start
// and end tags.
- static inline size_t TagSize(int field_number, FieldDescriptor::Type type);
+ static inline size_t TagSize(int field_number, FieldDescriptor::Type type);
// These procedures can be used to implement the methods of Message which
// handle parsing and serialization of the protocol buffer wire format
@@ -140,7 +140,7 @@ class PROTOBUF_EXPORT WireFormat {
// will have their ByteSize() methods called, so their sizes will be cached.
// Therefore, calling this method is sufficient to allow you to call
// WireFormat::SerializeWithCachedSizes() on the same object.
- static size_t ByteSize(const Message& message);
+ static size_t ByteSize(const Message& message);
// -----------------------------------------------------------------
// Helpers for dealing with unknown fields
@@ -207,11 +207,11 @@ class PROTOBUF_EXPORT WireFormat {
io::EpsCopyOutputStream* stream);
// Compute the size of the UnknownFieldSet on the wire.
- static size_t ComputeUnknownFieldsSize(const UnknownFieldSet& unknown_fields);
+ static size_t ComputeUnknownFieldsSize(const UnknownFieldSet& unknown_fields);
// Same thing except for messages that have the message_set_wire_format
// option.
- static size_t ComputeUnknownMessageSetItemsSize(
+ static size_t ComputeUnknownMessageSetItemsSize(
const UnknownFieldSet& unknown_fields);
// Helper functions for encoding and decoding tags. (Inlined below and in
@@ -265,7 +265,7 @@ class PROTOBUF_EXPORT WireFormat {
// only includes the size of the raw data, and not the size of the total
// length, but for other length-delimited types, the size of the length is
// included.
- static size_t FieldDataOnlyByteSize(
+ static size_t FieldDataOnlyByteSize(
const FieldDescriptor* field, // Cannot be NULL
const Message& message);
@@ -344,8 +344,8 @@ inline uint32 WireFormat::MakeTag(const FieldDescriptor* field) {
return WireFormatLite::MakeTag(field->number(), WireTypeForField(field));
}
-inline size_t WireFormat::TagSize(int field_number,
- FieldDescriptor::Type type) {
+inline size_t WireFormat::TagSize(int field_number,
+ FieldDescriptor::Type type) {
// Some compilers don't like enum -> enum casts, so we implicit_cast to
// int first.
return WireFormatLite::TagSize(
@@ -363,7 +363,7 @@ inline void WireFormat::VerifyUTF8String(const char* data, int size,
(void)data;
(void)size;
(void)op;
-#endif
+#endif
}
inline void WireFormat::VerifyUTF8StringNamedField(const char* data, int size,
diff --git a/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.cc b/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.cc
index 32a3792288..ed82bdd48e 100644
--- a/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.cc
@@ -45,10 +45,10 @@
#include <google/protobuf/io/zero_copy_stream.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
-
+
#include <google/protobuf/port_def.inc>
-namespace google {
+namespace google {
namespace protobuf {
namespace internal {
@@ -63,7 +63,7 @@ const int WireFormatLite::kMessageSetMessageTag;
#endif
// IBM xlC requires prefixing constants with WireFormatLite::
-const size_t WireFormatLite::kMessageSetItemTagsSize =
+const size_t WireFormatLite::kMessageSetItemTagsSize =
io::CodedOutputStream::StaticVarintSize32<
WireFormatLite::kMessageSetItemStartTag>::value +
io::CodedOutputStream::StaticVarintSize32<
@@ -121,8 +121,8 @@ const WireFormatLite::WireType
};
bool WireFormatLite::SkipField(io::CodedInputStream* input, uint32 tag) {
- // Field number 0 is illegal.
- if (WireFormatLite::GetTagFieldNumber(tag) == 0) return false;
+ // Field number 0 is illegal.
+ if (WireFormatLite::GetTagFieldNumber(tag) == 0) return false;
switch (WireFormatLite::GetTagWireType(tag)) {
case WireFormatLite::WIRETYPE_VARINT: {
uint64 value;
@@ -168,8 +168,8 @@ bool WireFormatLite::SkipField(io::CodedInputStream* input, uint32 tag) {
bool WireFormatLite::SkipField(io::CodedInputStream* input, uint32 tag,
io::CodedOutputStream* output) {
- // Field number 0 is illegal.
- if (WireFormatLite::GetTagFieldNumber(tag) == 0) return false;
+ // Field number 0 is illegal.
+ if (WireFormatLite::GetTagFieldNumber(tag) == 0) return false;
switch (WireFormatLite::GetTagWireType(tag)) {
case WireFormatLite::WIRETYPE_VARINT: {
uint64 value;
@@ -316,94 +316,94 @@ bool WireFormatLite::ReadPackedEnumPreserveUnknowns(
return true;
}
-#if !defined(PROTOBUF_LITTLE_ENDIAN)
-
-namespace {
-void EncodeFixedSizeValue(float v, uint8* dest) {
- WireFormatLite::WriteFloatNoTagToArray(v, dest);
-}
-
-void EncodeFixedSizeValue(double v, uint8* dest) {
- WireFormatLite::WriteDoubleNoTagToArray(v, dest);
-}
-
-void EncodeFixedSizeValue(uint32 v, uint8* dest) {
- WireFormatLite::WriteFixed32NoTagToArray(v, dest);
-}
-
-void EncodeFixedSizeValue(uint64 v, uint8* dest) {
- WireFormatLite::WriteFixed64NoTagToArray(v, dest);
-}
-
-void EncodeFixedSizeValue(int32 v, uint8* dest) {
- WireFormatLite::WriteSFixed32NoTagToArray(v, dest);
-}
-
-void EncodeFixedSizeValue(int64 v, uint8* dest) {
- WireFormatLite::WriteSFixed64NoTagToArray(v, dest);
-}
-
-void EncodeFixedSizeValue(bool v, uint8* dest) {
- WireFormatLite::WriteBoolNoTagToArray(v, dest);
-}
-} // anonymous namespace
-
-#endif // !defined(PROTOBUF_LITTLE_ENDIAN)
-
-template <typename CType>
-static void WriteArray(const CType* a, int n, io::CodedOutputStream* output) {
-#if defined(PROTOBUF_LITTLE_ENDIAN)
- output->WriteRaw(reinterpret_cast<const char*>(a), n * sizeof(a[0]));
-#else
- const int kAtATime = 128;
- uint8 buf[sizeof(CType) * kAtATime];
- for (int i = 0; i < n; i += kAtATime) {
- int to_do = std::min(kAtATime, n - i);
- uint8* ptr = buf;
- for (int j = 0; j < to_do; j++) {
+#if !defined(PROTOBUF_LITTLE_ENDIAN)
+
+namespace {
+void EncodeFixedSizeValue(float v, uint8* dest) {
+ WireFormatLite::WriteFloatNoTagToArray(v, dest);
+}
+
+void EncodeFixedSizeValue(double v, uint8* dest) {
+ WireFormatLite::WriteDoubleNoTagToArray(v, dest);
+}
+
+void EncodeFixedSizeValue(uint32 v, uint8* dest) {
+ WireFormatLite::WriteFixed32NoTagToArray(v, dest);
+}
+
+void EncodeFixedSizeValue(uint64 v, uint8* dest) {
+ WireFormatLite::WriteFixed64NoTagToArray(v, dest);
+}
+
+void EncodeFixedSizeValue(int32 v, uint8* dest) {
+ WireFormatLite::WriteSFixed32NoTagToArray(v, dest);
+}
+
+void EncodeFixedSizeValue(int64 v, uint8* dest) {
+ WireFormatLite::WriteSFixed64NoTagToArray(v, dest);
+}
+
+void EncodeFixedSizeValue(bool v, uint8* dest) {
+ WireFormatLite::WriteBoolNoTagToArray(v, dest);
+}
+} // anonymous namespace
+
+#endif // !defined(PROTOBUF_LITTLE_ENDIAN)
+
+template <typename CType>
+static void WriteArray(const CType* a, int n, io::CodedOutputStream* output) {
+#if defined(PROTOBUF_LITTLE_ENDIAN)
+ output->WriteRaw(reinterpret_cast<const char*>(a), n * sizeof(a[0]));
+#else
+ const int kAtATime = 128;
+ uint8 buf[sizeof(CType) * kAtATime];
+ for (int i = 0; i < n; i += kAtATime) {
+ int to_do = std::min(kAtATime, n - i);
+ uint8* ptr = buf;
+ for (int j = 0; j < to_do; j++) {
EncodeFixedSizeValue(a[i + j], ptr);
- ptr += sizeof(a[0]);
- }
- output->WriteRaw(buf, to_do * sizeof(a[0]));
- }
-#endif
-}
-
-void WireFormatLite::WriteFloatArray(const float* a, int n,
- io::CodedOutputStream* output) {
- WriteArray<float>(a, n, output);
-}
-
-void WireFormatLite::WriteDoubleArray(const double* a, int n,
+ ptr += sizeof(a[0]);
+ }
+ output->WriteRaw(buf, to_do * sizeof(a[0]));
+ }
+#endif
+}
+
+void WireFormatLite::WriteFloatArray(const float* a, int n,
+ io::CodedOutputStream* output) {
+ WriteArray<float>(a, n, output);
+}
+
+void WireFormatLite::WriteDoubleArray(const double* a, int n,
io::CodedOutputStream* output) {
- WriteArray<double>(a, n, output);
-}
-
-void WireFormatLite::WriteFixed32Array(const uint32* a, int n,
+ WriteArray<double>(a, n, output);
+}
+
+void WireFormatLite::WriteFixed32Array(const uint32* a, int n,
io::CodedOutputStream* output) {
- WriteArray<uint32>(a, n, output);
-}
-
-void WireFormatLite::WriteFixed64Array(const uint64* a, int n,
- io::CodedOutputStream* output) {
- WriteArray<uint64>(a, n, output);
-}
-
-void WireFormatLite::WriteSFixed32Array(const int32* a, int n,
+ WriteArray<uint32>(a, n, output);
+}
+
+void WireFormatLite::WriteFixed64Array(const uint64* a, int n,
+ io::CodedOutputStream* output) {
+ WriteArray<uint64>(a, n, output);
+}
+
+void WireFormatLite::WriteSFixed32Array(const int32* a, int n,
io::CodedOutputStream* output) {
- WriteArray<int32>(a, n, output);
-}
-
-void WireFormatLite::WriteSFixed64Array(const int64* a, int n,
+ WriteArray<int32>(a, n, output);
+}
+
+void WireFormatLite::WriteSFixed64Array(const int64* a, int n,
io::CodedOutputStream* output) {
- WriteArray<int64>(a, n, output);
-}
-
-void WireFormatLite::WriteBoolArray(const bool* a, int n,
- io::CodedOutputStream* output) {
- WriteArray<bool>(a, n, output);
-}
-
+ WriteArray<int64>(a, n, output);
+}
+
+void WireFormatLite::WriteBoolArray(const bool* a, int n,
+ io::CodedOutputStream* output) {
+ WriteArray<bool>(a, n, output);
+}
+
void WireFormatLite::WriteInt32(int field_number, int32 value,
io::CodedOutputStream* output) {
WriteTag(field_number, WIRETYPE_VARINT, output);
@@ -604,11 +604,11 @@ bool WireFormatLite::VerifyUtf8String(const char* data, int size, Operation op,
template <bool ZigZag, bool SignExtended, typename T>
static size_t VarintSize(const T* data, const int n) {
static_assert(sizeof(T) == 4, "This routine only works for 32 bit integers");
- // is_unsigned<T> => !ZigZag
+ // is_unsigned<T> => !ZigZag
static_assert(
(std::is_unsigned<T>::value ^ ZigZag) || std::is_signed<T>::value,
"Cannot ZigZag encode unsigned types");
- // is_unsigned<T> => !SignExtended
+ // is_unsigned<T> => !SignExtended
static_assert(
(std::is_unsigned<T>::value ^ SignExtended) || std::is_signed<T>::value,
"Cannot SignExtended unsigned types");
@@ -618,11 +618,11 @@ static size_t VarintSize(const T* data, const int n) {
uint32 msb_sum = 0;
for (int i = 0; i < n; i++) {
uint32 x = data[i];
- if (ZigZag) {
+ if (ZigZag) {
x = WireFormatLite::ZigZagEncode32(x);
} else if (SignExtended) {
msb_sum += x >> 31;
- }
+ }
// clang is so smart that it produces optimal SSE sequence unrolling
// the loop 8 ints at a time. With a sequence of 4
// cmpres = cmpgt x, sizeclass ( -1 or 0)
@@ -631,11 +631,11 @@ static size_t VarintSize(const T* data, const int n) {
if (x > 0x3FFF) sum++;
if (x > 0x1FFFFF) sum++;
if (x > 0xFFFFFFF) sum++;
- }
+ }
if (SignExtended) sum += msb_sum * 5;
return sum;
}
-
+
template <bool ZigZag, typename T>
static size_t VarintSize64(const T* data, const int n) {
static_assert(sizeof(T) == 8, "This routine only works for 64 bit integers");
@@ -645,9 +645,9 @@ static size_t VarintSize64(const T* data, const int n) {
uint64 sum = n;
for (int i = 0; i < n; i++) {
uint64 x = data[i];
- if (ZigZag) {
+ if (ZigZag) {
x = WireFormatLite::ZigZagEncode64(x);
- }
+ }
// First step is a binary search, we can't branch in sse so we use the
// result of the compare to adjust sum and appropriately. This code is
// written to make clang recognize the vectorization.
@@ -658,72 +658,72 @@ static size_t VarintSize64(const T* data, const int n) {
if (x > 0x3FFF) sum++;
if (x > 0x1FFFFF) sum++;
if (x > 0xFFFFFFF) sum++;
- }
+ }
return sum;
-}
-
+}
+
// GCC does not recognize the vectorization opportunity
// and other platforms are untested, in those cases using the optimized
// varint size routine for each element is faster.
// Hence we enable it only for clang
#if defined(__SSE__) && defined(__clang__)
-size_t WireFormatLite::Int32Size(const RepeatedField<int32>& value) {
+size_t WireFormatLite::Int32Size(const RepeatedField<int32>& value) {
return VarintSize<false, true>(value.data(), value.size());
-}
-
-size_t WireFormatLite::UInt32Size(const RepeatedField<uint32>& value) {
+}
+
+size_t WireFormatLite::UInt32Size(const RepeatedField<uint32>& value) {
return VarintSize<false, false>(value.data(), value.size());
-}
-
-size_t WireFormatLite::SInt32Size(const RepeatedField<int32>& value) {
+}
+
+size_t WireFormatLite::SInt32Size(const RepeatedField<int32>& value) {
return VarintSize<true, false>(value.data(), value.size());
-}
-
-size_t WireFormatLite::EnumSize(const RepeatedField<int>& value) {
- // On ILP64, sizeof(int) == 8, which would require a different template.
+}
+
+size_t WireFormatLite::EnumSize(const RepeatedField<int>& value) {
+ // On ILP64, sizeof(int) == 8, which would require a different template.
return VarintSize<false, true>(value.data(), value.size());
-}
-
+}
+
#else // !(defined(__SSE4_1__) && defined(__clang__))
-size_t WireFormatLite::Int32Size(const RepeatedField<int32>& value) {
- size_t out = 0;
- const int n = value.size();
- for (int i = 0; i < n; i++) {
- out += Int32Size(value.Get(i));
- }
- return out;
-}
-
-size_t WireFormatLite::UInt32Size(const RepeatedField<uint32>& value) {
- size_t out = 0;
- const int n = value.size();
- for (int i = 0; i < n; i++) {
- out += UInt32Size(value.Get(i));
- }
- return out;
-}
-
-size_t WireFormatLite::SInt32Size(const RepeatedField<int32>& value) {
- size_t out = 0;
- const int n = value.size();
- for (int i = 0; i < n; i++) {
- out += SInt32Size(value.Get(i));
- }
- return out;
-}
-
-size_t WireFormatLite::EnumSize(const RepeatedField<int>& value) {
- size_t out = 0;
- const int n = value.size();
- for (int i = 0; i < n; i++) {
- out += EnumSize(value.Get(i));
- }
- return out;
-}
-
-#endif
-
+size_t WireFormatLite::Int32Size(const RepeatedField<int32>& value) {
+ size_t out = 0;
+ const int n = value.size();
+ for (int i = 0; i < n; i++) {
+ out += Int32Size(value.Get(i));
+ }
+ return out;
+}
+
+size_t WireFormatLite::UInt32Size(const RepeatedField<uint32>& value) {
+ size_t out = 0;
+ const int n = value.size();
+ for (int i = 0; i < n; i++) {
+ out += UInt32Size(value.Get(i));
+ }
+ return out;
+}
+
+size_t WireFormatLite::SInt32Size(const RepeatedField<int32>& value) {
+ size_t out = 0;
+ const int n = value.size();
+ for (int i = 0; i < n; i++) {
+ out += SInt32Size(value.Get(i));
+ }
+ return out;
+}
+
+size_t WireFormatLite::EnumSize(const RepeatedField<int>& value) {
+ size_t out = 0;
+ const int n = value.size();
+ for (int i = 0; i < n; i++) {
+ out += EnumSize(value.Get(i));
+ }
+ return out;
+}
+
+#endif
+
// Micro benchmarks show that the SSE improved loop only starts beating
// the normal loop on Haswell platforms and then only for >32 ints. We
// disable this for now. Some specialized users might find it worthwhile to
diff --git a/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.h b/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.h
index 284fe23917..041dafad44 100644
--- a/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.h
+++ b/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.h
@@ -52,16 +52,16 @@
#include <google/protobuf/stubs/casts.h>
-// Avoid conflict with iOS where <ConditionalMacros.h> #defines TYPE_BOOL.
-//
+// Avoid conflict with iOS where <ConditionalMacros.h> #defines TYPE_BOOL.
+//
// If some one needs the macro TYPE_BOOL in a file that includes this header,
// it's possible to bring it back using push/pop_macro as follows.
-//
-// #pragma push_macro("TYPE_BOOL")
-// #include this header and/or all headers that need the macro to be undefined.
-// #pragma pop_macro("TYPE_BOOL")
-#undef TYPE_BOOL
-
+//
+// #pragma push_macro("TYPE_BOOL")
+// #include this header and/or all headers that need the macro to be undefined.
+// #pragma pop_macro("TYPE_BOOL")
+#undef TYPE_BOOL
+
#include <google/protobuf/port_def.inc>
namespace google {
@@ -166,8 +166,8 @@ class PROTOBUF_EXPORT WireFormatLite {
// Compute the byte size of a tag. For groups, this includes both the start
// and end tags.
- static inline size_t TagSize(int field_number,
- WireFormatLite::FieldType type);
+ static inline size_t TagSize(int field_number,
+ WireFormatLite::FieldType type);
// Skips a field value with the given tag. The input should start
// positioned immediately after the tag. Skipped values are simply
@@ -218,7 +218,7 @@ class PROTOBUF_EXPORT WireFormatLite {
kMessageSetMessageNumber, WireFormatLite::WIRETYPE_LENGTH_DELIMITED);
// Byte size of all tags of a MessageSet::Item combined.
- static const size_t kMessageSetItemTagsSize;
+ static const size_t kMessageSetItemTagsSize;
// Helper functions for converting between floats/doubles and IEEE-754
// uint32s/uint64s so that they can be written. (Assumes your platform
@@ -248,14 +248,14 @@ class PROTOBUF_EXPORT WireFormatLite {
// For primitive fields, we just use a templatized routine parameterized by
// the represented type and the FieldType. These are specialized with the
// appropriate definition for each declared type.
- template <typename CType, enum FieldType DeclaredType>
+ template <typename CType, enum FieldType DeclaredType>
PROTOBUF_NDEBUG_INLINE static bool ReadPrimitive(io::CodedInputStream* input,
CType* value);
// Reads repeated primitive values, with optimizations for repeats.
// tag_size and tag should both be compile-time constants provided by the
// protocol compiler.
- template <typename CType, enum FieldType DeclaredType>
+ template <typename CType, enum FieldType DeclaredType>
PROTOBUF_NDEBUG_INLINE static bool ReadRepeatedPrimitive(
int tag_size, uint32 tag, io::CodedInputStream* input,
RepeatedField<CType>* value);
@@ -263,8 +263,8 @@ class PROTOBUF_EXPORT WireFormatLite {
// Identical to ReadRepeatedPrimitive, except will not inline the
// implementation.
template <typename CType, enum FieldType DeclaredType>
- static bool ReadRepeatedPrimitiveNoInline(int tag_size, uint32 tag,
- io::CodedInputStream* input,
+ static bool ReadRepeatedPrimitiveNoInline(int tag_size, uint32 tag,
+ io::CodedInputStream* input,
RepeatedField<CType>* value);
// Reads a primitive value directly from the provided buffer. It returns a
@@ -279,27 +279,27 @@ class PROTOBUF_EXPORT WireFormatLite {
// Reads a primitive packed field.
//
// This is only implemented for packable types.
- template <typename CType, enum FieldType DeclaredType>
+ template <typename CType, enum FieldType DeclaredType>
PROTOBUF_NDEBUG_INLINE static bool ReadPackedPrimitive(
io::CodedInputStream* input, RepeatedField<CType>* value);
// Identical to ReadPackedPrimitive, except will not inline the
// implementation.
template <typename CType, enum FieldType DeclaredType>
- static bool ReadPackedPrimitiveNoInline(io::CodedInputStream* input,
- RepeatedField<CType>* value);
+ static bool ReadPackedPrimitiveNoInline(io::CodedInputStream* input,
+ RepeatedField<CType>* value);
// Read a packed enum field. If the is_valid function is not NULL, values for
// which is_valid(value) returns false are silently dropped.
- static bool ReadPackedEnumNoInline(io::CodedInputStream* input,
+ static bool ReadPackedEnumNoInline(io::CodedInputStream* input,
bool (*is_valid)(int),
RepeatedField<int>* values);
// Read a packed enum field. If the is_valid function is not NULL, values for
// which is_valid(value) returns false are appended to unknown_fields_stream.
static bool ReadPackedEnumPreserveUnknowns(
- io::CodedInputStream* input, int field_number, bool (*is_valid)(int),
- io::CodedOutputStream* unknown_fields_stream, RepeatedField<int>* values);
+ io::CodedInputStream* input, int field_number, bool (*is_valid)(int),
+ io::CodedOutputStream* unknown_fields_stream, RepeatedField<int>* values);
// Read a string. ReadString(..., TProtoStringType* value) requires an
// existing TProtoStringType.
@@ -308,8 +308,8 @@ class PROTOBUF_EXPORT WireFormatLite {
// ReadString(..., TProtoStringType** p) is internal-only, and should only be
// called from generated code. It starts by setting *p to "new TProtoStringType" if
// *p == &GetEmptyStringAlreadyInited(). It then invokes
- // ReadString(io::CodedInputStream* input, *p). This is useful for reducing
- // code size.
+ // ReadString(io::CodedInputStream* input, *p). This is useful for reducing
+ // code size.
static inline bool ReadString(io::CodedInputStream* input, TProtoStringType** p);
// Analogous to ReadString().
static bool ReadBytes(io::CodedInputStream* input, TProtoStringType* value);
@@ -325,15 +325,15 @@ class PROTOBUF_EXPORT WireFormatLite {
const char* field_name);
template <typename MessageType>
- static inline bool ReadGroup(int field_number, io::CodedInputStream* input,
+ static inline bool ReadGroup(int field_number, io::CodedInputStream* input,
MessageType* value);
template <typename MessageType>
- static inline bool ReadMessage(io::CodedInputStream* input,
+ static inline bool ReadMessage(io::CodedInputStream* input,
MessageType* value);
- template <typename MessageType>
- static inline bool ReadMessageNoVirtual(io::CodedInputStream* input,
+ template <typename MessageType>
+ static inline bool ReadMessageNoVirtual(io::CodedInputStream* input,
MessageType* value) {
return ReadMessage(input, value);
}
@@ -374,85 +374,85 @@ class PROTOBUF_EXPORT WireFormatLite {
PROTOBUF_NDEBUG_INLINE static void WriteEnumNoTag(
int value, io::CodedOutputStream* output);
- // Write array of primitive fields, without tags
- static void WriteFloatArray(const float* a, int n,
- io::CodedOutputStream* output);
- static void WriteDoubleArray(const double* a, int n,
- io::CodedOutputStream* output);
- static void WriteFixed32Array(const uint32* a, int n,
- io::CodedOutputStream* output);
- static void WriteFixed64Array(const uint64* a, int n,
- io::CodedOutputStream* output);
- static void WriteSFixed32Array(const int32* a, int n,
- io::CodedOutputStream* output);
- static void WriteSFixed64Array(const int64* a, int n,
- io::CodedOutputStream* output);
- static void WriteBoolArray(const bool* a, int n,
- io::CodedOutputStream* output);
-
+ // Write array of primitive fields, without tags
+ static void WriteFloatArray(const float* a, int n,
+ io::CodedOutputStream* output);
+ static void WriteDoubleArray(const double* a, int n,
+ io::CodedOutputStream* output);
+ static void WriteFixed32Array(const uint32* a, int n,
+ io::CodedOutputStream* output);
+ static void WriteFixed64Array(const uint64* a, int n,
+ io::CodedOutputStream* output);
+ static void WriteSFixed32Array(const int32* a, int n,
+ io::CodedOutputStream* output);
+ static void WriteSFixed64Array(const int64* a, int n,
+ io::CodedOutputStream* output);
+ static void WriteBoolArray(const bool* a, int n,
+ io::CodedOutputStream* output);
+
// Write fields, including tags.
- static void WriteInt32(int field_number, int32 value,
- io::CodedOutputStream* output);
- static void WriteInt64(int field_number, int64 value,
- io::CodedOutputStream* output);
- static void WriteUInt32(int field_number, uint32 value,
- io::CodedOutputStream* output);
- static void WriteUInt64(int field_number, uint64 value,
- io::CodedOutputStream* output);
- static void WriteSInt32(int field_number, int32 value,
- io::CodedOutputStream* output);
- static void WriteSInt64(int field_number, int64 value,
- io::CodedOutputStream* output);
- static void WriteFixed32(int field_number, uint32 value,
- io::CodedOutputStream* output);
- static void WriteFixed64(int field_number, uint64 value,
- io::CodedOutputStream* output);
- static void WriteSFixed32(int field_number, int32 value,
- io::CodedOutputStream* output);
- static void WriteSFixed64(int field_number, int64 value,
- io::CodedOutputStream* output);
- static void WriteFloat(int field_number, float value,
- io::CodedOutputStream* output);
- static void WriteDouble(int field_number, double value,
- io::CodedOutputStream* output);
- static void WriteBool(int field_number, bool value,
- io::CodedOutputStream* output);
- static void WriteEnum(int field_number, int value,
- io::CodedOutputStream* output);
+ static void WriteInt32(int field_number, int32 value,
+ io::CodedOutputStream* output);
+ static void WriteInt64(int field_number, int64 value,
+ io::CodedOutputStream* output);
+ static void WriteUInt32(int field_number, uint32 value,
+ io::CodedOutputStream* output);
+ static void WriteUInt64(int field_number, uint64 value,
+ io::CodedOutputStream* output);
+ static void WriteSInt32(int field_number, int32 value,
+ io::CodedOutputStream* output);
+ static void WriteSInt64(int field_number, int64 value,
+ io::CodedOutputStream* output);
+ static void WriteFixed32(int field_number, uint32 value,
+ io::CodedOutputStream* output);
+ static void WriteFixed64(int field_number, uint64 value,
+ io::CodedOutputStream* output);
+ static void WriteSFixed32(int field_number, int32 value,
+ io::CodedOutputStream* output);
+ static void WriteSFixed64(int field_number, int64 value,
+ io::CodedOutputStream* output);
+ static void WriteFloat(int field_number, float value,
+ io::CodedOutputStream* output);
+ static void WriteDouble(int field_number, double value,
+ io::CodedOutputStream* output);
+ static void WriteBool(int field_number, bool value,
+ io::CodedOutputStream* output);
+ static void WriteEnum(int field_number, int value,
+ io::CodedOutputStream* output);
static void WriteString(int field_number, const TProtoStringType& value,
- io::CodedOutputStream* output);
+ io::CodedOutputStream* output);
static void WriteBytes(int field_number, const TProtoStringType& value,
- io::CodedOutputStream* output);
+ io::CodedOutputStream* output);
static void WriteStringMaybeAliased(int field_number,
const TProtoStringType& value,
- io::CodedOutputStream* output);
+ io::CodedOutputStream* output);
static void WriteBytesMaybeAliased(int field_number, const TProtoStringType& value,
- io::CodedOutputStream* output);
+ io::CodedOutputStream* output);
- static void WriteGroup(int field_number, const MessageLite& value,
- io::CodedOutputStream* output);
- static void WriteMessage(int field_number, const MessageLite& value,
- io::CodedOutputStream* output);
+ static void WriteGroup(int field_number, const MessageLite& value,
+ io::CodedOutputStream* output);
+ static void WriteMessage(int field_number, const MessageLite& value,
+ io::CodedOutputStream* output);
// Like above, but these will check if the output stream has enough
// space to write directly to a flat array.
- static void WriteGroupMaybeToArray(int field_number, const MessageLite& value,
- io::CodedOutputStream* output);
- static void WriteMessageMaybeToArray(int field_number,
- const MessageLite& value,
- io::CodedOutputStream* output);
+ static void WriteGroupMaybeToArray(int field_number, const MessageLite& value,
+ io::CodedOutputStream* output);
+ static void WriteMessageMaybeToArray(int field_number,
+ const MessageLite& value,
+ io::CodedOutputStream* output);
// Like above, but de-virtualize the call to SerializeWithCachedSizes(). The
// pointer must point at an instance of MessageType, *not* a subclass (or
// the subclass must not override SerializeWithCachedSizes()).
- template <typename MessageType>
- static inline void WriteGroupNoVirtual(int field_number,
- const MessageType& value,
- io::CodedOutputStream* output);
- template <typename MessageType>
- static inline void WriteMessageNoVirtual(int field_number,
- const MessageType& value,
- io::CodedOutputStream* output);
+ template <typename MessageType>
+ static inline void WriteGroupNoVirtual(int field_number,
+ const MessageType& value,
+ io::CodedOutputStream* output);
+ template <typename MessageType>
+ static inline void WriteMessageNoVirtual(int field_number,
+ const MessageType& value,
+ io::CodedOutputStream* output);
// Like above, but use only *ToArray methods of CodedOutputStream.
PROTOBUF_NDEBUG_INLINE static uint8* WriteTagToArray(int field_number,
@@ -489,7 +489,7 @@ class PROTOBUF_EXPORT WireFormatLite {
PROTOBUF_NDEBUG_INLINE static uint8* WriteEnumNoTagToArray(int value,
uint8* target);
- // Write fields, without tags. These require that value.size() > 0.
+ // Write fields, without tags. These require that value.size() > 0.
template <typename T>
PROTOBUF_NDEBUG_INLINE static uint8* WritePrimitiveNoTagToArray(
const RepeatedField<T>& value, uint8* (*Writer)(T, uint8*),
@@ -498,23 +498,23 @@ class PROTOBUF_EXPORT WireFormatLite {
PROTOBUF_NDEBUG_INLINE static uint8* WriteFixedNoTagToArray(
const RepeatedField<T>& value, uint8* (*Writer)(T, uint8*),
uint8* target);
-
+
PROTOBUF_NDEBUG_INLINE static uint8* WriteInt32NoTagToArray(
const RepeatedField<int32>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteInt64NoTagToArray(
const RepeatedField<int64>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteUInt32NoTagToArray(
- const RepeatedField<uint32>& value, uint8* output);
+ const RepeatedField<uint32>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteUInt64NoTagToArray(
- const RepeatedField<uint64>& value, uint8* output);
+ const RepeatedField<uint64>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteSInt32NoTagToArray(
const RepeatedField<int32>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteSInt64NoTagToArray(
const RepeatedField<int64>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteFixed32NoTagToArray(
- const RepeatedField<uint32>& value, uint8* output);
+ const RepeatedField<uint32>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteFixed64NoTagToArray(
- const RepeatedField<uint64>& value, uint8* output);
+ const RepeatedField<uint64>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteSFixed32NoTagToArray(
const RepeatedField<int32>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteSFixed64NoTagToArray(
@@ -522,12 +522,12 @@ class PROTOBUF_EXPORT WireFormatLite {
PROTOBUF_NDEBUG_INLINE static uint8* WriteFloatNoTagToArray(
const RepeatedField<float>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteDoubleNoTagToArray(
- const RepeatedField<double>& value, uint8* output);
+ const RepeatedField<double>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteBoolNoTagToArray(
const RepeatedField<bool>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteEnumNoTagToArray(
const RepeatedField<int>& value, uint8* output);
-
+
// Write fields, including tags.
PROTOBUF_NDEBUG_INLINE static uint8* WriteInt32ToArray(int field_number,
int32 value,
@@ -575,24 +575,24 @@ class PROTOBUF_EXPORT WireFormatLite {
template <typename T>
PROTOBUF_NDEBUG_INLINE static uint8* WritePrimitiveToArray(
int field_number, const RepeatedField<T>& value,
- uint8* (*Writer)(int, T, uint8*), uint8* target);
+ uint8* (*Writer)(int, T, uint8*), uint8* target);
PROTOBUF_NDEBUG_INLINE static uint8* WriteInt32ToArray(
int field_number, const RepeatedField<int32>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteInt64ToArray(
int field_number, const RepeatedField<int64>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteUInt32ToArray(
- int field_number, const RepeatedField<uint32>& value, uint8* output);
+ int field_number, const RepeatedField<uint32>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteUInt64ToArray(
- int field_number, const RepeatedField<uint64>& value, uint8* output);
+ int field_number, const RepeatedField<uint64>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteSInt32ToArray(
int field_number, const RepeatedField<int32>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteSInt64ToArray(
int field_number, const RepeatedField<int64>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteFixed32ToArray(
- int field_number, const RepeatedField<uint32>& value, uint8* output);
+ int field_number, const RepeatedField<uint32>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteFixed64ToArray(
- int field_number, const RepeatedField<uint64>& value, uint8* output);
+ int field_number, const RepeatedField<uint64>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteSFixed32ToArray(
int field_number, const RepeatedField<int32>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteSFixed64ToArray(
@@ -600,17 +600,17 @@ class PROTOBUF_EXPORT WireFormatLite {
PROTOBUF_NDEBUG_INLINE static uint8* WriteFloatToArray(
int field_number, const RepeatedField<float>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteDoubleToArray(
- int field_number, const RepeatedField<double>& value, uint8* output);
+ int field_number, const RepeatedField<double>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteBoolToArray(
int field_number, const RepeatedField<bool>& value, uint8* output);
PROTOBUF_NDEBUG_INLINE static uint8* WriteEnumToArray(
int field_number, const RepeatedField<int>& value, uint8* output);
-
+
PROTOBUF_NDEBUG_INLINE static uint8* WriteStringToArray(
int field_number, const TProtoStringType& value, uint8* target);
PROTOBUF_NDEBUG_INLINE static uint8* WriteBytesToArray(
int field_number, const TProtoStringType& value, uint8* target);
-
+
// Whether to serialize deterministically (e.g., map keys are
// sorted) is a property of a CodedOutputStream, and in the process
// of serialization, the "ToArray" variants may be invoked. But they don't
@@ -628,10 +628,10 @@ class PROTOBUF_EXPORT WireFormatLite {
// Like above, but de-virtualize the call to SerializeWithCachedSizes(). The
// pointer must point at an instance of MessageType, *not* a subclass (or
// the subclass must not override SerializeWithCachedSizes()).
- template <typename MessageType>
+ template <typename MessageType>
PROTOBUF_NDEBUG_INLINE static uint8* InternalWriteGroupNoVirtualToArray(
int field_number, const MessageType& value, uint8* target);
- template <typename MessageType>
+ template <typename MessageType>
PROTOBUF_NDEBUG_INLINE static uint8* InternalWriteMessageNoVirtualToArray(
int field_number, const MessageType& value, uint8* target);
@@ -678,7 +678,7 @@ class PROTOBUF_EXPORT WireFormatLite {
static size_t SInt32Size(const RepeatedField<int32>& value);
static size_t SInt64Size(const RepeatedField<int64>& value);
static size_t EnumSize(const RepeatedField<int>& value);
-
+
// These types always have the same size.
static constexpr size_t kFixed32Size = 4;
static constexpr size_t kFixed64Size = 8;
@@ -702,11 +702,11 @@ class PROTOBUF_EXPORT WireFormatLite {
template <typename MessageType>
static inline size_t GroupSizeNoVirtual(const MessageType& value);
template <typename MessageType>
- static inline size_t MessageSizeNoVirtual(const MessageType& value);
+ static inline size_t MessageSizeNoVirtual(const MessageType& value);
// Given the length of data, calculate the byte size of the data on the
// wire if we encode the data as a length delimited field.
- static inline size_t LengthDelimitedSize(size_t length);
+ static inline size_t LengthDelimitedSize(size_t length);
private:
// A helper method for the repeated primitive reader. This method has
@@ -718,7 +718,7 @@ class PROTOBUF_EXPORT WireFormatLite {
RepeatedField<CType>* value);
// Like ReadRepeatedFixedSizePrimitive but for packed primitive fields.
- template <typename CType, enum FieldType DeclaredType>
+ template <typename CType, enum FieldType DeclaredType>
PROTOBUF_NDEBUG_INLINE static bool ReadPackedFixedSizePrimitive(
io::CodedInputStream* input, RepeatedField<CType>* value);
@@ -789,9 +789,9 @@ inline int WireFormatLite::GetTagFieldNumber(uint32 tag) {
return static_cast<int>(tag >> kTagTypeBits);
}
-inline size_t WireFormatLite::TagSize(int field_number,
- WireFormatLite::FieldType type) {
- size_t result = io::CodedOutputStream::VarintSize32(
+inline size_t WireFormatLite::TagSize(int field_number,
+ WireFormatLite::FieldType type) {
+ size_t result = io::CodedOutputStream::VarintSize32(
static_cast<uint32>(field_number << kTagTypeBits));
if (type == TYPE_GROUP) {
// Groups have both a start and an end tag.
@@ -843,8 +843,8 @@ inline double WireFormatLite::DecodeDouble(uint64 value) {
inline uint32 WireFormatLite::ZigZagEncode32(int32 n) {
// Note: the right-shift must be arithmetic
- // Note: left shift must be unsigned because of overflow
- return (static_cast<uint32>(n) << 1) ^ static_cast<uint32>(n >> 31);
+ // Note: left shift must be unsigned because of overflow
+ return (static_cast<uint32>(n) << 1) ^ static_cast<uint32>(n >> 31);
}
inline int32 WireFormatLite::ZigZagDecode32(uint32 n) {
@@ -854,8 +854,8 @@ inline int32 WireFormatLite::ZigZagDecode32(uint32 n) {
inline uint64 WireFormatLite::ZigZagEncode64(int64 n) {
// Note: the right-shift must be arithmetic
- // Note: left shift must be unsigned because of overflow
- return (static_cast<uint64>(n) << 1) ^ static_cast<uint64>(n >> 63);
+ // Note: left shift must be unsigned because of overflow
+ return (static_cast<uint64>(n) << 1) ^ static_cast<uint64>(n >> 63);
}
inline int64 WireFormatLite::ZigZagDecode64(uint64 n) {
diff --git a/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.cc b/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.cc
index 91d2c6e320..128ddfc409 100644
--- a/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.cc
@@ -27,7 +27,7 @@ struct DoubleValueDefaultTypeInternal {
union {
DoubleValue _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DoubleValueDefaultTypeInternal _DoubleValue_default_instance_;
constexpr FloatValue::FloatValue(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
@@ -39,7 +39,7 @@ struct FloatValueDefaultTypeInternal {
union {
FloatValue _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FloatValueDefaultTypeInternal _FloatValue_default_instance_;
constexpr Int64Value::Int64Value(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
@@ -51,7 +51,7 @@ struct Int64ValueDefaultTypeInternal {
union {
Int64Value _instance;
};
-};
+};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Int64ValueDefaultTypeInternal _Int64Value_default_instance_;
constexpr UInt64Value::UInt64Value(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
@@ -129,63 +129,63 @@ PROTOBUF_NAMESPACE_CLOSE
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fwrappers_2eproto[9];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fwrappers_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fwrappers_2eproto = nullptr;
-
+
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fwrappers_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DoubleValue, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DoubleValue, value_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FloatValue, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FloatValue, value_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Int64Value, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Int64Value, value_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UInt64Value, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UInt64Value, value_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Int32Value, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Int32Value, value_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UInt32Value, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UInt32Value, value_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::BoolValue, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::BoolValue, value_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::StringValue, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::StringValue, value_),
- ~0u, // no _has_bits_
+ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::BytesValue, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::BytesValue, value_),
-};
+};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::DoubleValue)},
{ 6, -1, sizeof(PROTOBUF_NAMESPACE_ID::FloatValue)},
@@ -196,7 +196,7 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB
{ 36, -1, sizeof(PROTOBUF_NAMESPACE_ID::BoolValue)},
{ 42, -1, sizeof(PROTOBUF_NAMESPACE_ID::StringValue)},
{ 48, -1, sizeof(PROTOBUF_NAMESPACE_ID::BytesValue)},
-};
+};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_DoubleValue_default_instance_),
@@ -208,8 +208,8 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] =
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_BoolValue_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_StringValue_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_BytesValue_default_instance_),
-};
-
+};
+
const char descriptor_table_protodef_google_2fprotobuf_2fwrappers_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\036google/protobuf/wrappers.proto\022\017google"
".protobuf\"\034\n\013DoubleValue\022\r\n\005value\030\001 \001(\001\""
@@ -233,8 +233,8 @@ const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_google_2fprotobuf_2fwrappers_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2fwrappers_2eproto;
-}
-
+}
+
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fwrappers_2eproto(&descriptor_table_google_2fprotobuf_2fwrappers_2eproto);
PROTOBUF_NAMESPACE_OPEN
@@ -257,7 +257,7 @@ DoubleValue::DoubleValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
DoubleValue::DoubleValue(const DoubleValue& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_ = from.value_;
+ value_ = from.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.DoubleValue)
}
@@ -289,9 +289,9 @@ void DoubleValue::SetCachedSize(int size) const {
void DoubleValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.DoubleValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
value_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -302,7 +302,7 @@ const char* DoubleValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // double value = 1;
+ // double value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 9)) {
value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
@@ -336,9 +336,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DoubleValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // double value = 1;
+ (void) cached_has_bits;
+
+ // double value = 1;
if (!(this->_internal_value() <= 0 && this->_internal_value() >= 0)) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(1, this->_internal_value(), target);
@@ -347,20 +347,20 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DoubleValue)
return target;
}
-size_t DoubleValue::ByteSizeLong() const {
+size_t DoubleValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.DoubleValue)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // double value = 1;
+ // double value = 1;
if (!(this->_internal_value() <= 0 && this->_internal_value() >= 0)) {
total_size += 1 + 8;
}
@@ -389,10 +389,10 @@ void DoubleValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void DoubleValue::MergeFrom(const DoubleValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DoubleValue)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (!(from._internal_value() <= 0 && from._internal_value() >= 0)) {
_internal_set_value(from._internal_value());
}
@@ -403,7 +403,7 @@ void DoubleValue::CopyFrom(const DoubleValue& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.DoubleValue)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool DoubleValue::IsInitialized() const {
@@ -411,9 +411,9 @@ bool DoubleValue::IsInitialized() const {
}
void DoubleValue::InternalSwap(DoubleValue* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(value_, other->value_);
+ swap(value_, other->value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata DoubleValue::GetMetadata() const {
@@ -440,7 +440,7 @@ FloatValue::FloatValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
FloatValue::FloatValue(const FloatValue& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_ = from.value_;
+ value_ = from.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.FloatValue)
}
@@ -472,9 +472,9 @@ void FloatValue::SetCachedSize(int size) const {
void FloatValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FloatValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
value_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -485,7 +485,7 @@ const char* FloatValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // float value = 1;
+ // float value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) {
value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
@@ -519,9 +519,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FloatValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // float value = 1;
+ (void) cached_has_bits;
+
+ // float value = 1;
if (!(this->_internal_value() <= 0 && this->_internal_value() >= 0)) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_value(), target);
@@ -530,20 +530,20 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FloatValue)
return target;
}
-size_t FloatValue::ByteSizeLong() const {
+size_t FloatValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FloatValue)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // float value = 1;
+ // float value = 1;
if (!(this->_internal_value() <= 0 && this->_internal_value() >= 0)) {
total_size += 1 + 4;
}
@@ -572,10 +572,10 @@ void FloatValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void FloatValue::MergeFrom(const FloatValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FloatValue)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (!(from._internal_value() <= 0 && from._internal_value() >= 0)) {
_internal_set_value(from._internal_value());
}
@@ -586,7 +586,7 @@ void FloatValue::CopyFrom(const FloatValue& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FloatValue)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool FloatValue::IsInitialized() const {
@@ -594,9 +594,9 @@ bool FloatValue::IsInitialized() const {
}
void FloatValue::InternalSwap(FloatValue* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(value_, other->value_);
+ swap(value_, other->value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata FloatValue::GetMetadata() const {
@@ -623,7 +623,7 @@ Int64Value::Int64Value(::PROTOBUF_NAMESPACE_ID::Arena* arena,
Int64Value::Int64Value(const Int64Value& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_ = from.value_;
+ value_ = from.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.Int64Value)
}
@@ -655,9 +655,9 @@ void Int64Value::SetCachedSize(int size) const {
void Int64Value::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Int64Value)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
value_ = int64_t{0};
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -668,7 +668,7 @@ const char* Int64Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // int64 value = 1;
+ // int64 value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -702,9 +702,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Int64Value)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // int64 value = 1;
+ (void) cached_has_bits;
+
+ // int64 value = 1;
if (this->_internal_value() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_value(), target);
@@ -713,20 +713,20 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Int64Value)
return target;
}
-size_t Int64Value::ByteSizeLong() const {
+size_t Int64Value::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Int64Value)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // int64 value = 1;
+ // int64 value = 1;
if (this->_internal_value() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
@@ -757,10 +757,10 @@ void Int64Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Int64Value::MergeFrom(const Int64Value& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Int64Value)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (from._internal_value() != 0) {
_internal_set_value(from._internal_value());
}
@@ -771,7 +771,7 @@ void Int64Value::CopyFrom(const Int64Value& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Int64Value)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Int64Value::IsInitialized() const {
@@ -779,9 +779,9 @@ bool Int64Value::IsInitialized() const {
}
void Int64Value::InternalSwap(Int64Value* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(value_, other->value_);
+ swap(value_, other->value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Int64Value::GetMetadata() const {
@@ -808,7 +808,7 @@ UInt64Value::UInt64Value(::PROTOBUF_NAMESPACE_ID::Arena* arena,
UInt64Value::UInt64Value(const UInt64Value& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_ = from.value_;
+ value_ = from.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.UInt64Value)
}
@@ -840,9 +840,9 @@ void UInt64Value::SetCachedSize(int size) const {
void UInt64Value::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.UInt64Value)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
value_ = uint64_t{0u};
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -853,7 +853,7 @@ const char* UInt64Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // uint64 value = 1;
+ // uint64 value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -887,9 +887,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UInt64Value)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // uint64 value = 1;
+ (void) cached_has_bits;
+
+ // uint64 value = 1;
if (this->_internal_value() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->_internal_value(), target);
@@ -898,20 +898,20 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UInt64Value)
return target;
}
-size_t UInt64Value::ByteSizeLong() const {
+size_t UInt64Value::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.UInt64Value)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // uint64 value = 1;
+ // uint64 value = 1;
if (this->_internal_value() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
@@ -942,10 +942,10 @@ void UInt64Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void UInt64Value::MergeFrom(const UInt64Value& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UInt64Value)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (from._internal_value() != 0) {
_internal_set_value(from._internal_value());
}
@@ -956,7 +956,7 @@ void UInt64Value::CopyFrom(const UInt64Value& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.UInt64Value)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool UInt64Value::IsInitialized() const {
@@ -964,9 +964,9 @@ bool UInt64Value::IsInitialized() const {
}
void UInt64Value::InternalSwap(UInt64Value* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(value_, other->value_);
+ swap(value_, other->value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata UInt64Value::GetMetadata() const {
@@ -993,7 +993,7 @@ Int32Value::Int32Value(::PROTOBUF_NAMESPACE_ID::Arena* arena,
Int32Value::Int32Value(const Int32Value& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_ = from.value_;
+ value_ = from.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.Int32Value)
}
@@ -1025,9 +1025,9 @@ void Int32Value::SetCachedSize(int size) const {
void Int32Value::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Int32Value)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
value_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1038,7 +1038,7 @@ const char* Int32Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // int32 value = 1;
+ // int32 value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -1072,9 +1072,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Int32Value)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // int32 value = 1;
+ (void) cached_has_bits;
+
+ // int32 value = 1;
if (this->_internal_value() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_value(), target);
@@ -1083,20 +1083,20 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Int32Value)
return target;
}
-size_t Int32Value::ByteSizeLong() const {
+size_t Int32Value::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Int32Value)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // int32 value = 1;
+ // int32 value = 1;
if (this->_internal_value() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
@@ -1127,10 +1127,10 @@ void Int32Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void Int32Value::MergeFrom(const Int32Value& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Int32Value)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (from._internal_value() != 0) {
_internal_set_value(from._internal_value());
}
@@ -1141,7 +1141,7 @@ void Int32Value::CopyFrom(const Int32Value& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Int32Value)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool Int32Value::IsInitialized() const {
@@ -1149,9 +1149,9 @@ bool Int32Value::IsInitialized() const {
}
void Int32Value::InternalSwap(Int32Value* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(value_, other->value_);
+ swap(value_, other->value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Int32Value::GetMetadata() const {
@@ -1178,7 +1178,7 @@ UInt32Value::UInt32Value(::PROTOBUF_NAMESPACE_ID::Arena* arena,
UInt32Value::UInt32Value(const UInt32Value& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_ = from.value_;
+ value_ = from.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.UInt32Value)
}
@@ -1210,9 +1210,9 @@ void UInt32Value::SetCachedSize(int size) const {
void UInt32Value::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.UInt32Value)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
value_ = 0u;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1223,7 +1223,7 @@ const char* UInt32Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // uint32 value = 1;
+ // uint32 value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
@@ -1257,9 +1257,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UInt32Value)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // uint32 value = 1;
+ (void) cached_has_bits;
+
+ // uint32 value = 1;
if (this->_internal_value() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_value(), target);
@@ -1268,20 +1268,20 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UInt32Value)
return target;
}
-size_t UInt32Value::ByteSizeLong() const {
+size_t UInt32Value::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.UInt32Value)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // uint32 value = 1;
+ // uint32 value = 1;
if (this->_internal_value() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
@@ -1312,10 +1312,10 @@ void UInt32Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void UInt32Value::MergeFrom(const UInt32Value& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UInt32Value)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (from._internal_value() != 0) {
_internal_set_value(from._internal_value());
}
@@ -1326,7 +1326,7 @@ void UInt32Value::CopyFrom(const UInt32Value& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.UInt32Value)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool UInt32Value::IsInitialized() const {
@@ -1334,9 +1334,9 @@ bool UInt32Value::IsInitialized() const {
}
void UInt32Value::InternalSwap(UInt32Value* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(value_, other->value_);
+ swap(value_, other->value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata UInt32Value::GetMetadata() const {
@@ -1363,7 +1363,7 @@ BoolValue::BoolValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
BoolValue::BoolValue(const BoolValue& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_ = from.value_;
+ value_ = from.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.BoolValue)
}
@@ -1395,9 +1395,9 @@ void BoolValue::SetCachedSize(int size) const {
void BoolValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.BoolValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
value_ = false;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1408,7 +1408,7 @@ const char* BoolValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // bool value = 1;
+ // bool value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -1442,9 +1442,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.BoolValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // bool value = 1;
+ (void) cached_has_bits;
+
+ // bool value = 1;
if (this->_internal_value() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_value(), target);
@@ -1453,20 +1453,20 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.BoolValue)
return target;
}
-size_t BoolValue::ByteSizeLong() const {
+size_t BoolValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.BoolValue)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // bool value = 1;
+ // bool value = 1;
if (this->_internal_value() != 0) {
total_size += 1 + 1;
}
@@ -1495,10 +1495,10 @@ void BoolValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void BoolValue::MergeFrom(const BoolValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.BoolValue)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (from._internal_value() != 0) {
_internal_set_value(from._internal_value());
}
@@ -1509,7 +1509,7 @@ void BoolValue::CopyFrom(const BoolValue& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.BoolValue)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool BoolValue::IsInitialized() const {
@@ -1517,9 +1517,9 @@ bool BoolValue::IsInitialized() const {
}
void BoolValue::InternalSwap(BoolValue* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(value_, other->value_);
+ swap(value_, other->value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata BoolValue::GetMetadata() const {
@@ -1550,7 +1550,7 @@ StringValue::StringValue(const StringValue& from)
if (!from._internal_value().empty()) {
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_value(),
GetArenaForAllocation());
- }
+ }
// @@protoc_insertion_point(copy_constructor:google.protobuf.StringValue)
}
@@ -1583,9 +1583,9 @@ void StringValue::SetCachedSize(int size) const {
void StringValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.StringValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
value_.ClearToEmpty();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1596,7 +1596,7 @@ const char* StringValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // string value = 1;
+ // string value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
auto str = _internal_mutable_value();
@@ -1632,9 +1632,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.StringValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string value = 1;
+ (void) cached_has_bits;
+
+ // string value = 1;
if (!this->_internal_value().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_value().data(), static_cast<int>(this->_internal_value().length()),
@@ -1647,20 +1647,20 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.StringValue)
return target;
}
-size_t StringValue::ByteSizeLong() const {
+size_t StringValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.StringValue)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // string value = 1;
+ // string value = 1;
if (!this->_internal_value().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
@@ -1691,10 +1691,10 @@ void StringValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void StringValue::MergeFrom(const StringValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.StringValue)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (!from._internal_value().empty()) {
_internal_set_value(from._internal_value());
}
@@ -1705,7 +1705,7 @@ void StringValue::CopyFrom(const StringValue& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.StringValue)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool StringValue::IsInitialized() const {
@@ -1713,7 +1713,7 @@ bool StringValue::IsInitialized() const {
}
void StringValue::InternalSwap(StringValue* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
@@ -1750,7 +1750,7 @@ BytesValue::BytesValue(const BytesValue& from)
if (!from._internal_value().empty()) {
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_value(),
GetArenaForAllocation());
- }
+ }
// @@protoc_insertion_point(copy_constructor:google.protobuf.BytesValue)
}
@@ -1783,9 +1783,9 @@ void BytesValue::SetCachedSize(int size) const {
void BytesValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.BytesValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
value_.ClearToEmpty();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1796,7 +1796,7 @@ const char* BytesValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
- // bytes value = 1;
+ // bytes value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
auto str = _internal_mutable_value();
@@ -1831,9 +1831,9 @@ failure:
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.BytesValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // bytes value = 1;
+ (void) cached_has_bits;
+
+ // bytes value = 1;
if (!this->_internal_value().empty()) {
target = stream->WriteBytesMaybeAliased(
1, this->_internal_value(), target);
@@ -1842,20 +1842,20 @@ failure:
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.BytesValue)
return target;
}
-size_t BytesValue::ByteSizeLong() const {
+size_t BytesValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.BytesValue)
- size_t total_size = 0;
+ size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // bytes value = 1;
+ // bytes value = 1;
if (!this->_internal_value().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
@@ -1886,10 +1886,10 @@ void BytesValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
void BytesValue::MergeFrom(const BytesValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.BytesValue)
- GOOGLE_DCHECK_NE(&from, this);
+ GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
+ (void) cached_has_bits;
+
if (!from._internal_value().empty()) {
_internal_set_value(from._internal_value());
}
@@ -1900,7 +1900,7 @@ void BytesValue::CopyFrom(const BytesValue& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.BytesValue)
if (&from == this) return;
Clear();
- MergeFrom(from);
+ MergeFrom(from);
}
bool BytesValue::IsInitialized() const {
@@ -1908,7 +1908,7 @@ bool BytesValue::IsInitialized() const {
}
void BytesValue::InternalSwap(BytesValue* other) {
- using std::swap;
+ using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
@@ -1937,7 +1937,7 @@ template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Int64Value* Arena::CreateMay
}
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::UInt64Value* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::UInt64Value >(Arena* arena) {
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::UInt64Value >(arena);
-}
+}
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Int32Value* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Int32Value >(Arena* arena) {
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Int32Value >(arena);
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.h b/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.h
index 9894f179dd..81e9349c07 100644
--- a/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.h
@@ -114,19 +114,19 @@ class PROTOBUF_EXPORT DoubleValue final :
CopyFrom(from);
return *this;
}
- inline DoubleValue& operator=(DoubleValue&& from) noexcept {
+ inline DoubleValue& operator=(DoubleValue&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
@@ -136,16 +136,16 @@ class PROTOBUF_EXPORT DoubleValue final :
static const DoubleValue& default_instance() {
return *internal_default_instance();
}
- static inline const DoubleValue* internal_default_instance() {
- return reinterpret_cast<const DoubleValue*>(
- &_DoubleValue_default_instance_);
- }
+ static inline const DoubleValue* internal_default_instance() {
+ return reinterpret_cast<const DoubleValue*>(
+ &_DoubleValue_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 0;
-
- friend void swap(DoubleValue& a, DoubleValue& b) {
- a.Swap(&b);
- }
+ 0;
+
+ friend void swap(DoubleValue& a, DoubleValue& b) {
+ a.Swap(&b);
+ }
inline void Swap(DoubleValue* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -214,7 +214,7 @@ class PROTOBUF_EXPORT DoubleValue final :
enum : int {
kValueFieldNumber = 1,
};
- // double value = 1;
+ // double value = 1;
void clear_value();
double value() const;
void set_value(double value);
@@ -253,19 +253,19 @@ class PROTOBUF_EXPORT FloatValue final :
CopyFrom(from);
return *this;
}
- inline FloatValue& operator=(FloatValue&& from) noexcept {
+ inline FloatValue& operator=(FloatValue&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
@@ -275,16 +275,16 @@ class PROTOBUF_EXPORT FloatValue final :
static const FloatValue& default_instance() {
return *internal_default_instance();
}
- static inline const FloatValue* internal_default_instance() {
- return reinterpret_cast<const FloatValue*>(
- &_FloatValue_default_instance_);
- }
+ static inline const FloatValue* internal_default_instance() {
+ return reinterpret_cast<const FloatValue*>(
+ &_FloatValue_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 1;
-
- friend void swap(FloatValue& a, FloatValue& b) {
- a.Swap(&b);
- }
+ 1;
+
+ friend void swap(FloatValue& a, FloatValue& b) {
+ a.Swap(&b);
+ }
inline void Swap(FloatValue* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -353,7 +353,7 @@ class PROTOBUF_EXPORT FloatValue final :
enum : int {
kValueFieldNumber = 1,
};
- // float value = 1;
+ // float value = 1;
void clear_value();
float value() const;
void set_value(float value);
@@ -392,19 +392,19 @@ class PROTOBUF_EXPORT Int64Value final :
CopyFrom(from);
return *this;
}
- inline Int64Value& operator=(Int64Value&& from) noexcept {
+ inline Int64Value& operator=(Int64Value&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
@@ -414,16 +414,16 @@ class PROTOBUF_EXPORT Int64Value final :
static const Int64Value& default_instance() {
return *internal_default_instance();
}
- static inline const Int64Value* internal_default_instance() {
- return reinterpret_cast<const Int64Value*>(
- &_Int64Value_default_instance_);
- }
+ static inline const Int64Value* internal_default_instance() {
+ return reinterpret_cast<const Int64Value*>(
+ &_Int64Value_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 2;
-
- friend void swap(Int64Value& a, Int64Value& b) {
- a.Swap(&b);
- }
+ 2;
+
+ friend void swap(Int64Value& a, Int64Value& b) {
+ a.Swap(&b);
+ }
inline void Swap(Int64Value* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -492,7 +492,7 @@ class PROTOBUF_EXPORT Int64Value final :
enum : int {
kValueFieldNumber = 1,
};
- // int64 value = 1;
+ // int64 value = 1;
void clear_value();
::PROTOBUF_NAMESPACE_ID::int64 value() const;
void set_value(::PROTOBUF_NAMESPACE_ID::int64 value);
@@ -531,19 +531,19 @@ class PROTOBUF_EXPORT UInt64Value final :
CopyFrom(from);
return *this;
}
- inline UInt64Value& operator=(UInt64Value&& from) noexcept {
+ inline UInt64Value& operator=(UInt64Value&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
@@ -553,16 +553,16 @@ class PROTOBUF_EXPORT UInt64Value final :
static const UInt64Value& default_instance() {
return *internal_default_instance();
}
- static inline const UInt64Value* internal_default_instance() {
- return reinterpret_cast<const UInt64Value*>(
- &_UInt64Value_default_instance_);
- }
+ static inline const UInt64Value* internal_default_instance() {
+ return reinterpret_cast<const UInt64Value*>(
+ &_UInt64Value_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 3;
-
- friend void swap(UInt64Value& a, UInt64Value& b) {
- a.Swap(&b);
- }
+ 3;
+
+ friend void swap(UInt64Value& a, UInt64Value& b) {
+ a.Swap(&b);
+ }
inline void Swap(UInt64Value* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -631,7 +631,7 @@ class PROTOBUF_EXPORT UInt64Value final :
enum : int {
kValueFieldNumber = 1,
};
- // uint64 value = 1;
+ // uint64 value = 1;
void clear_value();
::PROTOBUF_NAMESPACE_ID::uint64 value() const;
void set_value(::PROTOBUF_NAMESPACE_ID::uint64 value);
@@ -670,19 +670,19 @@ class PROTOBUF_EXPORT Int32Value final :
CopyFrom(from);
return *this;
}
- inline Int32Value& operator=(Int32Value&& from) noexcept {
+ inline Int32Value& operator=(Int32Value&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
@@ -692,16 +692,16 @@ class PROTOBUF_EXPORT Int32Value final :
static const Int32Value& default_instance() {
return *internal_default_instance();
}
- static inline const Int32Value* internal_default_instance() {
- return reinterpret_cast<const Int32Value*>(
- &_Int32Value_default_instance_);
- }
+ static inline const Int32Value* internal_default_instance() {
+ return reinterpret_cast<const Int32Value*>(
+ &_Int32Value_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 4;
-
- friend void swap(Int32Value& a, Int32Value& b) {
- a.Swap(&b);
- }
+ 4;
+
+ friend void swap(Int32Value& a, Int32Value& b) {
+ a.Swap(&b);
+ }
inline void Swap(Int32Value* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -770,7 +770,7 @@ class PROTOBUF_EXPORT Int32Value final :
enum : int {
kValueFieldNumber = 1,
};
- // int32 value = 1;
+ // int32 value = 1;
void clear_value();
::PROTOBUF_NAMESPACE_ID::int32 value() const;
void set_value(::PROTOBUF_NAMESPACE_ID::int32 value);
@@ -809,19 +809,19 @@ class PROTOBUF_EXPORT UInt32Value final :
CopyFrom(from);
return *this;
}
- inline UInt32Value& operator=(UInt32Value&& from) noexcept {
+ inline UInt32Value& operator=(UInt32Value&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
@@ -831,16 +831,16 @@ class PROTOBUF_EXPORT UInt32Value final :
static const UInt32Value& default_instance() {
return *internal_default_instance();
}
- static inline const UInt32Value* internal_default_instance() {
- return reinterpret_cast<const UInt32Value*>(
- &_UInt32Value_default_instance_);
- }
+ static inline const UInt32Value* internal_default_instance() {
+ return reinterpret_cast<const UInt32Value*>(
+ &_UInt32Value_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 5;
-
- friend void swap(UInt32Value& a, UInt32Value& b) {
- a.Swap(&b);
- }
+ 5;
+
+ friend void swap(UInt32Value& a, UInt32Value& b) {
+ a.Swap(&b);
+ }
inline void Swap(UInt32Value* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -909,7 +909,7 @@ class PROTOBUF_EXPORT UInt32Value final :
enum : int {
kValueFieldNumber = 1,
};
- // uint32 value = 1;
+ // uint32 value = 1;
void clear_value();
::PROTOBUF_NAMESPACE_ID::uint32 value() const;
void set_value(::PROTOBUF_NAMESPACE_ID::uint32 value);
@@ -948,19 +948,19 @@ class PROTOBUF_EXPORT BoolValue final :
CopyFrom(from);
return *this;
}
- inline BoolValue& operator=(BoolValue&& from) noexcept {
+ inline BoolValue& operator=(BoolValue&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
@@ -970,16 +970,16 @@ class PROTOBUF_EXPORT BoolValue final :
static const BoolValue& default_instance() {
return *internal_default_instance();
}
- static inline const BoolValue* internal_default_instance() {
- return reinterpret_cast<const BoolValue*>(
- &_BoolValue_default_instance_);
- }
+ static inline const BoolValue* internal_default_instance() {
+ return reinterpret_cast<const BoolValue*>(
+ &_BoolValue_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 6;
-
- friend void swap(BoolValue& a, BoolValue& b) {
- a.Swap(&b);
- }
+ 6;
+
+ friend void swap(BoolValue& a, BoolValue& b) {
+ a.Swap(&b);
+ }
inline void Swap(BoolValue* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -1048,7 +1048,7 @@ class PROTOBUF_EXPORT BoolValue final :
enum : int {
kValueFieldNumber = 1,
};
- // bool value = 1;
+ // bool value = 1;
void clear_value();
bool value() const;
void set_value(bool value);
@@ -1087,19 +1087,19 @@ class PROTOBUF_EXPORT StringValue final :
CopyFrom(from);
return *this;
}
- inline StringValue& operator=(StringValue&& from) noexcept {
+ inline StringValue& operator=(StringValue&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
@@ -1109,16 +1109,16 @@ class PROTOBUF_EXPORT StringValue final :
static const StringValue& default_instance() {
return *internal_default_instance();
}
- static inline const StringValue* internal_default_instance() {
- return reinterpret_cast<const StringValue*>(
- &_StringValue_default_instance_);
- }
+ static inline const StringValue* internal_default_instance() {
+ return reinterpret_cast<const StringValue*>(
+ &_StringValue_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 7;
-
- friend void swap(StringValue& a, StringValue& b) {
- a.Swap(&b);
- }
+ 7;
+
+ friend void swap(StringValue& a, StringValue& b) {
+ a.Swap(&b);
+ }
inline void Swap(StringValue* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -1187,7 +1187,7 @@ class PROTOBUF_EXPORT StringValue final :
enum : int {
kValueFieldNumber = 1,
};
- // string value = 1;
+ // string value = 1;
void clear_value();
const TProtoStringType& value() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -1231,19 +1231,19 @@ class PROTOBUF_EXPORT BytesValue final :
CopyFrom(from);
return *this;
}
- inline BytesValue& operator=(BytesValue&& from) noexcept {
+ inline BytesValue& operator=(BytesValue&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
- }
+ }
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
@@ -1253,16 +1253,16 @@ class PROTOBUF_EXPORT BytesValue final :
static const BytesValue& default_instance() {
return *internal_default_instance();
}
- static inline const BytesValue* internal_default_instance() {
- return reinterpret_cast<const BytesValue*>(
- &_BytesValue_default_instance_);
- }
+ static inline const BytesValue* internal_default_instance() {
+ return reinterpret_cast<const BytesValue*>(
+ &_BytesValue_default_instance_);
+ }
static constexpr int kIndexInFileMessages =
- 8;
-
- friend void swap(BytesValue& a, BytesValue& b) {
- a.Swap(&b);
- }
+ 8;
+
+ friend void swap(BytesValue& a, BytesValue& b) {
+ a.Swap(&b);
+ }
inline void Swap(BytesValue* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
@@ -1331,7 +1331,7 @@ class PROTOBUF_EXPORT BytesValue final :
enum : int {
kValueFieldNumber = 1,
};
- // bytes value = 1;
+ // bytes value = 1;
void clear_value();
const TProtoStringType& value() const;
template <typename ArgT0 = const TProtoStringType&, typename... ArgT>
@@ -1361,13 +1361,13 @@ class PROTOBUF_EXPORT BytesValue final :
// ===================================================================
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
// DoubleValue
-// double value = 1;
+// double value = 1;
inline void DoubleValue::clear_value() {
value_ = 0;
}
@@ -1391,7 +1391,7 @@ inline void DoubleValue::set_value(double value) {
// FloatValue
-// float value = 1;
+// float value = 1;
inline void FloatValue::clear_value() {
value_ = 0;
}
@@ -1415,7 +1415,7 @@ inline void FloatValue::set_value(float value) {
// Int64Value
-// int64 value = 1;
+// int64 value = 1;
inline void Int64Value::clear_value() {
value_ = int64_t{0};
}
@@ -1439,7 +1439,7 @@ inline void Int64Value::set_value(::PROTOBUF_NAMESPACE_ID::int64 value) {
// UInt64Value
-// uint64 value = 1;
+// uint64 value = 1;
inline void UInt64Value::clear_value() {
value_ = uint64_t{0u};
}
@@ -1463,7 +1463,7 @@ inline void UInt64Value::set_value(::PROTOBUF_NAMESPACE_ID::uint64 value) {
// Int32Value
-// int32 value = 1;
+// int32 value = 1;
inline void Int32Value::clear_value() {
value_ = 0;
}
@@ -1487,7 +1487,7 @@ inline void Int32Value::set_value(::PROTOBUF_NAMESPACE_ID::int32 value) {
// UInt32Value
-// uint32 value = 1;
+// uint32 value = 1;
inline void UInt32Value::clear_value() {
value_ = 0u;
}
@@ -1511,7 +1511,7 @@ inline void UInt32Value::set_value(::PROTOBUF_NAMESPACE_ID::uint32 value) {
// BoolValue
-// bool value = 1;
+// bool value = 1;
inline void BoolValue::clear_value() {
value_ = false;
}
@@ -1535,7 +1535,7 @@ inline void BoolValue::set_value(bool value) {
// StringValue
-// string value = 1;
+// string value = 1;
inline void StringValue::clear_value() {
value_.ClearToEmpty();
}
@@ -1585,7 +1585,7 @@ inline void StringValue::set_allocated_value(TProtoStringType* value) {
// BytesValue
-// bytes value = 1;
+// bytes value = 1;
inline void BytesValue::clear_value() {
value_.ClearToEmpty();
}
@@ -1631,9 +1631,9 @@ inline void BytesValue::set_allocated_value(TProtoStringType* value) {
// @@protoc_insertion_point(field_set_allocated:google.protobuf.BytesValue.value)
}
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif // __GNUC__
// -------------------------------------------------------------------
// -------------------------------------------------------------------
@@ -1654,7 +1654,7 @@ inline void BytesValue::set_allocated_value(TProtoStringType* value) {
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_CLOSE
-
+
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>