diff options
author | paxakor <paxakor@yandex-team.ru> | 2022-02-10 16:47:32 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:32 +0300 |
commit | 7fdbed62e54b804e2c12b86a2c2bab12f61065df (patch) | |
tree | 180a6ae33c1213a60fb42829eccb42cc00fc6955 /contrib/libs/protobuf | |
parent | 7199613d295246a07c2f7b331fbb3128936039dc (diff) | |
download | ydb-7fdbed62e54b804e2c12b86a2c2bab12f61065df.tar.gz |
Restoring authorship annotation for <paxakor@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/protobuf')
48 files changed, 873 insertions, 873 deletions
diff --git a/contrib/libs/protobuf/python/ya.make b/contrib/libs/protobuf/python/ya.make index 42bc625109..2779f32843 100644 --- a/contrib/libs/protobuf/python/ya.make +++ b/contrib/libs/protobuf/python/ya.make @@ -1,5 +1,5 @@ -PACKAGE() - +PACKAGE() + WITHOUT_LICENSE_TEXTS() LICENSE(BSD-3-Clause) @@ -8,7 +8,7 @@ OWNER( g:contrib g:cpp-contrib ) - + GENERATE_PY_PROTOS(contrib/libs/protobuf/src/google/protobuf/descriptor.proto) - -END() + +END() diff --git a/contrib/libs/protobuf/src/google/protobuf/any.pb.h b/contrib/libs/protobuf/src/google/protobuf/any.pb.h index f45f983ffb..e928c9cce2 100644 --- a/contrib/libs/protobuf/src/google/protobuf/any.pb.h +++ b/contrib/libs/protobuf/src/google/protobuf/any.pb.h @@ -218,12 +218,12 @@ class PROTOBUF_EXPORT Any final : }; // string type_url = 1; void clear_type_url(); - const TProtoStringType& type_url() const; + const TProtoStringType& type_url() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_type_url(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_type_url(); + TProtoStringType* mutable_type_url(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_type_url(); - void set_allocated_type_url(TProtoStringType* type_url); + void set_allocated_type_url(TProtoStringType* type_url); private: const TProtoStringType& _internal_type_url() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_type_url(const TProtoStringType& value); @@ -232,12 +232,12 @@ class PROTOBUF_EXPORT Any final : // bytes value = 2; void clear_value(); - const TProtoStringType& value() const; + const TProtoStringType& value() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_value(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_value(); + TProtoStringType* mutable_value(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_value(); - void set_allocated_value(TProtoStringType* value); + void set_allocated_value(TProtoStringType* value); private: const TProtoStringType& _internal_value() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const TProtoStringType& value); @@ -272,7 +272,7 @@ class PROTOBUF_EXPORT Any final : inline void Any::clear_type_url() { type_url_.ClearToEmpty(); } -inline const TProtoStringType& Any::type_url() const { +inline const TProtoStringType& Any::type_url() const { // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url) return _internal_type_url(); } @@ -299,11 +299,11 @@ inline TProtoStringType* Any::_internal_mutable_type_url() { return type_url_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Any::release_type_url() { +inline TProtoStringType* Any::release_type_url() { // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url) return type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Any::set_allocated_type_url(TProtoStringType* type_url) { +inline void Any::set_allocated_type_url(TProtoStringType* type_url) { if (type_url != nullptr) { } else { @@ -318,7 +318,7 @@ inline void Any::set_allocated_type_url(TProtoStringType* type_url) { inline void Any::clear_value() { value_.ClearToEmpty(); } -inline const TProtoStringType& Any::value() const { +inline const TProtoStringType& Any::value() const { // @@protoc_insertion_point(field_get:google.protobuf.Any.value) return _internal_value(); } @@ -345,11 +345,11 @@ inline TProtoStringType* Any::_internal_mutable_value() { return value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Any::release_value() { +inline TProtoStringType* Any::release_value() { // @@protoc_insertion_point(field_release:google.protobuf.Any.value) return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Any::set_allocated_value(TProtoStringType* value) { +inline void Any::set_allocated_value(TProtoStringType* value) { if (value != nullptr) { } else { diff --git a/contrib/libs/protobuf/src/google/protobuf/api.pb.h b/contrib/libs/protobuf/src/google/protobuf/api.pb.h index 09482c7fee..9dc9de7411 100644 --- a/contrib/libs/protobuf/src/google/protobuf/api.pb.h +++ b/contrib/libs/protobuf/src/google/protobuf/api.pb.h @@ -268,12 +268,12 @@ class PROTOBUF_EXPORT Api final : // string version = 4; void clear_version(); - const TProtoStringType& version() const; + const TProtoStringType& version() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_version(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_version(); + TProtoStringType* mutable_version(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_version(); - void set_allocated_version(TProtoStringType* version); + void set_allocated_version(TProtoStringType* version); private: const TProtoStringType& _internal_version() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_version(const TProtoStringType& value); @@ -469,12 +469,12 @@ class PROTOBUF_EXPORT Method final : // string name = 1; void clear_name(); - const TProtoStringType& name() const; + 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); @@ -483,12 +483,12 @@ class PROTOBUF_EXPORT Method final : // string request_type_url = 2; void clear_request_type_url(); - const TProtoStringType& request_type_url() const; + const TProtoStringType& request_type_url() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_request_type_url(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_request_type_url(); + TProtoStringType* mutable_request_type_url(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_request_type_url(); - void set_allocated_request_type_url(TProtoStringType* request_type_url); + void set_allocated_request_type_url(TProtoStringType* request_type_url); private: const TProtoStringType& _internal_request_type_url() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_request_type_url(const TProtoStringType& value); @@ -497,12 +497,12 @@ class PROTOBUF_EXPORT Method final : // string response_type_url = 4; void clear_response_type_url(); - const TProtoStringType& response_type_url() const; + const TProtoStringType& response_type_url() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_response_type_url(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_response_type_url(); + TProtoStringType* mutable_response_type_url(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_response_type_url(); - void set_allocated_response_type_url(TProtoStringType* response_type_url); + void set_allocated_response_type_url(TProtoStringType* response_type_url); private: const TProtoStringType& _internal_response_type_url() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_response_type_url(const TProtoStringType& value); @@ -675,12 +675,12 @@ class PROTOBUF_EXPORT Mixin final : }; // string name = 1; void clear_name(); - const TProtoStringType& name() const; + 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); @@ -689,12 +689,12 @@ class PROTOBUF_EXPORT Mixin final : // string root = 2; void clear_root(); - const TProtoStringType& root() const; + const TProtoStringType& root() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_root(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_root(); + TProtoStringType* mutable_root(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_root(); - void set_allocated_root(TProtoStringType* root); + void set_allocated_root(TProtoStringType* root); private: const TProtoStringType& _internal_root() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_root(const TProtoStringType& value); @@ -728,7 +728,7 @@ class PROTOBUF_EXPORT Mixin final : inline void Api::clear_name() { name_.ClearToEmpty(); } -inline const TProtoStringType& Api::name() const { +inline const TProtoStringType& Api::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Api.name) return _internal_name(); } @@ -755,11 +755,11 @@ inline TProtoStringType* Api::_internal_mutable_name() { return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Api::release_name() { +inline TProtoStringType* Api::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Api.name) return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Api::set_allocated_name(TProtoStringType* name) { +inline void Api::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { } else { @@ -851,7 +851,7 @@ Api::options() const { inline void Api::clear_version() { version_.ClearToEmpty(); } -inline const TProtoStringType& Api::version() const { +inline const TProtoStringType& Api::version() const { // @@protoc_insertion_point(field_get:google.protobuf.Api.version) return _internal_version(); } @@ -878,11 +878,11 @@ inline TProtoStringType* Api::_internal_mutable_version() { return version_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Api::release_version() { +inline TProtoStringType* Api::release_version() { // @@protoc_insertion_point(field_release:google.protobuf.Api.version) return version_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Api::set_allocated_version(TProtoStringType* version) { +inline void Api::set_allocated_version(TProtoStringType* version) { if (version != nullptr) { } else { @@ -1047,7 +1047,7 @@ inline void Api::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { inline void Method::clear_name() { name_.ClearToEmpty(); } -inline const TProtoStringType& Method::name() const { +inline const TProtoStringType& Method::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Method.name) return _internal_name(); } @@ -1074,11 +1074,11 @@ inline TProtoStringType* Method::_internal_mutable_name() { return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Method::release_name() { +inline TProtoStringType* Method::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Method.name) return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Method::set_allocated_name(TProtoStringType* name) { +inline void Method::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { } else { @@ -1093,7 +1093,7 @@ inline void Method::set_allocated_name(TProtoStringType* name) { inline void Method::clear_request_type_url() { request_type_url_.ClearToEmpty(); } -inline const TProtoStringType& Method::request_type_url() const { +inline const TProtoStringType& Method::request_type_url() const { // @@protoc_insertion_point(field_get:google.protobuf.Method.request_type_url) return _internal_request_type_url(); } @@ -1120,11 +1120,11 @@ inline TProtoStringType* Method::_internal_mutable_request_type_url() { return request_type_url_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Method::release_request_type_url() { +inline TProtoStringType* Method::release_request_type_url() { // @@protoc_insertion_point(field_release:google.protobuf.Method.request_type_url) return request_type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Method::set_allocated_request_type_url(TProtoStringType* request_type_url) { +inline void Method::set_allocated_request_type_url(TProtoStringType* request_type_url) { if (request_type_url != nullptr) { } else { @@ -1159,7 +1159,7 @@ inline void Method::set_request_streaming(bool value) { inline void Method::clear_response_type_url() { response_type_url_.ClearToEmpty(); } -inline const TProtoStringType& Method::response_type_url() const { +inline const TProtoStringType& Method::response_type_url() const { // @@protoc_insertion_point(field_get:google.protobuf.Method.response_type_url) return _internal_response_type_url(); } @@ -1186,11 +1186,11 @@ inline TProtoStringType* Method::_internal_mutable_response_type_url() { return response_type_url_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Method::release_response_type_url() { +inline TProtoStringType* Method::release_response_type_url() { // @@protoc_insertion_point(field_release:google.protobuf.Method.response_type_url) return response_type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Method::set_allocated_response_type_url(TProtoStringType* response_type_url) { +inline void Method::set_allocated_response_type_url(TProtoStringType* response_type_url) { if (response_type_url != nullptr) { } else { @@ -1286,7 +1286,7 @@ inline void Method::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { inline void Mixin::clear_name() { name_.ClearToEmpty(); } -inline const TProtoStringType& Mixin::name() const { +inline const TProtoStringType& Mixin::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Mixin.name) return _internal_name(); } @@ -1313,11 +1313,11 @@ inline TProtoStringType* Mixin::_internal_mutable_name() { return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Mixin::release_name() { +inline TProtoStringType* Mixin::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Mixin.name) return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Mixin::set_allocated_name(TProtoStringType* name) { +inline void Mixin::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { } else { @@ -1332,7 +1332,7 @@ inline void Mixin::set_allocated_name(TProtoStringType* name) { inline void Mixin::clear_root() { root_.ClearToEmpty(); } -inline const TProtoStringType& Mixin::root() const { +inline const TProtoStringType& Mixin::root() const { // @@protoc_insertion_point(field_get:google.protobuf.Mixin.root) return _internal_root(); } @@ -1359,11 +1359,11 @@ inline TProtoStringType* Mixin::_internal_mutable_root() { return root_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Mixin::release_root() { +inline TProtoStringType* Mixin::release_root() { // @@protoc_insertion_point(field_release:google.protobuf.Mixin.root) return root_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Mixin::set_allocated_root(TProtoStringType* root) { +inline void Mixin::set_allocated_root(TProtoStringType* root) { if (root != nullptr) { } else { diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor.cc b/contrib/libs/protobuf/src/google/protobuf/descriptor.cc index 8b8d7fd9cf..7ec575c431 100644 --- a/contrib/libs/protobuf/src/google/protobuf/descriptor.cc +++ b/contrib/libs/protobuf/src/google/protobuf/descriptor.cc @@ -462,7 +462,7 @@ typedef HASH_MAP<EnumIntPair, const EnumValueDescriptor*, // through all the extensions that extend a given Descriptor, and an // ordered data structure that implements lower_bound is convenient // for that. -typedef std::map<DescriptorIntPair, const FieldDescriptor*> +typedef std::map<DescriptorIntPair, const FieldDescriptor*> ExtensionsGroupedByDescriptorMap; typedef HASH_MAP<TProtoStringType, const SourceCodeInfo_Location*> LocationsByPathMap; @@ -589,7 +589,7 @@ class DescriptorPool::Tables { inline const FieldDescriptor* FindExtension(const Descriptor* extendee, int number) const; inline void FindAllExtensions(const Descriptor* extendee, - std::vector<const FieldDescriptor*>* out) const; + std::vector<const FieldDescriptor*>* out) const; // ----------------------------------------------------------------- // Adding items. @@ -673,10 +673,10 @@ class DescriptorPool::Tables { int pending_files_before_checkpoint; int pending_extensions_before_checkpoint; }; - std::vector<CheckPoint> checkpoints_; + std::vector<CheckPoint> checkpoints_; std::vector<const char*> symbols_after_checkpoint_; std::vector<const char*> files_after_checkpoint_; - std::vector<DescriptorIntPair> extensions_after_checkpoint_; + std::vector<DescriptorIntPair> extensions_after_checkpoint_; // Allocate some bytes which will be reclaimed when the pool is // destroyed. @@ -743,14 +743,14 @@ class FileDescriptorTables { // Populates p->first->locations_by_path_ from p->second. // Unusual signature dictated by internal::call_once. static void BuildLocationsByPath( - std::pair<const FileDescriptorTables*, const SourceCodeInfo*>* p); + std::pair<const FileDescriptorTables*, const SourceCodeInfo*>* p); // Returns the location denoted by the specified path through info, // or nullptr if not found. // The value of info must be that of the corresponding FileDescriptor. // (Conceptually a pure function, but stateful as an optimisation.) const SourceCodeInfo_Location* GetSourceLocation( - const std::vector<int>& path, const SourceCodeInfo* info) const; + const std::vector<int>& path, const SourceCodeInfo* info) const; // Must be called after BuildFileImpl(), even if the build failed and // we are going to roll back to the last checkpoint. @@ -1210,7 +1210,7 @@ void* DescriptorPool::Tables::AllocateBytes(int size) { } void FileDescriptorTables::BuildLocationsByPath( - std::pair<const FileDescriptorTables*, const SourceCodeInfo*>* p) { + std::pair<const FileDescriptorTables*, const SourceCodeInfo*>* p) { for (int i = 0, len = p->second->location_size(); i < len; ++i) { const SourceCodeInfo_Location* loc = &p->second->location().Get(i); p->first->locations_by_path_[Join(loc->path(), ",")] = loc; @@ -1218,8 +1218,8 @@ void FileDescriptorTables::BuildLocationsByPath( } const SourceCodeInfo_Location* FileDescriptorTables::GetSourceLocation( - const std::vector<int>& path, const SourceCodeInfo* info) const { - std::pair<const FileDescriptorTables*, const SourceCodeInfo*> p( + const std::vector<int>& path, const SourceCodeInfo* info) const { + std::pair<const FileDescriptorTables*, const SourceCodeInfo*> p( std::make_pair(this, info)); internal::call_once(locations_by_path_once_, FileDescriptorTables::BuildLocationsByPath, &p); @@ -1554,7 +1554,7 @@ void DescriptorPool::FindAllExtensions( // (but do this only once per descriptor). if (fallback_database_ != nullptr && tables_->extensions_loaded_from_db_.count(extendee) == 0) { - std::vector<int> numbers; + std::vector<int> numbers; if (fallback_database_->FindAllExtensionNumbers(extendee->full_name(), &numbers)) { for (int number : numbers) { @@ -2262,7 +2262,7 @@ bool RetrieveOptionsAssumingRightPool( std::vector<TProtoStringType>* option_entries) { option_entries->clear(); const Reflection* reflection = options.GetReflection(); - std::vector<const FieldDescriptor*> fields; + std::vector<const FieldDescriptor*> fields; reflection->ListFields(options, &fields); for (const FieldDescriptor* field : fields) { int count = 1; @@ -2316,7 +2316,7 @@ bool RetrieveOptions(int depth, const Message& options, // 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); - } + } DynamicMessageFactory factory; std::unique_ptr<Message> dynamic_options( factory.GetPrototype(option_descriptor)->New()); @@ -2328,9 +2328,9 @@ bool RetrieveOptions(int depth, const Message& options, << 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, @@ -2367,7 +2367,7 @@ class SourceLocationCommentPrinter { options.include_comments && desc->GetSourceLocation(&source_loc_); } SourceLocationCommentPrinter(const FileDescriptor* file, - const std::vector<int>& path, + const std::vector<int>& path, const TProtoStringType& prefix, const DebugStringOptions& options) : options_(options), prefix_(prefix) { @@ -2428,7 +2428,7 @@ TProtoStringType FileDescriptor::DebugStringWithOptions( const DebugStringOptions& debug_string_options) const { TProtoStringType contents; { - std::vector<int> path; + std::vector<int> path; path.push_back(FileDescriptorProto::kSyntaxFieldNumber); SourceLocationCommentPrinter syntax_comment(this, path, "", debug_string_options); @@ -2441,8 +2441,8 @@ TProtoStringType FileDescriptor::DebugStringWithOptions( SourceLocationCommentPrinter comment_printer(this, "", debug_string_options); comment_printer.AddPreComment(&contents); - std::set<int> public_dependencies; - std::set<int> weak_dependencies; + std::set<int> public_dependencies; + std::set<int> weak_dependencies; public_dependencies.insert(public_dependencies_, public_dependencies_ + public_dependency_count_); weak_dependencies.insert(weak_dependencies_, @@ -2462,7 +2462,7 @@ TProtoStringType FileDescriptor::DebugStringWithOptions( } if (!package().empty()) { - std::vector<int> path; + std::vector<int> path; path.push_back(FileDescriptorProto::kPackageFieldNumber); SourceLocationCommentPrinter package_comment(this, path, "", debug_string_options); @@ -2471,7 +2471,7 @@ TProtoStringType FileDescriptor::DebugStringWithOptions( package_comment.AddPostComment(&contents); } - if (FormatLineOptions(0, options(), pool(), &contents)) { + if (FormatLineOptions(0, options(), pool(), &contents)) { contents.append("\n"); // add some space if we had options } @@ -2482,7 +2482,7 @@ TProtoStringType FileDescriptor::DebugStringWithOptions( // Find all the 'group' type extensions; we will not output their nested // definitions (those will be done with their group field descriptor). - std::set<const Descriptor*> groups; + std::set<const Descriptor*> groups; for (int i = 0; i < extension_count(); i++) { if (extension(i)->type() == FieldDescriptor::TYPE_GROUP) { groups.insert(extension(i)->message_type()); @@ -2550,12 +2550,12 @@ void Descriptor::DebugString(int depth, TProtoStringType* contents, } contents->append(" {\n"); - FormatLineOptions(depth, options(), file()->pool(), contents); + FormatLineOptions(depth, options(), file()->pool(), contents); // Find all the 'group' types for fields and extensions; we will not output // their nested definitions (those will be done with their group field // descriptor). - std::set<const Descriptor*> groups; + std::set<const Descriptor*> groups; for (int i = 0; i < field_count(); i++) { if (field(i)->type() == FieldDescriptor::TYPE_GROUP) { groups.insert(field(i)->message_type()); @@ -2805,7 +2805,7 @@ void EnumDescriptor::DebugString( strings::SubstituteAndAppend(contents, "$0enum $1 {\n", prefix, name()); - FormatLineOptions(depth, options(), file()->pool(), contents); + FormatLineOptions(depth, options(), file()->pool(), contents); for (int i = 0; i < value_count(); i++) { value(i)->DebugString(depth, contents, debug_string_options); @@ -2895,7 +2895,7 @@ void ServiceDescriptor::DebugString( strings::SubstituteAndAppend(contents, "service $0 {\n", name()); - FormatLineOptions(1, options(), file()->pool(), contents); + FormatLineOptions(1, options(), file()->pool(), contents); for (int i = 0; i < method_count(); i++) { method(i)->DebugString(1, contents, debug_string_options); @@ -2948,7 +2948,7 @@ void MethodDescriptor::DebugString( // Location methods =============================================== -bool FileDescriptor::GetSourceLocation(const std::vector<int>& path, +bool FileDescriptor::GetSourceLocation(const std::vector<int>& path, SourceLocation* out_location) const { GOOGLE_CHECK(out_location != nullptr); if (source_code_info_) { @@ -2974,7 +2974,7 @@ bool FileDescriptor::GetSourceLocation(const std::vector<int>& path, } bool FileDescriptor::GetSourceLocation(SourceLocation* out_location) const { - std::vector<int> path; // empty path for root FileDescriptor + std::vector<int> path; // empty path for root FileDescriptor return GetSourceLocation(path, out_location); } @@ -2988,49 +2988,49 @@ bool FieldDescriptor::is_packed() const { } bool Descriptor::GetSourceLocation(SourceLocation* out_location) const { - std::vector<int> path; + std::vector<int> path; GetLocationPath(&path); return file()->GetSourceLocation(path, out_location); } bool FieldDescriptor::GetSourceLocation(SourceLocation* out_location) const { - std::vector<int> path; + std::vector<int> path; GetLocationPath(&path); return file()->GetSourceLocation(path, out_location); } bool OneofDescriptor::GetSourceLocation(SourceLocation* out_location) const { - std::vector<int> path; + std::vector<int> path; GetLocationPath(&path); return containing_type()->file()->GetSourceLocation(path, out_location); } bool EnumDescriptor::GetSourceLocation(SourceLocation* out_location) const { - std::vector<int> path; + std::vector<int> path; GetLocationPath(&path); return file()->GetSourceLocation(path, out_location); } bool MethodDescriptor::GetSourceLocation(SourceLocation* out_location) const { - std::vector<int> path; + std::vector<int> path; GetLocationPath(&path); return service()->file()->GetSourceLocation(path, out_location); } bool ServiceDescriptor::GetSourceLocation(SourceLocation* out_location) const { - std::vector<int> path; + std::vector<int> path; GetLocationPath(&path); return file()->GetSourceLocation(path, out_location); } bool EnumValueDescriptor::GetSourceLocation( SourceLocation* out_location) const { - std::vector<int> path; + std::vector<int> path; GetLocationPath(&path); return type()->file()->GetSourceLocation(path, out_location); } -void Descriptor::GetLocationPath(std::vector<int>* output) const { +void Descriptor::GetLocationPath(std::vector<int>* output) const { if (containing_type()) { containing_type()->GetLocationPath(output); output->push_back(DescriptorProto::kNestedTypeFieldNumber); @@ -3041,7 +3041,7 @@ void Descriptor::GetLocationPath(std::vector<int>* output) const { } } -void FieldDescriptor::GetLocationPath(std::vector<int>* output) const { +void FieldDescriptor::GetLocationPath(std::vector<int>* output) const { if (is_extension()) { if (extension_scope() == nullptr) { output->push_back(FileDescriptorProto::kExtensionFieldNumber); @@ -3058,13 +3058,13 @@ void FieldDescriptor::GetLocationPath(std::vector<int>* output) const { } } -void OneofDescriptor::GetLocationPath(std::vector<int>* output) const { +void OneofDescriptor::GetLocationPath(std::vector<int>* output) const { containing_type()->GetLocationPath(output); output->push_back(DescriptorProto::kOneofDeclFieldNumber); output->push_back(index()); } -void EnumDescriptor::GetLocationPath(std::vector<int>* output) const { +void EnumDescriptor::GetLocationPath(std::vector<int>* output) const { if (containing_type()) { containing_type()->GetLocationPath(output); output->push_back(DescriptorProto::kEnumTypeFieldNumber); @@ -3075,18 +3075,18 @@ void EnumDescriptor::GetLocationPath(std::vector<int>* output) const { } } -void EnumValueDescriptor::GetLocationPath(std::vector<int>* output) const { +void EnumValueDescriptor::GetLocationPath(std::vector<int>* output) const { type()->GetLocationPath(output); output->push_back(EnumDescriptorProto::kValueFieldNumber); output->push_back(index()); } -void ServiceDescriptor::GetLocationPath(std::vector<int>* output) const { +void ServiceDescriptor::GetLocationPath(std::vector<int>* output) const { output->push_back(FileDescriptorProto::kServiceFieldNumber); output->push_back(index()); } -void MethodDescriptor::GetLocationPath(std::vector<int>* output) const { +void MethodDescriptor::GetLocationPath(std::vector<int>* output) const { service()->GetLocationPath(output); output->push_back(ServiceDescriptorProto::kMethodFieldNumber); output->push_back(index()); @@ -3140,17 +3140,17 @@ class DescriptorBuilder { // As we build descriptors we store copies of the options messages in // them. We put pointers to those copies in this vector, as we build, so we // can later (after cross-linking) interpret those options. - std::vector<OptionsToInterpret> options_to_interpret_; + std::vector<OptionsToInterpret> options_to_interpret_; bool had_errors_; TProtoStringType filename_; FileDescriptor* file_; FileDescriptorTables* file_tables_; - std::set<const FileDescriptor*> dependencies_; + std::set<const FileDescriptor*> dependencies_; // unused_dependency_ is used to record the unused imported files. // Note: public import is not considered. - std::set<const FileDescriptor*> unused_dependency_; + std::set<const FileDescriptor*> unused_dependency_; // If LookupSymbol() finds a symbol that is in a file which is not a declared // dependency of this file, it will fail, but will set @@ -4408,7 +4408,7 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl( result->dependencies_names_ = nullptr; } unused_dependency_.clear(); - std::set<int> weak_deps; + std::set<int> weak_deps; for (int i = 0; i < proto.weak_dependency_size(); ++i) { weak_deps.insert(proto.weak_dependency(i)); } @@ -4528,7 +4528,7 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl( // extension options known, so all interpretations should now succeed. if (!had_errors_) { OptionInterpreter option_interpreter(this); - for (std::vector<OptionsToInterpret>::iterator iter = + for (std::vector<OptionsToInterpret>::iterator iter = options_to_interpret_.begin(); iter != options_to_interpret_.end(); ++iter) { option_interpreter.InterpretOptions(&(*iter)); @@ -6515,7 +6515,7 @@ bool DescriptorBuilder::OptionInterpreter::InterpretSingleOption( // name in |debug_msg_name|, for use in error messages. const Descriptor* descriptor = options_descriptor; const FieldDescriptor* field = nullptr; - std::vector<const FieldDescriptor*> intermediate_fields; + std::vector<const FieldDescriptor*> intermediate_fields; TProtoStringType debug_msg_name = ""; std::vector<int> dest_path = options_path; @@ -6633,7 +6633,7 @@ bool DescriptorBuilder::OptionInterpreter::InterpretSingleOption( // Now wrap the UnknownFieldSet with UnknownFieldSets corresponding to all // the intermediate messages. - for (std::vector<const FieldDescriptor*>::reverse_iterator iter = + for (std::vector<const FieldDescriptor*>::reverse_iterator iter = intermediate_fields.rbegin(); iter != intermediate_fields.rend(); ++iter) { std::unique_ptr<UnknownFieldSet> parent_unknown_fields( @@ -6786,7 +6786,7 @@ 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_end, + std::vector<const FieldDescriptor*>::const_iterator intermediate_fields_end, const FieldDescriptor* innermost_field, const TProtoStringType& debug_msg_name, const UnknownFieldSet& unknown_fields) { // We do linear searches of the UnknownFieldSet and its sub-groups. This diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.h b/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.h index 0df49109cd..16484d7e83 100644 --- a/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.h +++ b/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.h @@ -625,14 +625,14 @@ class PROTOBUF_EXPORT FileDescriptorProto final : int _internal_dependency_size() const; public: void clear_dependency(); - const TProtoStringType& dependency(int index) const; - TProtoStringType* mutable_dependency(int index); - void set_dependency(int index, const TProtoStringType& value); + 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, const char* value); void set_dependency(int index, const char* value, size_t size); - TProtoStringType* add_dependency(); - void add_dependency(const TProtoStringType& value); + TProtoStringType* add_dependency(); + void add_dependency(const TProtoStringType& value); void add_dependency(TProtoStringType&& value); void add_dependency(const char* value); void add_dependency(const char* value, size_t size); @@ -1494,14 +1494,14 @@ class PROTOBUF_EXPORT DescriptorProto final : int _internal_reserved_name_size() const; public: void clear_reserved_name(); - const TProtoStringType& reserved_name(int index) const; - TProtoStringType* mutable_reserved_name(int index); - void set_reserved_name(int index, const TProtoStringType& value); + 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, 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); + TProtoStringType* add_reserved_name(); + void add_reserved_name(const 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); @@ -1963,12 +1963,12 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : bool _internal_has_name() const; public: void clear_name(); - const TProtoStringType& name() const; + 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); @@ -1999,12 +1999,12 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : bool _internal_has_type_name() const; public: void clear_type_name(); - const TProtoStringType& type_name() const; + const TProtoStringType& type_name() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_type_name(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_type_name(); + TProtoStringType* mutable_type_name(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_type_name(); - void set_allocated_type_name(TProtoStringType* type_name); + void set_allocated_type_name(TProtoStringType* type_name); private: const TProtoStringType& _internal_type_name() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_type_name(const TProtoStringType& value); @@ -2017,12 +2017,12 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : bool _internal_has_default_value() const; public: void clear_default_value(); - const TProtoStringType& default_value() const; + const TProtoStringType& default_value() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_default_value(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_default_value(); + TProtoStringType* mutable_default_value(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_default_value(); - void set_allocated_default_value(TProtoStringType* default_value); + void set_allocated_default_value(TProtoStringType* default_value); private: const TProtoStringType& _internal_default_value() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_default_value(const TProtoStringType& value); @@ -2035,12 +2035,12 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : bool _internal_has_json_name() const; public: void clear_json_name(); - const TProtoStringType& json_name() const; + const TProtoStringType& json_name() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_json_name(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_json_name(); + TProtoStringType* mutable_json_name(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_json_name(); - void set_allocated_json_name(TProtoStringType* json_name); + void set_allocated_json_name(TProtoStringType* json_name); private: const TProtoStringType& _internal_json_name() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_json_name(const TProtoStringType& value); @@ -2285,12 +2285,12 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : bool _internal_has_name() const; public: void clear_name(); - const TProtoStringType& name() const; + 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); @@ -2692,12 +2692,12 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : bool _internal_has_name() const; public: void clear_name(); - const TProtoStringType& name() const; + 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); @@ -2872,12 +2872,12 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : bool _internal_has_name() const; public: void clear_name(); - const TProtoStringType& name() const; + 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); @@ -3081,12 +3081,12 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : bool _internal_has_name() const; public: void clear_name(); - const TProtoStringType& name() const; + 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); @@ -3262,12 +3262,12 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : bool _internal_has_name() const; public: void clear_name(); - const TProtoStringType& name() const; + 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); @@ -3280,12 +3280,12 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : bool _internal_has_input_type() const; public: void clear_input_type(); - const TProtoStringType& input_type() const; + const TProtoStringType& input_type() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_input_type(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_input_type(); + TProtoStringType* mutable_input_type(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_input_type(); - void set_allocated_input_type(TProtoStringType* input_type); + void set_allocated_input_type(TProtoStringType* input_type); private: const TProtoStringType& _internal_input_type() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_input_type(const TProtoStringType& value); @@ -3298,12 +3298,12 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : bool _internal_has_output_type() const; public: void clear_output_type(); - const TProtoStringType& output_type() const; + const TProtoStringType& output_type() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_output_type(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_output_type(); + TProtoStringType* mutable_output_type(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_output_type(); - void set_allocated_output_type(TProtoStringType* output_type); + void set_allocated_output_type(TProtoStringType* output_type); private: const TProtoStringType& _internal_output_type() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_output_type(const TProtoStringType& value); @@ -3573,12 +3573,12 @@ class PROTOBUF_EXPORT FileOptions final : bool _internal_has_java_package() const; public: void clear_java_package(); - const TProtoStringType& java_package() const; + const TProtoStringType& java_package() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_java_package(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_java_package(); + TProtoStringType* mutable_java_package(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_java_package(); - void set_allocated_java_package(TProtoStringType* java_package); + void set_allocated_java_package(TProtoStringType* java_package); private: const TProtoStringType& _internal_java_package() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_java_package(const TProtoStringType& value); @@ -3591,12 +3591,12 @@ class PROTOBUF_EXPORT FileOptions final : bool _internal_has_java_outer_classname() const; public: void clear_java_outer_classname(); - const TProtoStringType& java_outer_classname() const; + const TProtoStringType& java_outer_classname() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_java_outer_classname(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_java_outer_classname(); + TProtoStringType* mutable_java_outer_classname(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_java_outer_classname(); - void set_allocated_java_outer_classname(TProtoStringType* java_outer_classname); + void set_allocated_java_outer_classname(TProtoStringType* java_outer_classname); private: const TProtoStringType& _internal_java_outer_classname() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_java_outer_classname(const TProtoStringType& value); @@ -5493,12 +5493,12 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : bool _internal_has_name_part() const; public: void clear_name_part(); - const TProtoStringType& name_part() const; + const TProtoStringType& name_part() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_name_part(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_name_part(); + TProtoStringType* mutable_name_part(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_name_part(); - void set_allocated_name_part(TProtoStringType* name_part); + void set_allocated_name_part(TProtoStringType* name_part); private: const TProtoStringType& _internal_name_part() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_name_part(const TProtoStringType& value); @@ -5692,12 +5692,12 @@ class PROTOBUF_EXPORT UninterpretedOption final : bool _internal_has_identifier_value() const; public: void clear_identifier_value(); - const TProtoStringType& identifier_value() const; + const TProtoStringType& identifier_value() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_identifier_value(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_identifier_value(); + TProtoStringType* mutable_identifier_value(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_identifier_value(); - void set_allocated_identifier_value(TProtoStringType* identifier_value); + void set_allocated_identifier_value(TProtoStringType* identifier_value); private: const TProtoStringType& _internal_identifier_value() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_identifier_value(const TProtoStringType& value); @@ -5710,12 +5710,12 @@ class PROTOBUF_EXPORT UninterpretedOption final : bool _internal_has_string_value() const; public: void clear_string_value(); - const TProtoStringType& string_value() const; + const TProtoStringType& string_value() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_string_value(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_string_value(); + TProtoStringType* mutable_string_value(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_string_value(); - void set_allocated_string_value(TProtoStringType* string_value); + void set_allocated_string_value(TProtoStringType* string_value); private: const TProtoStringType& _internal_string_value() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_string_value(const TProtoStringType& value); @@ -5728,12 +5728,12 @@ class PROTOBUF_EXPORT UninterpretedOption final : bool _internal_has_aggregate_value() const; public: void clear_aggregate_value(); - const TProtoStringType& aggregate_value() const; + const TProtoStringType& aggregate_value() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_aggregate_value(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_aggregate_value(); + TProtoStringType* mutable_aggregate_value(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_aggregate_value(); - void set_allocated_aggregate_value(TProtoStringType* aggregate_value); + void set_allocated_aggregate_value(TProtoStringType* aggregate_value); private: const TProtoStringType& _internal_aggregate_value() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_aggregate_value(const TProtoStringType& value); @@ -6001,12 +6001,12 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : bool _internal_has_leading_comments() const; public: void clear_leading_comments(); - const TProtoStringType& leading_comments() const; + const TProtoStringType& leading_comments() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_leading_comments(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_leading_comments(); + TProtoStringType* mutable_leading_comments(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_leading_comments(); - void set_allocated_leading_comments(TProtoStringType* leading_comments); + void set_allocated_leading_comments(TProtoStringType* leading_comments); private: const TProtoStringType& _internal_leading_comments() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_leading_comments(const TProtoStringType& value); @@ -6019,12 +6019,12 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : bool _internal_has_trailing_comments() const; public: void clear_trailing_comments(); - const TProtoStringType& trailing_comments() const; + const TProtoStringType& trailing_comments() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_trailing_comments(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_trailing_comments(); + TProtoStringType* mutable_trailing_comments(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_trailing_comments(); - void set_allocated_trailing_comments(TProtoStringType* trailing_comments); + void set_allocated_trailing_comments(TProtoStringType* trailing_comments); private: const TProtoStringType& _internal_trailing_comments() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_trailing_comments(const TProtoStringType& value); @@ -6363,12 +6363,12 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : bool _internal_has_source_file() const; public: void clear_source_file(); - const TProtoStringType& source_file() const; + const TProtoStringType& source_file() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_source_file(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_source_file(); + TProtoStringType* mutable_source_file(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_source_file(); - void set_allocated_source_file(TProtoStringType* source_file); + void set_allocated_source_file(TProtoStringType* source_file); private: const TProtoStringType& _internal_source_file() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_source_file(const TProtoStringType& value); @@ -6641,7 +6641,7 @@ inline void FileDescriptorProto::clear_name() { name_.ClearToEmpty(); _has_bits_[0] &= ~0x00000001u; } -inline const TProtoStringType& FileDescriptorProto::name() const { +inline const TProtoStringType& FileDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.name) return _internal_name(); } @@ -6668,7 +6668,7 @@ inline TProtoStringType* FileDescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* FileDescriptorProto::release_name() { +inline TProtoStringType* FileDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.name) if (!_internal_has_name()) { return nullptr; @@ -6676,7 +6676,7 @@ inline TProtoStringType* FileDescriptorProto::release_name() { _has_bits_[0] &= ~0x00000001u; return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void FileDescriptorProto::set_allocated_name(TProtoStringType* name) { +inline void FileDescriptorProto::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { @@ -6699,7 +6699,7 @@ inline void FileDescriptorProto::clear_package() { package_.ClearToEmpty(); _has_bits_[0] &= ~0x00000002u; } -inline const TProtoStringType& FileDescriptorProto::package() const { +inline const TProtoStringType& FileDescriptorProto::package() const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.package) return _internal_package(); } @@ -6726,7 +6726,7 @@ inline TProtoStringType* FileDescriptorProto::_internal_mutable_package() { _has_bits_[0] |= 0x00000002u; return package_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* FileDescriptorProto::release_package() { +inline TProtoStringType* FileDescriptorProto::release_package() { // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.package) if (!_internal_has_package()) { return nullptr; @@ -6734,7 +6734,7 @@ inline TProtoStringType* FileDescriptorProto::release_package() { _has_bits_[0] &= ~0x00000002u; return package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void FileDescriptorProto::set_allocated_package(TProtoStringType* package) { +inline void FileDescriptorProto::set_allocated_package(TProtoStringType* package) { if (package != nullptr) { _has_bits_[0] |= 0x00000002u; } else { @@ -6763,15 +6763,15 @@ inline TProtoStringType* FileDescriptorProto::add_dependency() { inline const TProtoStringType& FileDescriptorProto::_internal_dependency(int index) const { return dependency_.Get(index); } -inline const TProtoStringType& FileDescriptorProto::dependency(int index) const { +inline const TProtoStringType& FileDescriptorProto::dependency(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.dependency) return _internal_dependency(index); } -inline TProtoStringType* FileDescriptorProto::mutable_dependency(int index) { +inline TProtoStringType* FileDescriptorProto::mutable_dependency(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.dependency) return dependency_.Mutable(index); } -inline void FileDescriptorProto::set_dependency(int index, const TProtoStringType& value) { +inline void FileDescriptorProto::set_dependency(int index, const TProtoStringType& value) { dependency_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency) } @@ -6792,7 +6792,7 @@ inline void FileDescriptorProto::set_dependency(int index, const char* value, si inline TProtoStringType* FileDescriptorProto::_internal_add_dependency() { return dependency_.Add(); } -inline void FileDescriptorProto::add_dependency(const TProtoStringType& value) { +inline void FileDescriptorProto::add_dependency(const TProtoStringType& value) { dependency_.Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency) } @@ -7266,7 +7266,7 @@ inline void FileDescriptorProto::clear_syntax() { syntax_.ClearToEmpty(); _has_bits_[0] &= ~0x00000004u; } -inline const TProtoStringType& FileDescriptorProto::syntax() const { +inline const TProtoStringType& FileDescriptorProto::syntax() const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.syntax) return _internal_syntax(); } @@ -7293,7 +7293,7 @@ inline TProtoStringType* FileDescriptorProto::_internal_mutable_syntax() { _has_bits_[0] |= 0x00000004u; return syntax_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* FileDescriptorProto::release_syntax() { +inline TProtoStringType* FileDescriptorProto::release_syntax() { // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.syntax) if (!_internal_has_syntax()) { return nullptr; @@ -7301,7 +7301,7 @@ inline TProtoStringType* FileDescriptorProto::release_syntax() { _has_bits_[0] &= ~0x00000004u; return syntax_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void FileDescriptorProto::set_allocated_syntax(TProtoStringType* syntax) { +inline void FileDescriptorProto::set_allocated_syntax(TProtoStringType* syntax) { if (syntax != nullptr) { _has_bits_[0] |= 0x00000004u; } else { @@ -7538,7 +7538,7 @@ inline void DescriptorProto::clear_name() { name_.ClearToEmpty(); _has_bits_[0] &= ~0x00000001u; } -inline const TProtoStringType& DescriptorProto::name() const { +inline const TProtoStringType& DescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.name) return _internal_name(); } @@ -7565,7 +7565,7 @@ inline TProtoStringType* DescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* DescriptorProto::release_name() { +inline TProtoStringType* DescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.name) if (!_internal_has_name()) { return nullptr; @@ -7573,7 +7573,7 @@ inline TProtoStringType* DescriptorProto::release_name() { _has_bits_[0] &= ~0x00000001u; return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void DescriptorProto::set_allocated_name(TProtoStringType* name) { +inline void DescriptorProto::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { @@ -7972,15 +7972,15 @@ inline TProtoStringType* DescriptorProto::add_reserved_name() { inline const TProtoStringType& DescriptorProto::_internal_reserved_name(int index) const { return reserved_name_.Get(index); } -inline const TProtoStringType& DescriptorProto::reserved_name(int index) const { +inline const TProtoStringType& DescriptorProto::reserved_name(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_name) return _internal_reserved_name(index); } -inline TProtoStringType* DescriptorProto::mutable_reserved_name(int index) { +inline TProtoStringType* DescriptorProto::mutable_reserved_name(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_name) return reserved_name_.Mutable(index); } -inline void DescriptorProto::set_reserved_name(int index, const TProtoStringType& value) { +inline void DescriptorProto::set_reserved_name(int index, const TProtoStringType& value) { reserved_name_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name) } @@ -8001,7 +8001,7 @@ inline void DescriptorProto::set_reserved_name(int index, const char* value, siz inline TProtoStringType* DescriptorProto::_internal_add_reserved_name() { return reserved_name_.Add(); } -inline void DescriptorProto::add_reserved_name(const TProtoStringType& value) { +inline void DescriptorProto::add_reserved_name(const TProtoStringType& value) { reserved_name_.Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name) } @@ -8089,7 +8089,7 @@ inline void FieldDescriptorProto::clear_name() { name_.ClearToEmpty(); _has_bits_[0] &= ~0x00000001u; } -inline const TProtoStringType& FieldDescriptorProto::name() const { +inline const TProtoStringType& FieldDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.name) return _internal_name(); } @@ -8116,7 +8116,7 @@ inline TProtoStringType* FieldDescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* FieldDescriptorProto::release_name() { +inline TProtoStringType* FieldDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.name) if (!_internal_has_name()) { return nullptr; @@ -8124,7 +8124,7 @@ inline TProtoStringType* FieldDescriptorProto::release_name() { _has_bits_[0] &= ~0x00000001u; return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void FieldDescriptorProto::set_allocated_name(TProtoStringType* name) { +inline void FieldDescriptorProto::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { @@ -8233,7 +8233,7 @@ inline void FieldDescriptorProto::clear_type_name() { type_name_.ClearToEmpty(); _has_bits_[0] &= ~0x00000004u; } -inline const TProtoStringType& FieldDescriptorProto::type_name() const { +inline const TProtoStringType& FieldDescriptorProto::type_name() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type_name) return _internal_type_name(); } @@ -8260,7 +8260,7 @@ inline TProtoStringType* FieldDescriptorProto::_internal_mutable_type_name() { _has_bits_[0] |= 0x00000004u; return type_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* FieldDescriptorProto::release_type_name() { +inline TProtoStringType* FieldDescriptorProto::release_type_name() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.type_name) if (!_internal_has_type_name()) { return nullptr; @@ -8268,7 +8268,7 @@ inline TProtoStringType* FieldDescriptorProto::release_type_name() { _has_bits_[0] &= ~0x00000004u; return type_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void FieldDescriptorProto::set_allocated_type_name(TProtoStringType* type_name) { +inline void FieldDescriptorProto::set_allocated_type_name(TProtoStringType* type_name) { if (type_name != nullptr) { _has_bits_[0] |= 0x00000004u; } else { @@ -8291,7 +8291,7 @@ inline void FieldDescriptorProto::clear_extendee() { extendee_.ClearToEmpty(); _has_bits_[0] &= ~0x00000002u; } -inline const TProtoStringType& FieldDescriptorProto::extendee() const { +inline const TProtoStringType& FieldDescriptorProto::extendee() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.extendee) return _internal_extendee(); } @@ -8318,7 +8318,7 @@ inline TProtoStringType* FieldDescriptorProto::_internal_mutable_extendee() { _has_bits_[0] |= 0x00000002u; return extendee_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* FieldDescriptorProto::release_extendee() { +inline TProtoStringType* FieldDescriptorProto::release_extendee() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.extendee) if (!_internal_has_extendee()) { return nullptr; @@ -8326,7 +8326,7 @@ inline TProtoStringType* FieldDescriptorProto::release_extendee() { _has_bits_[0] &= ~0x00000002u; return extendee_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void FieldDescriptorProto::set_allocated_extendee(TProtoStringType* extendee) { +inline void FieldDescriptorProto::set_allocated_extendee(TProtoStringType* extendee) { if (extendee != nullptr) { _has_bits_[0] |= 0x00000002u; } else { @@ -8349,7 +8349,7 @@ inline void FieldDescriptorProto::clear_default_value() { default_value_.ClearToEmpty(); _has_bits_[0] &= ~0x00000008u; } -inline const TProtoStringType& FieldDescriptorProto::default_value() const { +inline const TProtoStringType& FieldDescriptorProto::default_value() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.default_value) return _internal_default_value(); } @@ -8376,7 +8376,7 @@ inline TProtoStringType* FieldDescriptorProto::_internal_mutable_default_value() _has_bits_[0] |= 0x00000008u; return default_value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* FieldDescriptorProto::release_default_value() { +inline TProtoStringType* FieldDescriptorProto::release_default_value() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.default_value) if (!_internal_has_default_value()) { return nullptr; @@ -8384,7 +8384,7 @@ inline TProtoStringType* FieldDescriptorProto::release_default_value() { _has_bits_[0] &= ~0x00000008u; return default_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void FieldDescriptorProto::set_allocated_default_value(TProtoStringType* default_value) { +inline void FieldDescriptorProto::set_allocated_default_value(TProtoStringType* default_value) { if (default_value != nullptr) { _has_bits_[0] |= 0x00000008u; } else { @@ -8435,7 +8435,7 @@ inline void FieldDescriptorProto::clear_json_name() { json_name_.ClearToEmpty(); _has_bits_[0] &= ~0x00000010u; } -inline const TProtoStringType& FieldDescriptorProto::json_name() const { +inline const TProtoStringType& FieldDescriptorProto::json_name() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.json_name) return _internal_json_name(); } @@ -8462,7 +8462,7 @@ inline TProtoStringType* FieldDescriptorProto::_internal_mutable_json_name() { _has_bits_[0] |= 0x00000010u; return json_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* FieldDescriptorProto::release_json_name() { +inline TProtoStringType* FieldDescriptorProto::release_json_name() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.json_name) if (!_internal_has_json_name()) { return nullptr; @@ -8470,7 +8470,7 @@ inline TProtoStringType* FieldDescriptorProto::release_json_name() { _has_bits_[0] &= ~0x00000010u; return json_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void FieldDescriptorProto::set_allocated_json_name(TProtoStringType* json_name) { +inline void FieldDescriptorProto::set_allocated_json_name(TProtoStringType* json_name) { if (json_name != nullptr) { _has_bits_[0] |= 0x00000010u; } else { @@ -8615,7 +8615,7 @@ inline void OneofDescriptorProto::clear_name() { name_.ClearToEmpty(); _has_bits_[0] &= ~0x00000001u; } -inline const TProtoStringType& OneofDescriptorProto::name() const { +inline const TProtoStringType& OneofDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.name) return _internal_name(); } @@ -8642,7 +8642,7 @@ inline TProtoStringType* OneofDescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* OneofDescriptorProto::release_name() { +inline TProtoStringType* OneofDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.OneofDescriptorProto.name) if (!_internal_has_name()) { return nullptr; @@ -8650,7 +8650,7 @@ inline TProtoStringType* OneofDescriptorProto::release_name() { _has_bits_[0] &= ~0x00000001u; return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void OneofDescriptorProto::set_allocated_name(TProtoStringType* name) { +inline void OneofDescriptorProto::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { @@ -8827,7 +8827,7 @@ inline void EnumDescriptorProto::clear_name() { name_.ClearToEmpty(); _has_bits_[0] &= ~0x00000001u; } -inline const TProtoStringType& EnumDescriptorProto::name() const { +inline const TProtoStringType& EnumDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.name) return _internal_name(); } @@ -8854,7 +8854,7 @@ inline TProtoStringType* EnumDescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* EnumDescriptorProto::release_name() { +inline TProtoStringType* EnumDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.EnumDescriptorProto.name) if (!_internal_has_name()) { return nullptr; @@ -8862,7 +8862,7 @@ inline TProtoStringType* EnumDescriptorProto::release_name() { _has_bits_[0] &= ~0x00000001u; return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void EnumDescriptorProto::set_allocated_name(TProtoStringType* name) { +inline void EnumDescriptorProto::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { @@ -9134,7 +9134,7 @@ inline void EnumValueDescriptorProto::clear_name() { name_.ClearToEmpty(); _has_bits_[0] &= ~0x00000001u; } -inline const TProtoStringType& EnumValueDescriptorProto::name() const { +inline const TProtoStringType& EnumValueDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.name) return _internal_name(); } @@ -9161,7 +9161,7 @@ inline TProtoStringType* EnumValueDescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* EnumValueDescriptorProto::release_name() { +inline TProtoStringType* EnumValueDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.EnumValueDescriptorProto.name) if (!_internal_has_name()) { return nullptr; @@ -9169,7 +9169,7 @@ inline TProtoStringType* EnumValueDescriptorProto::release_name() { _has_bits_[0] &= ~0x00000001u; return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void EnumValueDescriptorProto::set_allocated_name(TProtoStringType* name) { +inline void EnumValueDescriptorProto::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { @@ -9314,7 +9314,7 @@ inline void ServiceDescriptorProto::clear_name() { name_.ClearToEmpty(); _has_bits_[0] &= ~0x00000001u; } -inline const TProtoStringType& ServiceDescriptorProto::name() const { +inline const TProtoStringType& ServiceDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.name) return _internal_name(); } @@ -9341,7 +9341,7 @@ inline TProtoStringType* ServiceDescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* ServiceDescriptorProto::release_name() { +inline TProtoStringType* ServiceDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.ServiceDescriptorProto.name) if (!_internal_has_name()) { return nullptr; @@ -9349,7 +9349,7 @@ inline TProtoStringType* ServiceDescriptorProto::release_name() { _has_bits_[0] &= ~0x00000001u; return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void ServiceDescriptorProto::set_allocated_name(TProtoStringType* name) { +inline void ServiceDescriptorProto::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { @@ -9506,7 +9506,7 @@ inline void MethodDescriptorProto::clear_name() { name_.ClearToEmpty(); _has_bits_[0] &= ~0x00000001u; } -inline const TProtoStringType& MethodDescriptorProto::name() const { +inline const TProtoStringType& MethodDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.name) return _internal_name(); } @@ -9533,7 +9533,7 @@ inline TProtoStringType* MethodDescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* MethodDescriptorProto::release_name() { +inline TProtoStringType* MethodDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.name) if (!_internal_has_name()) { return nullptr; @@ -9541,7 +9541,7 @@ inline TProtoStringType* MethodDescriptorProto::release_name() { _has_bits_[0] &= ~0x00000001u; return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void MethodDescriptorProto::set_allocated_name(TProtoStringType* name) { +inline void MethodDescriptorProto::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { @@ -9564,7 +9564,7 @@ inline void MethodDescriptorProto::clear_input_type() { input_type_.ClearToEmpty(); _has_bits_[0] &= ~0x00000002u; } -inline const TProtoStringType& MethodDescriptorProto::input_type() const { +inline const TProtoStringType& MethodDescriptorProto::input_type() const { // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.input_type) return _internal_input_type(); } @@ -9591,7 +9591,7 @@ inline TProtoStringType* MethodDescriptorProto::_internal_mutable_input_type() { _has_bits_[0] |= 0x00000002u; return input_type_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* MethodDescriptorProto::release_input_type() { +inline TProtoStringType* MethodDescriptorProto::release_input_type() { // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.input_type) if (!_internal_has_input_type()) { return nullptr; @@ -9599,7 +9599,7 @@ inline TProtoStringType* MethodDescriptorProto::release_input_type() { _has_bits_[0] &= ~0x00000002u; return input_type_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void MethodDescriptorProto::set_allocated_input_type(TProtoStringType* input_type) { +inline void MethodDescriptorProto::set_allocated_input_type(TProtoStringType* input_type) { if (input_type != nullptr) { _has_bits_[0] |= 0x00000002u; } else { @@ -9622,7 +9622,7 @@ inline void MethodDescriptorProto::clear_output_type() { output_type_.ClearToEmpty(); _has_bits_[0] &= ~0x00000004u; } -inline const TProtoStringType& MethodDescriptorProto::output_type() const { +inline const TProtoStringType& MethodDescriptorProto::output_type() const { // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.output_type) return _internal_output_type(); } @@ -9649,7 +9649,7 @@ inline TProtoStringType* MethodDescriptorProto::_internal_mutable_output_type() _has_bits_[0] |= 0x00000004u; return output_type_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* MethodDescriptorProto::release_output_type() { +inline TProtoStringType* MethodDescriptorProto::release_output_type() { // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.output_type) if (!_internal_has_output_type()) { return nullptr; @@ -9657,7 +9657,7 @@ inline TProtoStringType* MethodDescriptorProto::release_output_type() { _has_bits_[0] &= ~0x00000004u; return output_type_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void MethodDescriptorProto::set_allocated_output_type(TProtoStringType* output_type) { +inline void MethodDescriptorProto::set_allocated_output_type(TProtoStringType* output_type) { if (output_type != nullptr) { _has_bits_[0] |= 0x00000004u; } else { @@ -9830,7 +9830,7 @@ inline void FileOptions::clear_java_package() { java_package_.ClearToEmpty(); _has_bits_[0] &= ~0x00000001u; } -inline const TProtoStringType& FileOptions::java_package() const { +inline const TProtoStringType& FileOptions::java_package() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_package) return _internal_java_package(); } @@ -9857,7 +9857,7 @@ inline TProtoStringType* FileOptions::_internal_mutable_java_package() { _has_bits_[0] |= 0x00000001u; return java_package_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* FileOptions::release_java_package() { +inline TProtoStringType* FileOptions::release_java_package() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.java_package) if (!_internal_has_java_package()) { return nullptr; @@ -9865,7 +9865,7 @@ inline TProtoStringType* FileOptions::release_java_package() { _has_bits_[0] &= ~0x00000001u; return java_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void FileOptions::set_allocated_java_package(TProtoStringType* java_package) { +inline void FileOptions::set_allocated_java_package(TProtoStringType* java_package) { if (java_package != nullptr) { _has_bits_[0] |= 0x00000001u; } else { @@ -9888,7 +9888,7 @@ inline void FileOptions::clear_java_outer_classname() { java_outer_classname_.ClearToEmpty(); _has_bits_[0] &= ~0x00000002u; } -inline const TProtoStringType& FileOptions::java_outer_classname() const { +inline const TProtoStringType& FileOptions::java_outer_classname() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_outer_classname) return _internal_java_outer_classname(); } @@ -9915,7 +9915,7 @@ inline TProtoStringType* FileOptions::_internal_mutable_java_outer_classname() { _has_bits_[0] |= 0x00000002u; return java_outer_classname_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* FileOptions::release_java_outer_classname() { +inline TProtoStringType* FileOptions::release_java_outer_classname() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.java_outer_classname) if (!_internal_has_java_outer_classname()) { return nullptr; @@ -9923,7 +9923,7 @@ inline TProtoStringType* FileOptions::release_java_outer_classname() { _has_bits_[0] &= ~0x00000002u; return java_outer_classname_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void FileOptions::set_allocated_java_outer_classname(TProtoStringType* java_outer_classname) { +inline void FileOptions::set_allocated_java_outer_classname(TProtoStringType* java_outer_classname) { if (java_outer_classname != nullptr) { _has_bits_[0] |= 0x00000002u; } else { @@ -10059,7 +10059,7 @@ inline void FileOptions::clear_go_package() { go_package_.ClearToEmpty(); _has_bits_[0] &= ~0x00000004u; } -inline const TProtoStringType& FileOptions::go_package() const { +inline const TProtoStringType& FileOptions::go_package() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.go_package) return _internal_go_package(); } @@ -10086,7 +10086,7 @@ inline TProtoStringType* FileOptions::_internal_mutable_go_package() { _has_bits_[0] |= 0x00000004u; return go_package_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* FileOptions::release_go_package() { +inline TProtoStringType* FileOptions::release_go_package() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.go_package) if (!_internal_has_go_package()) { return nullptr; @@ -10094,7 +10094,7 @@ inline TProtoStringType* FileOptions::release_go_package() { _has_bits_[0] &= ~0x00000004u; return go_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void FileOptions::set_allocated_go_package(TProtoStringType* go_package) { +inline void FileOptions::set_allocated_go_package(TProtoStringType* go_package) { if (go_package != nullptr) { _has_bits_[0] |= 0x00000004u; } else { @@ -10285,7 +10285,7 @@ inline void FileOptions::clear_objc_class_prefix() { objc_class_prefix_.ClearToEmpty(); _has_bits_[0] &= ~0x00000008u; } -inline const TProtoStringType& FileOptions::objc_class_prefix() const { +inline const TProtoStringType& FileOptions::objc_class_prefix() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.objc_class_prefix) return _internal_objc_class_prefix(); } @@ -10312,7 +10312,7 @@ inline TProtoStringType* FileOptions::_internal_mutable_objc_class_prefix() { _has_bits_[0] |= 0x00000008u; return objc_class_prefix_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* FileOptions::release_objc_class_prefix() { +inline TProtoStringType* FileOptions::release_objc_class_prefix() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.objc_class_prefix) if (!_internal_has_objc_class_prefix()) { return nullptr; @@ -10320,7 +10320,7 @@ inline TProtoStringType* FileOptions::release_objc_class_prefix() { _has_bits_[0] &= ~0x00000008u; return objc_class_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void FileOptions::set_allocated_objc_class_prefix(TProtoStringType* objc_class_prefix) { +inline void FileOptions::set_allocated_objc_class_prefix(TProtoStringType* objc_class_prefix) { if (objc_class_prefix != nullptr) { _has_bits_[0] |= 0x00000008u; } else { @@ -10343,7 +10343,7 @@ inline void FileOptions::clear_csharp_namespace() { csharp_namespace_.ClearToEmpty(); _has_bits_[0] &= ~0x00000010u; } -inline const TProtoStringType& FileOptions::csharp_namespace() const { +inline const TProtoStringType& FileOptions::csharp_namespace() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.csharp_namespace) return _internal_csharp_namespace(); } @@ -10370,7 +10370,7 @@ inline TProtoStringType* FileOptions::_internal_mutable_csharp_namespace() { _has_bits_[0] |= 0x00000010u; return csharp_namespace_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* FileOptions::release_csharp_namespace() { +inline TProtoStringType* FileOptions::release_csharp_namespace() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.csharp_namespace) if (!_internal_has_csharp_namespace()) { return nullptr; @@ -10378,7 +10378,7 @@ inline TProtoStringType* FileOptions::release_csharp_namespace() { _has_bits_[0] &= ~0x00000010u; return csharp_namespace_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void FileOptions::set_allocated_csharp_namespace(TProtoStringType* csharp_namespace) { +inline void FileOptions::set_allocated_csharp_namespace(TProtoStringType* csharp_namespace) { if (csharp_namespace != nullptr) { _has_bits_[0] |= 0x00000010u; } else { @@ -11494,7 +11494,7 @@ inline void UninterpretedOption_NamePart::clear_name_part() { name_part_.ClearToEmpty(); _has_bits_[0] &= ~0x00000001u; } -inline const TProtoStringType& UninterpretedOption_NamePart::name_part() const { +inline const TProtoStringType& UninterpretedOption_NamePart::name_part() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.name_part) return _internal_name_part(); } @@ -11521,7 +11521,7 @@ inline TProtoStringType* UninterpretedOption_NamePart::_internal_mutable_name_pa _has_bits_[0] |= 0x00000001u; return name_part_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* UninterpretedOption_NamePart::release_name_part() { +inline TProtoStringType* UninterpretedOption_NamePart::release_name_part() { // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.NamePart.name_part) if (!_internal_has_name_part()) { return nullptr; @@ -11529,7 +11529,7 @@ inline TProtoStringType* UninterpretedOption_NamePart::release_name_part() { _has_bits_[0] &= ~0x00000001u; return name_part_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void UninterpretedOption_NamePart::set_allocated_name_part(TProtoStringType* name_part) { +inline void UninterpretedOption_NamePart::set_allocated_name_part(TProtoStringType* name_part) { if (name_part != nullptr) { _has_bits_[0] |= 0x00000001u; } else { @@ -11624,7 +11624,7 @@ inline void UninterpretedOption::clear_identifier_value() { identifier_value_.ClearToEmpty(); _has_bits_[0] &= ~0x00000001u; } -inline const TProtoStringType& UninterpretedOption::identifier_value() const { +inline const TProtoStringType& UninterpretedOption::identifier_value() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.identifier_value) return _internal_identifier_value(); } @@ -11651,7 +11651,7 @@ inline TProtoStringType* UninterpretedOption::_internal_mutable_identifier_value _has_bits_[0] |= 0x00000001u; return identifier_value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* UninterpretedOption::release_identifier_value() { +inline TProtoStringType* UninterpretedOption::release_identifier_value() { // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.identifier_value) if (!_internal_has_identifier_value()) { return nullptr; @@ -11659,7 +11659,7 @@ inline TProtoStringType* UninterpretedOption::release_identifier_value() { _has_bits_[0] &= ~0x00000001u; return identifier_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void UninterpretedOption::set_allocated_identifier_value(TProtoStringType* identifier_value) { +inline void UninterpretedOption::set_allocated_identifier_value(TProtoStringType* identifier_value) { if (identifier_value != nullptr) { _has_bits_[0] |= 0x00000001u; } else { @@ -11766,7 +11766,7 @@ inline void UninterpretedOption::clear_string_value() { string_value_.ClearToEmpty(); _has_bits_[0] &= ~0x00000002u; } -inline const TProtoStringType& UninterpretedOption::string_value() const { +inline const TProtoStringType& UninterpretedOption::string_value() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.string_value) return _internal_string_value(); } @@ -11793,7 +11793,7 @@ inline TProtoStringType* UninterpretedOption::_internal_mutable_string_value() { _has_bits_[0] |= 0x00000002u; return string_value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* UninterpretedOption::release_string_value() { +inline TProtoStringType* UninterpretedOption::release_string_value() { // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.string_value) if (!_internal_has_string_value()) { return nullptr; @@ -11801,7 +11801,7 @@ inline TProtoStringType* UninterpretedOption::release_string_value() { _has_bits_[0] &= ~0x00000002u; return string_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void UninterpretedOption::set_allocated_string_value(TProtoStringType* string_value) { +inline void UninterpretedOption::set_allocated_string_value(TProtoStringType* string_value) { if (string_value != nullptr) { _has_bits_[0] |= 0x00000002u; } else { @@ -11824,7 +11824,7 @@ inline void UninterpretedOption::clear_aggregate_value() { aggregate_value_.ClearToEmpty(); _has_bits_[0] &= ~0x00000004u; } -inline const TProtoStringType& UninterpretedOption::aggregate_value() const { +inline const TProtoStringType& UninterpretedOption::aggregate_value() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.aggregate_value) return _internal_aggregate_value(); } @@ -11851,7 +11851,7 @@ inline TProtoStringType* UninterpretedOption::_internal_mutable_aggregate_value( _has_bits_[0] |= 0x00000004u; return aggregate_value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* UninterpretedOption::release_aggregate_value() { +inline TProtoStringType* UninterpretedOption::release_aggregate_value() { // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.aggregate_value) if (!_internal_has_aggregate_value()) { return nullptr; @@ -11859,7 +11859,7 @@ inline TProtoStringType* UninterpretedOption::release_aggregate_value() { _has_bits_[0] &= ~0x00000004u; return aggregate_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void UninterpretedOption::set_allocated_aggregate_value(TProtoStringType* aggregate_value) { +inline void UninterpretedOption::set_allocated_aggregate_value(TProtoStringType* aggregate_value) { if (aggregate_value != nullptr) { _has_bits_[0] |= 0x00000004u; } else { @@ -11980,7 +11980,7 @@ inline void SourceCodeInfo_Location::clear_leading_comments() { leading_comments_.ClearToEmpty(); _has_bits_[0] &= ~0x00000001u; } -inline const TProtoStringType& SourceCodeInfo_Location::leading_comments() const { +inline const TProtoStringType& SourceCodeInfo_Location::leading_comments() const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_comments) return _internal_leading_comments(); } @@ -12007,7 +12007,7 @@ inline TProtoStringType* SourceCodeInfo_Location::_internal_mutable_leading_comm _has_bits_[0] |= 0x00000001u; return leading_comments_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* SourceCodeInfo_Location::release_leading_comments() { +inline TProtoStringType* SourceCodeInfo_Location::release_leading_comments() { // @@protoc_insertion_point(field_release:google.protobuf.SourceCodeInfo.Location.leading_comments) if (!_internal_has_leading_comments()) { return nullptr; @@ -12015,7 +12015,7 @@ inline TProtoStringType* SourceCodeInfo_Location::release_leading_comments() { _has_bits_[0] &= ~0x00000001u; return leading_comments_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void SourceCodeInfo_Location::set_allocated_leading_comments(TProtoStringType* leading_comments) { +inline void SourceCodeInfo_Location::set_allocated_leading_comments(TProtoStringType* leading_comments) { if (leading_comments != nullptr) { _has_bits_[0] |= 0x00000001u; } else { @@ -12038,7 +12038,7 @@ inline void SourceCodeInfo_Location::clear_trailing_comments() { trailing_comments_.ClearToEmpty(); _has_bits_[0] &= ~0x00000002u; } -inline const TProtoStringType& SourceCodeInfo_Location::trailing_comments() const { +inline const TProtoStringType& SourceCodeInfo_Location::trailing_comments() const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.trailing_comments) return _internal_trailing_comments(); } @@ -12065,7 +12065,7 @@ inline TProtoStringType* SourceCodeInfo_Location::_internal_mutable_trailing_com _has_bits_[0] |= 0x00000002u; return trailing_comments_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* SourceCodeInfo_Location::release_trailing_comments() { +inline TProtoStringType* SourceCodeInfo_Location::release_trailing_comments() { // @@protoc_insertion_point(field_release:google.protobuf.SourceCodeInfo.Location.trailing_comments) if (!_internal_has_trailing_comments()) { return nullptr; @@ -12073,7 +12073,7 @@ inline TProtoStringType* SourceCodeInfo_Location::release_trailing_comments() { _has_bits_[0] &= ~0x00000002u; return trailing_comments_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void SourceCodeInfo_Location::set_allocated_trailing_comments(TProtoStringType* trailing_comments) { +inline void SourceCodeInfo_Location::set_allocated_trailing_comments(TProtoStringType* trailing_comments) { if (trailing_comments != nullptr) { _has_bits_[0] |= 0x00000002u; } else { @@ -12102,15 +12102,15 @@ inline TProtoStringType* SourceCodeInfo_Location::add_leading_detached_comments( inline const TProtoStringType& SourceCodeInfo_Location::_internal_leading_detached_comments(int index) const { return leading_detached_comments_.Get(index); } -inline const TProtoStringType& SourceCodeInfo_Location::leading_detached_comments(int index) const { +inline const TProtoStringType& SourceCodeInfo_Location::leading_detached_comments(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) return _internal_leading_detached_comments(index); } -inline TProtoStringType* SourceCodeInfo_Location::mutable_leading_detached_comments(int index) { +inline TProtoStringType* SourceCodeInfo_Location::mutable_leading_detached_comments(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) return leading_detached_comments_.Mutable(index); } -inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const TProtoStringType& value) { +inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const TProtoStringType& value) { leading_detached_comments_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } @@ -12131,7 +12131,7 @@ inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, co inline TProtoStringType* SourceCodeInfo_Location::_internal_add_leading_detached_comments() { return leading_detached_comments_.Add(); } -inline void SourceCodeInfo_Location::add_leading_detached_comments(const TProtoStringType& value) { +inline void SourceCodeInfo_Location::add_leading_detached_comments(const TProtoStringType& value) { leading_detached_comments_.Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } @@ -12266,7 +12266,7 @@ inline void GeneratedCodeInfo_Annotation::clear_source_file() { source_file_.ClearToEmpty(); _has_bits_[0] &= ~0x00000001u; } -inline const TProtoStringType& GeneratedCodeInfo_Annotation::source_file() const { +inline const TProtoStringType& GeneratedCodeInfo_Annotation::source_file() const { // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.source_file) return _internal_source_file(); } @@ -12293,7 +12293,7 @@ inline TProtoStringType* GeneratedCodeInfo_Annotation::_internal_mutable_source_ _has_bits_[0] |= 0x00000001u; return source_file_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* GeneratedCodeInfo_Annotation::release_source_file() { +inline TProtoStringType* GeneratedCodeInfo_Annotation::release_source_file() { // @@protoc_insertion_point(field_release:google.protobuf.GeneratedCodeInfo.Annotation.source_file) if (!_internal_has_source_file()) { return nullptr; @@ -12301,7 +12301,7 @@ inline TProtoStringType* GeneratedCodeInfo_Annotation::release_source_file() { _has_bits_[0] &= ~0x00000001u; return source_file_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void GeneratedCodeInfo_Annotation::set_allocated_source_file(TProtoStringType* source_file) { +inline void GeneratedCodeInfo_Annotation::set_allocated_source_file(TProtoStringType* source_file) { if (source_file != nullptr) { _has_bits_[0] |= 0x00000001u; } else { diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor_database.cc b/contrib/libs/protobuf/src/google/protobuf/descriptor_database.cc index d9104f8a2e..b35e0d94fe 100644 --- a/contrib/libs/protobuf/src/google/protobuf/descriptor_database.cc +++ b/contrib/libs/protobuf/src/google/protobuf/descriptor_database.cc @@ -928,7 +928,7 @@ bool DescriptorPoolDatabase::FindAllExtensionNumbers( const Descriptor* extendee = pool_.FindMessageTypeByName(extendee_type); if (extendee == NULL) return false; - std::vector<const FieldDescriptor*> extensions; + std::vector<const FieldDescriptor*> extensions; pool_.FindAllExtensions(extendee, &extensions); for (const FieldDescriptor* extension : extensions) { @@ -946,7 +946,7 @@ MergedDescriptorDatabase::MergedDescriptorDatabase( sources_.push_back(source2); } MergedDescriptorDatabase::MergedDescriptorDatabase( - const std::vector<DescriptorDatabase*>& sources) + const std::vector<DescriptorDatabase*>& sources) : sources_(sources) {} MergedDescriptorDatabase::~MergedDescriptorDatabase() {} @@ -1006,8 +1006,8 @@ bool MergedDescriptorDatabase::FindFileContainingExtension( bool MergedDescriptorDatabase::FindAllExtensionNumbers( const TProtoStringType& extendee_type, std::vector<int>* output) { - std::set<int> merged_results; - std::vector<int> results; + std::set<int> merged_results; + std::vector<int> results; bool success = false; for (DescriptorDatabase* source : sources_) { @@ -1021,7 +1021,7 @@ bool MergedDescriptorDatabase::FindAllExtensionNumbers( } std::copy(merged_results.begin(), merged_results.end(), - std::insert_iterator<std::vector<int> >(*output, output->end())); + std::insert_iterator<std::vector<int> >(*output, output->end())); return success; } diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor_database.h b/contrib/libs/protobuf/src/google/protobuf/descriptor_database.h index ac89ff6e39..0735c0998d 100644 --- a/contrib/libs/protobuf/src/google/protobuf/descriptor_database.h +++ b/contrib/libs/protobuf/src/google/protobuf/descriptor_database.h @@ -103,7 +103,7 @@ class PROTOBUF_EXPORT DescriptorDatabase { // This method has a default implementation that always returns // false. virtual bool FindAllExtensionNumbers(const TProtoStringType& /* extendee_type */, - std::vector<int>* /* output */) { + std::vector<int>* /* output */) { return false; } @@ -205,7 +205,7 @@ class PROTOBUF_EXPORT SimpleDescriptorDatabase : public DescriptorDatabase { Value FindSymbol(const TProtoStringType& name); Value FindExtension(const TProtoStringType& containing_type, int field_number); bool FindAllExtensionNumbers(const TProtoStringType& containing_type, - std::vector<int>* output); + std::vector<int>* output); void FindAllFileNames(std::vector<TProtoStringType>* output); private: @@ -318,11 +318,11 @@ class PROTOBUF_EXPORT EncodedDescriptorDatabase : public DescriptorDatabase { // Keep DescriptorIndex by pointer to hide the implementation to keep a // cleaner header. std::unique_ptr<DescriptorIndex> index_; - std::vector<void*> files_to_delete_; + std::vector<void*> files_to_delete_; // If encoded_file.first is non-NULL, parse the data into *output and return // true, otherwise return false. - bool MaybeParse(std::pair<const void*, int> encoded_file, + bool MaybeParse(std::pair<const void*, int> encoded_file, FileDescriptorProto* output); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EncodedDescriptorDatabase); @@ -379,7 +379,7 @@ class PROTOBUF_EXPORT MergedDescriptorDatabase : public DescriptorDatabase { private: - std::vector<DescriptorDatabase*> sources_; + std::vector<DescriptorDatabase*> sources_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MergedDescriptorDatabase); }; diff --git a/contrib/libs/protobuf/src/google/protobuf/dynamic_message.cc b/contrib/libs/protobuf/src/google/protobuf/dynamic_message.cc index 0d79fbe571..91329ddf1d 100644 --- a/contrib/libs/protobuf/src/google/protobuf/dynamic_message.cc +++ b/contrib/libs/protobuf/src/google/protobuf/dynamic_message.cc @@ -567,7 +567,7 @@ DynamicMessage::~DynamicMessage() { switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: { - const TProtoStringType* default_value = + const TProtoStringType* default_value = reinterpret_cast<const ArenaStringPtr*>( type_info_->prototype->OffsetToPointer( type_info_->offsets[i])) 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 c0c7af1a73..c31730adc6 100644 --- a/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.h +++ b/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.h @@ -188,14 +188,14 @@ class PROTOBUF_EXPORT FieldMask final : int _internal_paths_size() const; public: void clear_paths(); - const TProtoStringType& paths(int index) const; - TProtoStringType* mutable_paths(int index); - void set_paths(int index, const TProtoStringType& value); + 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, const char* value); void set_paths(int index, const char* value, size_t size); - TProtoStringType* add_paths(); - void add_paths(const TProtoStringType& value); + TProtoStringType* add_paths(); + void add_paths(const TProtoStringType& value); void add_paths(TProtoStringType&& value); void add_paths(const char* value); void add_paths(const char* value, size_t size); @@ -246,15 +246,15 @@ inline TProtoStringType* FieldMask::add_paths() { inline const TProtoStringType& FieldMask::_internal_paths(int index) const { return paths_.Get(index); } -inline const TProtoStringType& FieldMask::paths(int index) const { +inline const TProtoStringType& FieldMask::paths(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FieldMask.paths) return _internal_paths(index); } -inline TProtoStringType* FieldMask::mutable_paths(int index) { +inline TProtoStringType* FieldMask::mutable_paths(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FieldMask.paths) return paths_.Mutable(index); } -inline void FieldMask::set_paths(int index, const TProtoStringType& value) { +inline void FieldMask::set_paths(int index, const TProtoStringType& value) { paths_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths) } @@ -275,7 +275,7 @@ inline void FieldMask::set_paths(int index, const char* value, size_t size) { inline TProtoStringType* FieldMask::_internal_add_paths() { return paths_.Add(); } -inline void FieldMask::add_paths(const TProtoStringType& value) { +inline void FieldMask::add_paths(const TProtoStringType& value) { paths_.Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths) } 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 82f48bd1c0..1be6911ed7 100644 --- a/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.cc +++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.cc @@ -904,7 +904,7 @@ void Reflection::Swap(Message* message1, Message* message2) const { template <bool unsafe_shallow_swap> void Reflection::SwapFieldsImpl( Message* message1, Message* message2, - const std::vector<const FieldDescriptor*>& fields) const { + const std::vector<const FieldDescriptor*>& fields) const { if (message1 == message2) return; // TODO(kenton): Other Reflection methods should probably check this too. @@ -1299,7 +1299,7 @@ using internal::CreateUnknownEnumValues; void Reflection::ListFieldsMayFailOnStripped( const Message& message, bool should_fail, - std::vector<const FieldDescriptor*>* output) const { + std::vector<const FieldDescriptor*>* output) const { output->clear(); // Optimization: The default instance never has any fields set. 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 2f111602ec..f4424ebc7e 100644 --- a/contrib/libs/protobuf/src/google/protobuf/generated_message_util.h +++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_util.h @@ -84,7 +84,7 @@ inline To DownCast(From& f) { return PROTOBUF_NAMESPACE_ID::internal::down_cast<To>(f); } - + // This fastpath inlines a single branch instead of having to make the // InitProtobufDefaults function call. // It also generates less inlined code than a function-scope static initializer. diff --git a/contrib/libs/protobuf/src/google/protobuf/io/printer.cc b/contrib/libs/protobuf/src/google/protobuf/io/printer.cc index 83ed7d1f69..e57d1ffc8c 100644 --- a/contrib/libs/protobuf/src/google/protobuf/io/printer.cc +++ b/contrib/libs/protobuf/src/google/protobuf/io/printer.cc @@ -73,7 +73,7 @@ Printer::~Printer() { } bool Printer::GetSubstitutionRange(const char* varname, - std::pair<size_t, size_t>* range) { + std::pair<size_t, size_t>* range) { std::map<TProtoStringType, std::pair<size_t, size_t> >::const_iterator iter = substitutions_.find(varname); if (iter == substitutions_.end()) { @@ -96,7 +96,7 @@ void Printer::Annotate(const char* begin_varname, const char* end_varname, // Can't generate signatures with this Printer. return; } - std::pair<size_t, size_t> begin, end; + std::pair<size_t, size_t> begin, end; if (!GetSubstitutionRange(begin_varname, &begin) || !GetSubstitutionRange(end_varname, &end)) { return; diff --git a/contrib/libs/protobuf/src/google/protobuf/io/printer.h b/contrib/libs/protobuf/src/google/protobuf/io/printer.h index 0f8c3b130c..45178c0bac 100644 --- a/contrib/libs/protobuf/src/google/protobuf/io/printer.h +++ b/contrib/libs/protobuf/src/google/protobuf/io/printer.h @@ -61,7 +61,7 @@ class PROTOBUF_EXPORT AnnotationCollector { // before end_offset are associated with the SourceCodeInfo-style path. virtual void AddAnnotation(size_t begin_offset, size_t end_offset, const TProtoStringType& file_path, - const std::vector<int>& path) = 0; + const std::vector<int>& path) = 0; // TODO(gerbens) I don't see why we need virtuals here. Just a vector of // range, payload pairs stored in a context should suffice. @@ -213,7 +213,7 @@ class PROTOBUF_EXPORT Printer { // of building the location path. return; } - std::vector<int> path; + std::vector<int> path; descriptor->GetLocationPath(&path); Annotate(begin_varname, end_varname, descriptor->file()->name(), path); } @@ -234,7 +234,7 @@ class PROTOBUF_EXPORT Printer { // Annotations aren't turned on for this Printer. return; } - std::vector<int> empty_path; + std::vector<int> empty_path; Annotate(begin_varname, end_varname, file_name, empty_path); } diff --git a/contrib/libs/protobuf/src/google/protobuf/io/tokenizer.cc b/contrib/libs/protobuf/src/google/protobuf/io/tokenizer.cc index c973b6357a..e35252d110 100644 --- a/contrib/libs/protobuf/src/google/protobuf/io/tokenizer.cc +++ b/contrib/libs/protobuf/src/google/protobuf/io/tokenizer.cc @@ -635,12 +635,12 @@ bool Tokenizer::Next() { } else { // Check if the high order bit is set. // The tokenizer is used to parse tomita grammars with non-ascii utf8 chars - // if (current_char_ & 0x80) { + // if (current_char_ & 0x80) { // error_collector_->AddError( // line_, column_, - // StringPrintf("Interpreting non ascii codepoint %d.", - // static_cast<unsigned char>(current_char_))); - // } + // StringPrintf("Interpreting non ascii codepoint %d.", + // static_cast<unsigned char>(current_char_))); + // } NextChar(); current_.type = TYPE_SYMBOL; } diff --git a/contrib/libs/protobuf/src/google/protobuf/io/tokenizer.h b/contrib/libs/protobuf/src/google/protobuf/io/tokenizer.h index c24b7690af..d81c0122a3 100644 --- a/contrib/libs/protobuf/src/google/protobuf/io/tokenizer.h +++ b/contrib/libs/protobuf/src/google/protobuf/io/tokenizer.h @@ -78,7 +78,7 @@ class PROTOBUF_EXPORT ErrorCollector { // Indicates that there was a warning in the input at the given line and // column numbers. The numbers are zero-based, so you may want to add // 1 to each before printing them. - virtual void AddWarning(int /* line */, ColumnNumber /* column */, + virtual void AddWarning(int /* line */, ColumnNumber /* column */, const TProtoStringType& /* message */) {} private: 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 52617e9efe..6872472259 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 @@ -242,7 +242,7 @@ bool FileOutputStream::CopyingFileOutputStream::Write(const void* buffer, // =================================================================== -IstreamInputStream::IstreamInputStream(std::istream* input, int block_size) +IstreamInputStream::IstreamInputStream(std::istream* input, int block_size) : copying_input_(input), impl_(©ing_input_, block_size) {} bool IstreamInputStream::Next(const void** data, int* size) { @@ -256,7 +256,7 @@ bool IstreamInputStream::Skip(int count) { return impl_.Skip(count); } int64_t IstreamInputStream::ByteCount() const { return impl_.ByteCount(); } IstreamInputStream::CopyingIstreamInputStream::CopyingIstreamInputStream( - std::istream* input) + std::istream* input) : input_(input) {} IstreamInputStream::CopyingIstreamInputStream::~CopyingIstreamInputStream() {} @@ -273,7 +273,7 @@ int IstreamInputStream::CopyingIstreamInputStream::Read(void* buffer, // =================================================================== -OstreamOutputStream::OstreamOutputStream(std::ostream* output, int block_size) +OstreamOutputStream::OstreamOutputStream(std::ostream* output, int block_size) : copying_output_(output), impl_(©ing_output_, block_size) {} OstreamOutputStream::~OstreamOutputStream() { impl_.Flush(); } @@ -287,7 +287,7 @@ void OstreamOutputStream::BackUp(int count) { impl_.BackUp(count); } int64_t OstreamOutputStream::ByteCount() const { return impl_.ByteCount(); } OstreamOutputStream::CopyingOstreamOutputStream::CopyingOstreamOutputStream( - std::ostream* output) + std::ostream* output) : output_(output) {} OstreamOutputStream::CopyingOstreamOutputStream::~CopyingOstreamOutputStream() { diff --git a/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h b/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h index 0206e3887e..83bf574766 100644 --- a/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h +++ b/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h @@ -209,7 +209,7 @@ class PROTOBUF_EXPORT IstreamInputStream : public ZeroCopyInputStream { // If a block_size is given, it specifies the number of bytes that // should be read and returned with each call to Next(). Otherwise, // a reasonable default is used. - explicit IstreamInputStream(std::istream* stream, int block_size = -1); + explicit IstreamInputStream(std::istream* stream, int block_size = -1); // implements ZeroCopyInputStream ---------------------------------- bool Next(const void** data, int* size) override; @@ -220,7 +220,7 @@ class PROTOBUF_EXPORT IstreamInputStream : public ZeroCopyInputStream { private: class PROTOBUF_EXPORT CopyingIstreamInputStream : public CopyingInputStream { public: - CopyingIstreamInputStream(std::istream* input); + CopyingIstreamInputStream(std::istream* input); ~CopyingIstreamInputStream() override; // implements CopyingInputStream --------------------------------- @@ -229,7 +229,7 @@ class PROTOBUF_EXPORT IstreamInputStream : public ZeroCopyInputStream { private: // The stream. - std::istream* input_; + std::istream* input_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingIstreamInputStream); }; @@ -252,7 +252,7 @@ class PROTOBUF_EXPORT OstreamOutputStream : public ZeroCopyOutputStream { // If a block_size is given, it specifies the size of the buffers // that should be returned by Next(). Otherwise, a reasonable default // is used. - explicit OstreamOutputStream(std::ostream* stream, int block_size = -1); + explicit OstreamOutputStream(std::ostream* stream, int block_size = -1); ~OstreamOutputStream() override; // implements ZeroCopyOutputStream --------------------------------- @@ -264,7 +264,7 @@ class PROTOBUF_EXPORT OstreamOutputStream : public ZeroCopyOutputStream { class PROTOBUF_EXPORT CopyingOstreamOutputStream : public CopyingOutputStream { public: - CopyingOstreamOutputStream(std::ostream* output); + CopyingOstreamOutputStream(std::ostream* output); ~CopyingOstreamOutputStream() override; // implements CopyingOutputStream -------------------------------- @@ -272,7 +272,7 @@ class PROTOBUF_EXPORT OstreamOutputStream : public ZeroCopyOutputStream { private: // The stream. - std::ostream* output_; + std::ostream* output_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingOstreamOutputStream); }; diff --git a/contrib/libs/protobuf/src/google/protobuf/json_util.cc b/contrib/libs/protobuf/src/google/protobuf/json_util.cc index 450ce1da57..28ef0f0f87 100644 --- a/contrib/libs/protobuf/src/google/protobuf/json_util.cc +++ b/contrib/libs/protobuf/src/google/protobuf/json_util.cc @@ -1,33 +1,33 @@ #include <google/protobuf/json_util.h> - -namespace google { -namespace protobuf { -namespace io { - + +namespace google { +namespace protobuf { +namespace io { + void PrintJSONString(IOutputStream& stream, const TProtoStringType& string) { - stream << '"'; - for (const char c: string) { - switch(c) { - case '"' : stream << "\\\""; continue; - case '\\': stream << "\\\\"; continue; - case '\b': stream << "\\b"; continue; - case '\f': stream << "\\f"; continue; - case '\n': stream << "\\n"; continue; - case '\r': stream << "\\r"; continue; - case '\t': stream << "\\t"; continue; - } - if ((unsigned char)c < 0x20) { - stream << "\\u00"; - static const char hexDigits[] = "0123456789ABCDEF"; - stream << hexDigits[(c & 0xf0) >> 4]; - stream << hexDigits[(c & 0x0f)]; - continue; - } - stream << c; - } - stream << '"'; -} - -} -} -} + stream << '"'; + for (const char c: string) { + switch(c) { + case '"' : stream << "\\\""; continue; + case '\\': stream << "\\\\"; continue; + case '\b': stream << "\\b"; continue; + case '\f': stream << "\\f"; continue; + case '\n': stream << "\\n"; continue; + case '\r': stream << "\\r"; continue; + case '\t': stream << "\\t"; continue; + } + if ((unsigned char)c < 0x20) { + stream << "\\u00"; + static const char hexDigits[] = "0123456789ABCDEF"; + stream << hexDigits[(c & 0xf0) >> 4]; + stream << hexDigits[(c & 0x0f)]; + continue; + } + stream << c; + } + stream << '"'; +} + +} +} +} diff --git a/contrib/libs/protobuf/src/google/protobuf/json_util.h b/contrib/libs/protobuf/src/google/protobuf/json_util.h index ad3a4a5bfe..e6e836a51c 100644 --- a/contrib/libs/protobuf/src/google/protobuf/json_util.h +++ b/contrib/libs/protobuf/src/google/protobuf/json_util.h @@ -1,30 +1,30 @@ -#pragma once - +#pragma once + #include <google/protobuf/stubs/common.h> - -namespace google { -namespace protobuf { -namespace io { - + +namespace google { +namespace protobuf { +namespace io { + void PrintJSONString(IOutputStream& stream, const TProtoStringType& string); - -template<class T> -struct TAsJSON { -public: - TAsJSON(const T& t) - : T_(t) - { - } - - const T& T_; -}; - -template<class T> + +template<class T> +struct TAsJSON { +public: + TAsJSON(const T& t) + : T_(t) + { + } + + const T& T_; +}; + +template<class T> inline IOutputStream& operator <<(IOutputStream& stream, const TAsJSON<T>& protoAsJSON) { - protoAsJSON.T_.PrintJSON(stream); - return stream; -}; - -} -} -} + protoAsJSON.T_.PrintJSON(stream); + return stream; +}; + +} +} +} diff --git a/contrib/libs/protobuf/src/google/protobuf/message.cc b/contrib/libs/protobuf/src/google/protobuf/message.cc index c90ff50e72..4844366628 100644 --- a/contrib/libs/protobuf/src/google/protobuf/message.cc +++ b/contrib/libs/protobuf/src/google/protobuf/message.cc @@ -177,46 +177,46 @@ void Message::PrintJSON(IOutputStream& out) const { } bool Message::ParseFromArcadiaStream(IInputStream* input) { - bool res = false; - io::TInputStreamProxy proxy(input); - { - io::CopyingInputStreamAdaptor stream(&proxy); - res = ParseFromZeroCopyStream(&stream); - } - return res && !proxy.HasError(); -} + bool res = false; + io::TInputStreamProxy proxy(input); + { + io::CopyingInputStreamAdaptor stream(&proxy); + res = ParseFromZeroCopyStream(&stream); + } + return res && !proxy.HasError(); +} bool Message::ParsePartialFromArcadiaStream(IInputStream* input) { - bool res = false; - io::TInputStreamProxy proxy(input); - { - io::CopyingInputStreamAdaptor stream(&proxy); - res = ParsePartialFromZeroCopyStream(&stream); - } - return res && !proxy.HasError(); -} + bool res = false; + io::TInputStreamProxy proxy(input); + { + io::CopyingInputStreamAdaptor stream(&proxy); + res = ParsePartialFromZeroCopyStream(&stream); + } + return res && !proxy.HasError(); +} bool Message::SerializeToArcadiaStream(IOutputStream* output) const { - bool res = false; - io::TOutputStreamProxy proxy(output); - { - io::CopyingOutputStreamAdaptor stream(&proxy); - res = SerializeToZeroCopyStream(&stream); - } - return res && !proxy.HasError(); -} + bool res = false; + io::TOutputStreamProxy proxy(output); + { + io::CopyingOutputStreamAdaptor stream(&proxy); + res = SerializeToZeroCopyStream(&stream); + } + return res && !proxy.HasError(); +} bool Message::SerializePartialToArcadiaStream(IOutputStream* output) const { - bool res = false; - io::TOutputStreamProxy proxy(output); - { - io::CopyingOutputStreamAdaptor stream(&proxy); - res = SerializePartialToZeroCopyStream(&stream); - } - return res && !proxy.HasError(); -} -// End of Yandex-specific - + bool res = false; + io::TOutputStreamProxy proxy(output); + { + io::CopyingOutputStreamAdaptor stream(&proxy); + res = SerializePartialToZeroCopyStream(&stream); + } + return res && !proxy.HasError(); +} +// End of Yandex-specific + size_t Message::ByteSizeLong() const { size_t size = WireFormat::ByteSize(*this); SetCachedSize(internal::ToCachedSize(size)); diff --git a/contrib/libs/protobuf/src/google/protobuf/message.h b/contrib/libs/protobuf/src/google/protobuf/message.h index 37d92ea393..28e5c33ab2 100644 --- a/contrib/libs/protobuf/src/google/protobuf/message.h +++ b/contrib/libs/protobuf/src/google/protobuf/message.h @@ -338,27 +338,27 @@ class PROTOBUF_EXPORT Message : public MessageLite { uint8* _InternalSerialize(uint8* target, io::EpsCopyOutputStream* stream) const override; - // Yandex-specific + // Yandex-specific bool ParseFromArcadiaStream(IInputStream* input); bool ParsePartialFromArcadiaStream(IInputStream* input); bool SerializeToArcadiaStream(IOutputStream* output) const; bool SerializePartialToArcadiaStream(IOutputStream* output) const; virtual void PrintJSON(IOutputStream&) const; - - io::TAsJSON<Message> AsJSON() const { - return io::TAsJSON<Message>(*this); - } - + + io::TAsJSON<Message> AsJSON() const { + return io::TAsJSON<Message>(*this); + } + internal::TAsBinary AsBinary() const { return internal::TAsBinary{*this}; - } - + } + internal::TAsStreamSeq AsStreamSeq() const { return internal::TAsStreamSeq{*this}; - } - // End of Yandex-specific - + } + // End of Yandex-specific + private: // This is called only by the default implementation of ByteSize(), to // update the cached size. If you override ByteSize(), you do not need diff --git a/contrib/libs/protobuf/src/google/protobuf/messagext.cc b/contrib/libs/protobuf/src/google/protobuf/messagext.cc index 1923205598..e017be50a6 100644 --- a/contrib/libs/protobuf/src/google/protobuf/messagext.cc +++ b/contrib/libs/protobuf/src/google/protobuf/messagext.cc @@ -2,22 +2,22 @@ #include <google/protobuf/io/zero_copy_stream_impl.h> #include <google/protobuf/messagext.h> #include <google/protobuf/text_format.h> - -#include <util/ysaveload.h> -#include <util/generic/yexception.h> -#include <util/stream/length.h> - -namespace { - const int MaxSizeBytes = 1 << 27; // 128 MB limits the size of a protobuf message processed by TProtoSerializer -} - + +#include <util/ysaveload.h> +#include <util/generic/yexception.h> +#include <util/stream/length.h> + +namespace { + const int MaxSizeBytes = 1 << 27; // 128 MB limits the size of a protobuf message processed by TProtoSerializer +} + namespace google::protobuf { //defined in message_lite.cc TProtoStringType InitializationErrorMessage(const char* action, const MessageLite& message); } // namespace google::protobuf - + namespace google::protobuf::internal { IOutputStream& operator <<(IOutputStream& output, const internal::TAsBinary& wrappedMessage) { @@ -38,42 +38,42 @@ namespace google::protobuf::internal { namespace google::protobuf::io { -bool ParseFromCodedStreamSeq(Message* msg, io::CodedInputStream* input) { - msg->Clear(); - ui32 size; - if (!input->ReadVarint32(&size)) { - return false; - } - - io::CodedInputStream::Limit limitState = input->PushLimit(size); - bool res = msg->ParseFromCodedStream(input); - input->PopLimit(limitState); - return res; -} - -bool ParseFromZeroCopyStreamSeq(Message* msg, io::ZeroCopyInputStream* input) { - io::CodedInputStream decoder(input); - return ParseFromCodedStreamSeq(msg, &decoder); -} - -bool SerializePartialToCodedStreamSeq(const Message* msg, io::CodedOutputStream* output) { - uint32 size = msg->ByteSize(); // Force size to be cached. - output->WriteVarint32(size); - msg->SerializeWithCachedSizes(output); - return !output->HadError(); -} - -bool SerializeToCodedStreamSeq(const Message* msg, io::CodedOutputStream* output) { - GOOGLE_DCHECK(msg->IsInitialized()) << InitializationErrorMessage("serialize", *msg); - return SerializePartialToCodedStreamSeq(msg, output); -} - -bool SerializeToZeroCopyStreamSeq(const Message* msg, io::ZeroCopyOutputStream* output) { - io::CodedOutputStream encoder(output); - return SerializeToCodedStreamSeq(msg, &encoder); -} - - +bool ParseFromCodedStreamSeq(Message* msg, io::CodedInputStream* input) { + msg->Clear(); + ui32 size; + if (!input->ReadVarint32(&size)) { + return false; + } + + io::CodedInputStream::Limit limitState = input->PushLimit(size); + bool res = msg->ParseFromCodedStream(input); + input->PopLimit(limitState); + return res; +} + +bool ParseFromZeroCopyStreamSeq(Message* msg, io::ZeroCopyInputStream* input) { + io::CodedInputStream decoder(input); + return ParseFromCodedStreamSeq(msg, &decoder); +} + +bool SerializePartialToCodedStreamSeq(const Message* msg, io::CodedOutputStream* output) { + uint32 size = msg->ByteSize(); // Force size to be cached. + output->WriteVarint32(size); + msg->SerializeWithCachedSizes(output); + return !output->HadError(); +} + +bool SerializeToCodedStreamSeq(const Message* msg, io::CodedOutputStream* output) { + GOOGLE_DCHECK(msg->IsInitialized()) << InitializationErrorMessage("serialize", *msg); + return SerializePartialToCodedStreamSeq(msg, output); +} + +bool SerializeToZeroCopyStreamSeq(const Message* msg, io::ZeroCopyOutputStream* output) { + io::CodedOutputStream encoder(output); + return SerializeToCodedStreamSeq(msg, &encoder); +} + + int TInputStreamProxy::Read(void* buffer, int size) { try { return (int)mSlave->Read(buffer, (size_t)size); @@ -85,7 +85,7 @@ int TInputStreamProxy::Read(void* buffer, int size) { TErrorState::SetError(); return -1; } - + bool TOutputStreamProxy::Write(const void* buffer, int size) { try { @@ -102,110 +102,110 @@ bool TOutputStreamProxy::Write(const void* buffer, int size) { void TProtoSerializer::Save(IOutputStream* out, const Message& msg) { - int size = msg.ByteSize(); - if (size > MaxSizeBytes) { - ythrow yexception() << "Message size " << size << " exceeds " << MaxSizeBytes; - } - - TCopyingOutputStreamAdaptor adaptor(out); - io::CodedOutputStream encoder(&adaptor); - if (!SerializeToCodedStreamSeq(&msg, &encoder)) - ythrow yexception() << "Cannot write protobuf::Message to output stream"; -} - + int size = msg.ByteSize(); + if (size > MaxSizeBytes) { + ythrow yexception() << "Message size " << size << " exceeds " << MaxSizeBytes; + } + + TCopyingOutputStreamAdaptor adaptor(out); + io::CodedOutputStream encoder(&adaptor); + if (!SerializeToCodedStreamSeq(&msg, &encoder)) + ythrow yexception() << "Cannot write protobuf::Message to output stream"; +} + // Reading varint32 directly from IInputStream (might be slow if input requires buffering). -// Copy-pasted with small modifications from protobuf/io/coded_stream (ReadVarint32FromArray) - -// Returns true if succeeded, false if stream has ended, throws exception if data is corrupted +// Copy-pasted with small modifications from protobuf/io/coded_stream (ReadVarint32FromArray) + +// Returns true if succeeded, false if stream has ended, throws exception if data is corrupted static bool ReadVarint32(IInputStream* input, ui32& size) { - size_t res; - ui8 b; - - /* if we can't read anything from stream - it is exhausted */ - if (input->Read(&b, 1) == 0) - return false; - res = (b & 0x7F) ; if (!(b & 0x80)) goto done; - ::Load(input, b); res |= (b & 0x7F) << 7; if (!(b & 0x80)) goto done; - ::Load(input, b); res |= (b & 0x7F) << 14; if (!(b & 0x80)) goto done; - ::Load(input, b); res |= (b & 0x7F) << 21; if (!(b & 0x80)) goto done; - ::Load(input, b); res |= b << 28; if (!(b & 0x80)) goto done; - - // If the input is larger than 32 bits, we still need to read it all - // and discard the high-order bits. - for (int i = 0; i < 5; i++) { - ::Load(input, b); if (!(b & 0x80)) goto done; - } - ythrow yexception() << "We have overrun the maximum size of a varint (10 bytes). Assume the data is corrupt."; - -done: - size = res; - return true; -} - -class TTempBufHelper { -public: - TTempBufHelper(size_t size) { - if (size <= SmallBufSize) { - Buffer = SmallBuf; - } else { - LargeBuf.Reset(new TTempBuf(size)); - Buffer = reinterpret_cast<ui8*>(LargeBuf->Data()); - } - } - - ui8* Data() { - return Buffer; - } - -private: - static const size_t SmallBufSize = 1024; - ui8 SmallBuf[SmallBufSize]; - - THolder<TTempBuf> LargeBuf; - - ui8* Buffer; -}; - + size_t res; + ui8 b; + + /* if we can't read anything from stream - it is exhausted */ + if (input->Read(&b, 1) == 0) + return false; + res = (b & 0x7F) ; if (!(b & 0x80)) goto done; + ::Load(input, b); res |= (b & 0x7F) << 7; if (!(b & 0x80)) goto done; + ::Load(input, b); res |= (b & 0x7F) << 14; if (!(b & 0x80)) goto done; + ::Load(input, b); res |= (b & 0x7F) << 21; if (!(b & 0x80)) goto done; + ::Load(input, b); res |= b << 28; if (!(b & 0x80)) goto done; + + // If the input is larger than 32 bits, we still need to read it all + // and discard the high-order bits. + for (int i = 0; i < 5; i++) { + ::Load(input, b); if (!(b & 0x80)) goto done; + } + ythrow yexception() << "We have overrun the maximum size of a varint (10 bytes). Assume the data is corrupt."; + +done: + size = res; + return true; +} + +class TTempBufHelper { +public: + TTempBufHelper(size_t size) { + if (size <= SmallBufSize) { + Buffer = SmallBuf; + } else { + LargeBuf.Reset(new TTempBuf(size)); + Buffer = reinterpret_cast<ui8*>(LargeBuf->Data()); + } + } + + ui8* Data() { + return Buffer; + } + +private: + static const size_t SmallBufSize = 1024; + ui8 SmallBuf[SmallBufSize]; + + THolder<TTempBuf> LargeBuf; + + ui8* Buffer; +}; + void TProtoSerializer::Load(IInputStream* input, Message& msg) { msg.Clear(); MergeFrom(input, msg); } void TProtoSerializer::MergeFrom(IInputStream* input, Message& msg) { - ui32 size; - if (!ReadVarint32(input, size)) - ythrow yexception() << "Stream is exhausted"; - - TTempBufHelper buf(size); - ::LoadPodArray(input, buf.Data(), size); - CodedInputStream decoder(buf.Data(), size); + ui32 size; + if (!ReadVarint32(input, size)) + ythrow yexception() << "Stream is exhausted"; + + TTempBufHelper buf(size); + ::LoadPodArray(input, buf.Data(), size); + CodedInputStream decoder(buf.Data(), size); decoder.SetTotalBytesLimit(MaxSizeBytes); if (!msg.MergeFromCodedStream(&decoder)) - ythrow yexception() << "Cannot read protobuf::Message (" << msg.GetTypeName() << ") from input stream"; -} - + ythrow yexception() << "Cannot read protobuf::Message (" << msg.GetTypeName() << ") from input stream"; +} + TProtoReader::TProtoReader(IInputStream* input, const size_t bufferSize) - : IStream(input) - , Buffer(bufferSize) -{ -} - - -bool TProtoReader::Load(Message& msg) { - ui32 size; - if (!ReadVarint32(IStream, size)) - return false; - - Buffer.Reserve(size); - - ::LoadPodArray(IStream, Buffer.Data(), size); - CodedInputStream decoder((const ui8*)Buffer.Data(), size); - if (!msg.ParseFromCodedStream(&decoder)) - ythrow yexception() << "Cannot read protobuf::Message from input stream"; - - return true; -} - + : IStream(input) + , Buffer(bufferSize) +{ +} + + +bool TProtoReader::Load(Message& msg) { + ui32 size; + if (!ReadVarint32(IStream, size)) + return false; + + Buffer.Reserve(size); + + ::LoadPodArray(IStream, Buffer.Data(), size); + CodedInputStream decoder((const ui8*)Buffer.Data(), size); + if (!msg.ParseFromCodedStream(&decoder)) + ythrow yexception() << "Cannot read protobuf::Message from input stream"; + + return true; +} + } // namespace google::protobuf::io TProtoStringType ShortUtf8DebugString(const google::protobuf::Message& msg) { @@ -223,4 +223,4 @@ TProtoStringType ShortUtf8DebugString(const google::protobuf::Message& msg) { } return string; -} +} diff --git a/contrib/libs/protobuf/src/google/protobuf/messagext.h b/contrib/libs/protobuf/src/google/protobuf/messagext.h index 9176cee1e8..377bf599b0 100644 --- a/contrib/libs/protobuf/src/google/protobuf/messagext.h +++ b/contrib/libs/protobuf/src/google/protobuf/messagext.h @@ -1,16 +1,16 @@ #pragma once - + #include <google/protobuf/stubs/port.h> #include <google/protobuf/io/coded_stream.h> #include <util/stream/output.h> -#include <util/generic/buffer.h> - +#include <util/generic/buffer.h> + #include <google/protobuf/io/zero_copy_stream_impl.h> - -/// this file is Yandex extensions to protobuf - -namespace google { -namespace protobuf { + +/// this file is Yandex extensions to protobuf + +namespace google { +namespace protobuf { class Message; @@ -28,139 +28,139 @@ struct TAsStreamSeq { } // namespace internal -namespace io { - -/// Parse*Seq methods read message size from stream to find a message boundary +namespace io { + +/// Parse*Seq methods read message size from stream to find a message boundary /// there is not parse from IInputStream, because it is not push-backable - -bool ParseFromCodedStreamSeq(Message* msg, io::CodedInputStream* input); -bool ParseFromZeroCopyStreamSeq(Message* msg, io::ZeroCopyInputStream* input); - -/// Serialize*Seq methods write message size as varint before writing a message + +bool ParseFromCodedStreamSeq(Message* msg, io::CodedInputStream* input); +bool ParseFromZeroCopyStreamSeq(Message* msg, io::ZeroCopyInputStream* input); + +/// Serialize*Seq methods write message size as varint before writing a message /// there is no serialize to IOutputStream, because it is not push-backable - -bool SerializePartialToCodedStreamSeq(const Message* msg, io::CodedOutputStream* output); -bool SerializeToCodedStreamSeq(const Message* msg, io::CodedOutputStream* output); -bool SerializeToZeroCopyStreamSeq(const Message* msg, io::ZeroCopyOutputStream* output); - -class TErrorState { -public: - TErrorState() - : HasError_(false) - { - } - bool HasError() const { - return HasError_; - } - void SetError() { - HasError_ = true; - } -private: - bool HasError_; -}; - -class TInputStreamProxy: public io::CopyingInputStream, public TErrorState { - public: + +bool SerializePartialToCodedStreamSeq(const Message* msg, io::CodedOutputStream* output); +bool SerializeToCodedStreamSeq(const Message* msg, io::CodedOutputStream* output); +bool SerializeToZeroCopyStreamSeq(const Message* msg, io::ZeroCopyOutputStream* output); + +class TErrorState { +public: + TErrorState() + : HasError_(false) + { + } + bool HasError() const { + return HasError_; + } + void SetError() { + HasError_ = true; + } +private: + bool HasError_; +}; + +class TInputStreamProxy: public io::CopyingInputStream, public TErrorState { + public: inline TInputStreamProxy(IInputStream* slave) - : mSlave(slave) - { - } - + : mSlave(slave) + { + } + virtual int Read(void* buffer, int size); - - private: + + private: IInputStream* mSlave; -}; - -class TOutputStreamProxy: public io::CopyingOutputStream, public TErrorState { - public: +}; + +class TOutputStreamProxy: public io::CopyingOutputStream, public TErrorState { + public: inline TOutputStreamProxy(IOutputStream* slave) - : mSlave(slave) - { - } - + : mSlave(slave) + { + } + virtual bool Write(const void* buffer, int size); - - private: + + private: IOutputStream* mSlave; -}; - - -class TCopyingInputStreamAdaptor: public TInputStreamProxy, public CopyingInputStreamAdaptor { -public: +}; + + +class TCopyingInputStreamAdaptor: public TInputStreamProxy, public CopyingInputStreamAdaptor { +public: TCopyingInputStreamAdaptor(IInputStream* inputStream) - : TInputStreamProxy(inputStream) - , CopyingInputStreamAdaptor(this) - { } -}; - -class TCopyingOutputStreamAdaptor: public TOutputStreamProxy, public CopyingOutputStreamAdaptor { -public: + : TInputStreamProxy(inputStream) + , CopyingInputStreamAdaptor(this) + { } +}; + +class TCopyingOutputStreamAdaptor: public TOutputStreamProxy, public CopyingOutputStreamAdaptor { +public: TCopyingOutputStreamAdaptor(IOutputStream* outputStream) - : TOutputStreamProxy(outputStream) - , CopyingOutputStreamAdaptor(this) - { } -}; - - -class TProtoSerializer { -public: + : TOutputStreamProxy(outputStream) + , CopyingOutputStreamAdaptor(this) + { } +}; + + +class TProtoSerializer { +public: static void Save(IOutputStream* output, const Message& msg); static void Load(IInputStream* input, Message& msg); static void MergeFrom(IInputStream* input, Message& msg); - - // similar interface for protobuf coded streams - static inline bool Save(CodedOutputStream* output, const Message& msg) { - return SerializeToCodedStreamSeq(&msg, output); - } - - static inline bool Load(CodedInputStream* input, Message& msg) { - return ParseFromCodedStreamSeq(&msg, input); - } -}; - - -/** - * Special separate simple reader of protobuf files from arcadic streams - * with static one time allocated buffer. - * - * Data can be prepared with TProtoSerializer::Save, format is the same. - * - */ -class TProtoReader { -public: + + // similar interface for protobuf coded streams + static inline bool Save(CodedOutputStream* output, const Message& msg) { + return SerializeToCodedStreamSeq(&msg, output); + } + + static inline bool Load(CodedInputStream* input, Message& msg) { + return ParseFromCodedStreamSeq(&msg, input); + } +}; + + +/** + * Special separate simple reader of protobuf files from arcadic streams + * with static one time allocated buffer. + * + * Data can be prepared with TProtoSerializer::Save, format is the same. + * + */ +class TProtoReader { +public: TProtoReader(IInputStream* input, const size_t bufferSize = DefaultBufferSize); - - /** - * Reads protobuf message - * - * @param msg binary compatible protobuf message - * @returns true if read is ok - * false if stream is exhausted - * yexception if input data is corrupted - */ - bool Load(Message& msg); - -private: + + /** + * Reads protobuf message + * + * @param msg binary compatible protobuf message + * @returns true if read is ok + * false if stream is exhausted + * yexception if input data is corrupted + */ + bool Load(Message& msg); + +private: IInputStream* IStream; - TBuffer Buffer; - - static const size_t DefaultBufferSize = (1 << 16); -}; - + TBuffer Buffer; + + static const size_t DefaultBufferSize = (1 << 16); +}; + } // namespace io } // namespace protobuf } // namespace google - -// arcadia-style serialization + +// arcadia-style serialization inline void Save(IOutputStream* output, const google::protobuf::Message& msg) { - google::protobuf::io::TProtoSerializer::Save(output, msg); -} - + google::protobuf::io::TProtoSerializer::Save(output, msg); +} + inline void Load(IInputStream* input, google::protobuf::Message& msg) { - google::protobuf::io::TProtoSerializer::Load(input, msg); -} - -// A mix of ShortDebugString and Utf8DebugString + google::protobuf::io::TProtoSerializer::Load(input, msg); +} + +// A mix of ShortDebugString and Utf8DebugString TProtoStringType ShortUtf8DebugString(const google::protobuf::Message& msg); diff --git a/contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc b/contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc index 3c30edaa6a..798e23a76a 100644 --- a/contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc +++ b/contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc @@ -83,7 +83,7 @@ void ReflectionOps::Merge(const Message& from, Message* to) { bool is_to_generated = (to_reflection->GetMessageFactory() == google::protobuf::MessageFactory::generated_factory()); - std::vector<const FieldDescriptor*> fields; + std::vector<const FieldDescriptor*> fields; from_reflection->ListFieldsOmitStripped(from, &fields); for (const FieldDescriptor* field : fields) { if (field->is_repeated()) { @@ -176,7 +176,7 @@ void ReflectionOps::Merge(const Message& from, Message* to) { void ReflectionOps::Clear(Message* message) { const Reflection* reflection = GetReflectionOrDie(*message); - std::vector<const FieldDescriptor*> fields; + std::vector<const FieldDescriptor*> fields; reflection->ListFieldsOmitStripped(*message, &fields); for (const FieldDescriptor* field : fields) { reflection->ClearField(message, field); @@ -264,7 +264,7 @@ bool ReflectionOps::IsInitialized(const Message& message) { } // Check that sub-messages are initialized. - std::vector<const FieldDescriptor*> fields; + std::vector<const FieldDescriptor*> fields; // Should be safe to skip stripped fields because required fields are not // stripped. reflection->ListFieldsOmitStripped(message, &fields); @@ -324,7 +324,7 @@ void ReflectionOps::DiscardUnknownFields(Message* message) { // Walk through the fields of this message and DiscardUnknownFields on any // messages present. - std::vector<const FieldDescriptor*> fields; + std::vector<const FieldDescriptor*> fields; reflection->ListFields(*message, &fields); for (const FieldDescriptor* field : fields) { // Skip over non-message fields. @@ -395,7 +395,7 @@ void ReflectionOps::FindInitializationErrors(const Message& message, } // Check sub-messages. - std::vector<const FieldDescriptor*> fields; + std::vector<const FieldDescriptor*> fields; reflection->ListFieldsOmitStripped(message, &fields); for (const FieldDescriptor* field : fields) { if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { diff --git a/contrib/libs/protobuf/src/google/protobuf/repeated_field.h b/contrib/libs/protobuf/src/google/protobuf/repeated_field.h index cb9205a63a..7f961c9209 100644 --- a/contrib/libs/protobuf/src/google/protobuf/repeated_field.h +++ b/contrib/libs/protobuf/src/google/protobuf/repeated_field.h @@ -652,7 +652,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { void Reserve(int new_size); - template<typename TypeHandler> + template<typename TypeHandler> void Truncate(int new_size) { GOOGLE_DCHECK_LE(new_size, current_size_); for (int i = new_size; i < current_size_; i++) { @@ -660,7 +660,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { } current_size_ = new_size; } - + int Capacity() const; template <typename TypeHandler> @@ -1000,7 +1000,7 @@ class RepeatedPtrField : private internal::RepeatedPtrFieldBase { void Truncate(int new_size) { return RepeatedPtrFieldBase::Truncate<TypeHandler>(new_size); } - + int Capacity() const; // Gets the underlying array. This pointer is possibly invalidated by 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 d90cb42cd1..2bd515da20 100644 --- a/contrib/libs/protobuf/src/google/protobuf/source_context.pb.h +++ b/contrib/libs/protobuf/src/google/protobuf/source_context.pb.h @@ -184,12 +184,12 @@ class PROTOBUF_EXPORT SourceContext final : }; // string file_name = 1; void clear_file_name(); - const TProtoStringType& file_name() const; + const TProtoStringType& file_name() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_file_name(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_file_name(); + TProtoStringType* mutable_file_name(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_file_name(); - void set_allocated_file_name(TProtoStringType* file_name); + void set_allocated_file_name(TProtoStringType* file_name); private: const TProtoStringType& _internal_file_name() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_file_name(const TProtoStringType& value); @@ -222,7 +222,7 @@ class PROTOBUF_EXPORT SourceContext final : inline void SourceContext::clear_file_name() { file_name_.ClearToEmpty(); } -inline const TProtoStringType& SourceContext::file_name() const { +inline const TProtoStringType& SourceContext::file_name() const { // @@protoc_insertion_point(field_get:google.protobuf.SourceContext.file_name) return _internal_file_name(); } @@ -249,11 +249,11 @@ inline TProtoStringType* SourceContext::_internal_mutable_file_name() { return file_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* SourceContext::release_file_name() { +inline TProtoStringType* SourceContext::release_file_name() { // @@protoc_insertion_point(field_release:google.protobuf.SourceContext.file_name) return file_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void SourceContext::set_allocated_file_name(TProtoStringType* file_name) { +inline void SourceContext::set_allocated_file_name(TProtoStringType* file_name) { if (file_name != nullptr) { } else { diff --git a/contrib/libs/protobuf/src/google/protobuf/struct.pb.h b/contrib/libs/protobuf/src/google/protobuf/struct.pb.h index 3db06d3258..36e93ec3da 100644 --- a/contrib/libs/protobuf/src/google/protobuf/struct.pb.h +++ b/contrib/libs/protobuf/src/google/protobuf/struct.pb.h @@ -446,12 +446,12 @@ class PROTOBUF_EXPORT Value final : bool _internal_has_string_value() const; public: void clear_string_value(); - const TProtoStringType& string_value() const; + const TProtoStringType& string_value() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_string_value(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_string_value(); + TProtoStringType* mutable_string_value(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_string_value(); - void set_allocated_string_value(TProtoStringType* string_value); + void set_allocated_string_value(TProtoStringType* string_value); private: const TProtoStringType& _internal_string_value() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_string_value(const TProtoStringType& value); @@ -826,7 +826,7 @@ inline void Value::clear_string_value() { clear_has_kind(); } } -inline const TProtoStringType& Value::string_value() const { +inline const TProtoStringType& Value::string_value() const { // @@protoc_insertion_point(field_get:google.protobuf.Value.string_value) return _internal_string_value(); } @@ -868,7 +868,7 @@ inline TProtoStringType* Value::_internal_mutable_string_value() { return kind_.string_value_.Mutable( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Value::release_string_value() { +inline TProtoStringType* Value::release_string_value() { // @@protoc_insertion_point(field_release:google.protobuf.Value.string_value) if (_internal_has_string_value()) { clear_has_kind(); @@ -877,7 +877,7 @@ inline TProtoStringType* Value::release_string_value() { return nullptr; } } -inline void Value::set_allocated_string_value(TProtoStringType* string_value) { +inline void Value::set_allocated_string_value(TProtoStringType* string_value) { if (has_kind()) { clear_kind(); } diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/common.cc b/contrib/libs/protobuf/src/google/protobuf/stubs/common.cc index 1bf0618a79..8d1c480214 100644 --- a/contrib/libs/protobuf/src/google/protobuf/stubs/common.cc +++ b/contrib/libs/protobuf/src/google/protobuf/stubs/common.cc @@ -43,7 +43,7 @@ #define WIN32_LEAN_AND_MEAN // We only need minimal includes #endif #include <windows.h> -#define snprintf _snprintf // see comment in strutil.cc +#define snprintf _snprintf // see comment in strutil.cc #elif defined(HAVE_PTHREAD) #include <pthread.h> #else diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/common.h b/contrib/libs/protobuf/src/google/protobuf/stubs/common.h index e4fae2d68e..b1661f695a 100644 --- a/contrib/libs/protobuf/src/google/protobuf/stubs/common.h +++ b/contrib/libs/protobuf/src/google/protobuf/stubs/common.h @@ -198,11 +198,11 @@ using string = TProtoStringType; } // namespace protobuf } // namespace google -namespace NProtoBuf { - using namespace google; - using namespace google::protobuf; -}; - +namespace NProtoBuf { + using namespace google; + using namespace google::protobuf; +}; + #include <google/protobuf/port_undef.inc> #endif // GOOGLE_PROTOBUF_COMMON_H__ diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/int128.cc b/contrib/libs/protobuf/src/google/protobuf/stubs/int128.cc index f008ce8d26..0d1c23a95a 100644 --- a/contrib/libs/protobuf/src/google/protobuf/stubs/int128.cc +++ b/contrib/libs/protobuf/src/google/protobuf/stubs/int128.cc @@ -177,7 +177,7 @@ std::ostream& operator<<(std::ostream& o, const uint128& b) { if ((flags & std::ios::adjustfield) == std::ios::left) { rep.append(width - rep.size(), o.fill()); } else { - rep.insert(static_cast<TProtoStringType::size_type>(0), + rep.insert(static_cast<TProtoStringType::size_type>(0), width - rep.size(), o.fill()); } } diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/logging.h b/contrib/libs/protobuf/src/google/protobuf/stubs/logging.h index 61a271434f..48d0ff15ec 100644 --- a/contrib/libs/protobuf/src/google/protobuf/stubs/logging.h +++ b/contrib/libs/protobuf/src/google/protobuf/stubs/logging.h @@ -75,7 +75,7 @@ class PROTOBUF_EXPORT LogMessage { LogMessage(LogLevel level, const char* filename, int line); ~LogMessage(); - LogMessage& operator<<(const TProtoStringType& value); + LogMessage& operator<<(const TProtoStringType& value); LogMessage& operator<<(const char* value); LogMessage& operator<<(char value); LogMessage& operator<<(int value); @@ -97,7 +97,7 @@ class PROTOBUF_EXPORT LogMessage { LogLevel level_; const char* filename_; int line_; - TProtoStringType message_; + TProtoStringType message_; }; // Used to make the entire "LOG(BLAH) << etc." expression have a void return @@ -201,7 +201,7 @@ T* CheckNotNull(const char* /* file */, int /* line */, #endif // !NDEBUG typedef void LogHandler(LogLevel level, const char* filename, int line, - const TProtoStringType& message); + const TProtoStringType& message); // The protobuf library sometimes writes warning and error messages to // stderr. These messages are primarily useful for developers, but may diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/port.h b/contrib/libs/protobuf/src/google/protobuf/stubs/port.h index bc0be2b828..9cb67f2aa1 100644 --- a/contrib/libs/protobuf/src/google/protobuf/stubs/port.h +++ b/contrib/libs/protobuf/src/google/protobuf/stubs/port.h @@ -134,13 +134,13 @@ typedef unsigned int uint; typedef int8_t int8; typedef int16_t int16; -typedef i32 int32; -typedef i64 int64; +typedef i32 int32; +typedef i64 int64; typedef uint8_t uint8; typedef uint16_t uint16; -typedef ui32 uint32; -typedef ui64 uint64; +typedef ui32 uint32; +typedef ui64 uint64; static const int32 kint32max = 0x7FFFFFFF; static const int32 kint32min = -kint32max - 1; diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc b/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc index 9cb53a08a8..477451f1e1 100644 --- a/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc +++ b/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc @@ -1246,10 +1246,10 @@ char* DoubleToBuffer(double value, char* buffer) { // this assert. static_assert(DBL_DIG < 20, "DBL_DIG_is_too_big"); - if (value == std::numeric_limits<double>::infinity()) { + if (value == std::numeric_limits<double>::infinity()) { strcpy(buffer, "inf"); return buffer; - } else if (value == -std::numeric_limits<double>::infinity()) { + } else if (value == -std::numeric_limits<double>::infinity()) { strcpy(buffer, "-inf"); return buffer; } else if (std::isnan(value)) { @@ -1364,10 +1364,10 @@ char* FloatToBuffer(float value, char* buffer) { // this assert. static_assert(FLT_DIG < 10, "FLT_DIG_is_too_big"); - if (value == std::numeric_limits<double>::infinity()) { + if (value == std::numeric_limits<double>::infinity()) { strcpy(buffer, "inf"); return buffer; - } else if (value == -std::numeric_limits<double>::infinity()) { + } else if (value == -std::numeric_limits<double>::infinity()) { strcpy(buffer, "-inf"); return buffer; } else if (std::isnan(value)) { diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h b/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h index 06610ccfd6..89e41d9883 100644 --- a/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h +++ b/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h @@ -177,11 +177,11 @@ PROTOBUF_EXPORT void StripWhitespace(TProtoStringType* s); // ---------------------------------------------------------------------- inline void LowerString(TProtoStringType* s) { - s->to_lower(); + s->to_lower(); } inline void UpperString(TProtoStringType* s) { - s->to_upper(); + s->to_upper(); } inline void ToUpper(TProtoStringType* s) { UpperString(s); } diff --git a/contrib/libs/protobuf/src/google/protobuf/text_format.cc b/contrib/libs/protobuf/src/google/protobuf/text_format.cc index 93a2ea8ed3..fadcd7e554 100644 --- a/contrib/libs/protobuf/src/google/protobuf/text_format.cc +++ b/contrib/libs/protobuf/src/google/protobuf/text_format.cc @@ -162,7 +162,7 @@ TextFormat::ParseLocation TextFormat::ParseInfoTree::GetLocation( index = 0; } - const std::vector<TextFormat::ParseLocation>* locations = + const std::vector<TextFormat::ParseLocation>* locations = FindOrNull(locations_, field); if (locations == nullptr || index >= static_cast<int64>(locations->size())) { return TextFormat::ParseLocation(); @@ -2110,7 +2110,7 @@ void TextFormat::Printer::Print(const Message& message, PrintAny(message, generator)) { return; } - std::vector<const FieldDescriptor*> fields; + std::vector<const FieldDescriptor*> fields; if (descriptor->options().map_entry()) { fields.push_back(descriptor->field(0)); fields.push_back(descriptor->field(1)); diff --git a/contrib/libs/protobuf/src/google/protobuf/text_format.h b/contrib/libs/protobuf/src/google/protobuf/text_format.h index 0b70f0640a..3a7e811ed8 100644 --- a/contrib/libs/protobuf/src/google/protobuf/text_format.h +++ b/contrib/libs/protobuf/src/google/protobuf/text_format.h @@ -596,7 +596,7 @@ class PROTOBUF_EXPORT TextFormat { // if possible. void AllowUnknownField(bool allow) { allow_unknown_field_ = allow; } - + void AllowFieldNumber(bool allow) { allow_field_number_ = allow; } // Sets maximum recursion depth which parser can use. This is effectively diff --git a/contrib/libs/protobuf/src/google/protobuf/type.pb.h b/contrib/libs/protobuf/src/google/protobuf/type.pb.h index a99c06d180..6b0a309467 100644 --- a/contrib/libs/protobuf/src/google/protobuf/type.pb.h +++ b/contrib/libs/protobuf/src/google/protobuf/type.pb.h @@ -324,14 +324,14 @@ class PROTOBUF_EXPORT Type final : int _internal_oneofs_size() const; public: void clear_oneofs(); - const TProtoStringType& oneofs(int index) const; - TProtoStringType* mutable_oneofs(int index); - void set_oneofs(int index, const TProtoStringType& value); + 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, const char* value); void set_oneofs(int index, const char* value, size_t size); - TProtoStringType* add_oneofs(); - void add_oneofs(const TProtoStringType& value); + TProtoStringType* add_oneofs(); + void add_oneofs(const TProtoStringType& value); void add_oneofs(TProtoStringType&& value); void add_oneofs(const char* value); void add_oneofs(const char* value, size_t size); @@ -663,12 +663,12 @@ class PROTOBUF_EXPORT Field final : // string name = 4; void clear_name(); - const TProtoStringType& name() const; + 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); @@ -677,12 +677,12 @@ class PROTOBUF_EXPORT Field final : // string type_url = 6; void clear_type_url(); - const TProtoStringType& type_url() const; + const TProtoStringType& type_url() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_type_url(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_type_url(); + TProtoStringType* mutable_type_url(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_type_url(); - void set_allocated_type_url(TProtoStringType* type_url); + void set_allocated_type_url(TProtoStringType* type_url); private: const TProtoStringType& _internal_type_url() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_type_url(const TProtoStringType& value); @@ -691,12 +691,12 @@ class PROTOBUF_EXPORT Field final : // string json_name = 10; void clear_json_name(); - const TProtoStringType& json_name() const; + const TProtoStringType& json_name() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_json_name(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_json_name(); + TProtoStringType* mutable_json_name(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_json_name(); - void set_allocated_json_name(TProtoStringType* json_name); + void set_allocated_json_name(TProtoStringType* json_name); private: const TProtoStringType& _internal_json_name() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_json_name(const TProtoStringType& value); @@ -705,12 +705,12 @@ class PROTOBUF_EXPORT Field final : // string default_value = 11; void clear_default_value(); - const TProtoStringType& default_value() const; + const TProtoStringType& default_value() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_default_value(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_default_value(); + TProtoStringType* mutable_default_value(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_default_value(); - void set_allocated_default_value(TProtoStringType* default_value); + void set_allocated_default_value(TProtoStringType* default_value); private: const TProtoStringType& _internal_default_value() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_default_value(const TProtoStringType& value); @@ -1138,12 +1138,12 @@ class PROTOBUF_EXPORT EnumValue final : // string name = 1; void clear_name(); - const TProtoStringType& name() const; + 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); @@ -1294,12 +1294,12 @@ class PROTOBUF_EXPORT Option final : }; // string name = 1; void clear_name(); - const TProtoStringType& name() const; + 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); @@ -1351,7 +1351,7 @@ class PROTOBUF_EXPORT Option final : inline void Type::clear_name() { name_.ClearToEmpty(); } -inline const TProtoStringType& Type::name() const { +inline const TProtoStringType& Type::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Type.name) return _internal_name(); } @@ -1378,11 +1378,11 @@ inline TProtoStringType* Type::_internal_mutable_name() { return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Type::release_name() { +inline TProtoStringType* Type::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Type.name) return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Type::set_allocated_name(TProtoStringType* name) { +inline void Type::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { } else { @@ -1451,15 +1451,15 @@ inline TProtoStringType* Type::add_oneofs() { inline const TProtoStringType& Type::_internal_oneofs(int index) const { return oneofs_.Get(index); } -inline const TProtoStringType& Type::oneofs(int index) const { +inline const TProtoStringType& Type::oneofs(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Type.oneofs) return _internal_oneofs(index); } -inline TProtoStringType* Type::mutable_oneofs(int index) { +inline TProtoStringType* Type::mutable_oneofs(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Type.oneofs) return oneofs_.Mutable(index); } -inline void Type::set_oneofs(int index, const TProtoStringType& value) { +inline void Type::set_oneofs(int index, const TProtoStringType& value) { oneofs_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs) } @@ -1480,7 +1480,7 @@ inline void Type::set_oneofs(int index, const char* value, size_t size) { inline TProtoStringType* Type::_internal_add_oneofs() { return oneofs_.Add(); } -inline void Type::add_oneofs(const TProtoStringType& value) { +inline void Type::add_oneofs(const TProtoStringType& value) { oneofs_.Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs) } @@ -1722,7 +1722,7 @@ inline void Field::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { inline void Field::clear_name() { name_.ClearToEmpty(); } -inline const TProtoStringType& Field::name() const { +inline const TProtoStringType& Field::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Field.name) return _internal_name(); } @@ -1749,11 +1749,11 @@ inline TProtoStringType* Field::_internal_mutable_name() { return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Field::release_name() { +inline TProtoStringType* Field::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Field.name) return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Field::set_allocated_name(TProtoStringType* name) { +inline void Field::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { } else { @@ -1768,7 +1768,7 @@ inline void Field::set_allocated_name(TProtoStringType* name) { inline void Field::clear_type_url() { type_url_.ClearToEmpty(); } -inline const TProtoStringType& Field::type_url() const { +inline const TProtoStringType& Field::type_url() const { // @@protoc_insertion_point(field_get:google.protobuf.Field.type_url) return _internal_type_url(); } @@ -1795,11 +1795,11 @@ inline TProtoStringType* Field::_internal_mutable_type_url() { return type_url_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Field::release_type_url() { +inline TProtoStringType* Field::release_type_url() { // @@protoc_insertion_point(field_release:google.protobuf.Field.type_url) return type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Field::set_allocated_type_url(TProtoStringType* type_url) { +inline void Field::set_allocated_type_url(TProtoStringType* type_url) { if (type_url != nullptr) { } else { @@ -1894,7 +1894,7 @@ Field::options() const { inline void Field::clear_json_name() { json_name_.ClearToEmpty(); } -inline const TProtoStringType& Field::json_name() const { +inline const TProtoStringType& Field::json_name() const { // @@protoc_insertion_point(field_get:google.protobuf.Field.json_name) return _internal_json_name(); } @@ -1921,11 +1921,11 @@ inline TProtoStringType* Field::_internal_mutable_json_name() { return json_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Field::release_json_name() { +inline TProtoStringType* Field::release_json_name() { // @@protoc_insertion_point(field_release:google.protobuf.Field.json_name) return json_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Field::set_allocated_json_name(TProtoStringType* json_name) { +inline void Field::set_allocated_json_name(TProtoStringType* json_name) { if (json_name != nullptr) { } else { @@ -1940,7 +1940,7 @@ inline void Field::set_allocated_json_name(TProtoStringType* json_name) { inline void Field::clear_default_value() { default_value_.ClearToEmpty(); } -inline const TProtoStringType& Field::default_value() const { +inline const TProtoStringType& Field::default_value() const { // @@protoc_insertion_point(field_get:google.protobuf.Field.default_value) return _internal_default_value(); } @@ -1967,11 +1967,11 @@ inline TProtoStringType* Field::_internal_mutable_default_value() { return default_value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Field::release_default_value() { +inline TProtoStringType* Field::release_default_value() { // @@protoc_insertion_point(field_release:google.protobuf.Field.default_value) return default_value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Field::set_allocated_default_value(TProtoStringType* default_value) { +inline void Field::set_allocated_default_value(TProtoStringType* default_value) { if (default_value != nullptr) { } else { @@ -1990,7 +1990,7 @@ inline void Field::set_allocated_default_value(TProtoStringType* default_value) inline void Enum::clear_name() { name_.ClearToEmpty(); } -inline const TProtoStringType& Enum::name() const { +inline const TProtoStringType& Enum::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Enum.name) return _internal_name(); } @@ -2017,11 +2017,11 @@ inline TProtoStringType* Enum::_internal_mutable_name() { return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Enum::release_name() { +inline TProtoStringType* Enum::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Enum.name) return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Enum::set_allocated_name(TProtoStringType* name) { +inline void Enum::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { } else { @@ -2226,7 +2226,7 @@ inline void Enum::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { inline void EnumValue::clear_name() { name_.ClearToEmpty(); } -inline const TProtoStringType& EnumValue::name() const { +inline const TProtoStringType& EnumValue::name() const { // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.name) return _internal_name(); } @@ -2253,11 +2253,11 @@ inline TProtoStringType* EnumValue::_internal_mutable_name() { return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* EnumValue::release_name() { +inline TProtoStringType* EnumValue::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.EnumValue.name) return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void EnumValue::set_allocated_name(TProtoStringType* name) { +inline void EnumValue::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { } else { @@ -2336,7 +2336,7 @@ EnumValue::options() const { inline void Option::clear_name() { name_.ClearToEmpty(); } -inline const TProtoStringType& Option::name() const { +inline const TProtoStringType& Option::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Option.name) return _internal_name(); } @@ -2363,11 +2363,11 @@ inline TProtoStringType* Option::_internal_mutable_name() { return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* Option::release_name() { +inline TProtoStringType* Option::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Option.name) return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void Option::set_allocated_name(TProtoStringType* name) { +inline void Option::set_allocated_name(TProtoStringType* name) { if (name != nullptr) { } else { 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 434400eb45..1eb7abb9a4 100644 --- a/contrib/libs/protobuf/src/google/protobuf/util/field_comparator.h +++ b/contrib/libs/protobuf/src/google/protobuf/util/field_comparator.h @@ -178,7 +178,7 @@ class PROTOBUF_EXPORT SimpleFieldComparator : public FieldComparator { }; // Defines the map to store the tolerances for floating point comparison. - typedef std::map<const FieldDescriptor*, Tolerance> ToleranceMap; + typedef std::map<const FieldDescriptor*, Tolerance> ToleranceMap; friend class MessageDifferencer; // The following methods get executed when CompareFields is called for the 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 9257b1081f..a03a77f031 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 @@ -346,7 +346,7 @@ ProtoWriter::ProtoElement* ProtoWriter::ProtoElement::pop() { if (!proto3_) { // Calls the registered error listener for any required field(s) not yet // seen. - for (std::set<const google::protobuf::Field*>::iterator it = + for (std::set<const google::protobuf::Field*>::iterator it = required_fields_.begin(); it != required_fields_.end(); ++it) { ow_->MissingField(ow_->use_json_name_in_missing_fields_ 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 6a4ea2a768..e7915a9f3a 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 @@ -130,7 +130,7 @@ class TypeInfoForTypeResolver : public TypeInfo { typedef std::map<StringPiece, StringPiece> CamelCaseNameTable; template <typename T> - static void DeleteCachedTypes(std::map<StringPiece, T>* cached_types) { + static void DeleteCachedTypes(std::map<StringPiece, T>* cached_types) { for (typename std::map<StringPiece, T>::iterator it = cached_types->begin(); it != cached_types->end(); ++it) { @@ -164,8 +164,8 @@ class TypeInfoForTypeResolver : public TypeInfo { // 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<StringPiece, StatusOrType> cached_types_; + mutable std::map<StringPiece, StatusOrEnum> cached_enums_; mutable std::map<const google::protobuf::Type*, CamelCaseNameTable> indexed_types_; 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 2573fcdc3d..73aeee9a77 100644 --- a/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.cc +++ b/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.cc @@ -114,7 +114,7 @@ class MessageDifferencer::MultipleFieldsMapKeyComparator public: MultipleFieldsMapKeyComparator( MessageDifferencer* message_differencer, - const std::vector<std::vector<const FieldDescriptor*> >& key_field_paths) + const std::vector<std::vector<const FieldDescriptor*> >& key_field_paths) : message_differencer_(message_differencer), key_field_paths_(key_field_paths) { GOOGLE_CHECK(!key_field_paths_.empty()); @@ -125,7 +125,7 @@ class MessageDifferencer::MultipleFieldsMapKeyComparator MultipleFieldsMapKeyComparator(MessageDifferencer* message_differencer, const FieldDescriptor* key) : message_differencer_(message_differencer) { - std::vector<const FieldDescriptor*> key_field_path; + std::vector<const FieldDescriptor*> key_field_path; key_field_path.push_back(key); key_field_paths_.push_back(key_field_path); } @@ -142,11 +142,11 @@ class MessageDifferencer::MultipleFieldsMapKeyComparator private: bool IsMatchInternal( const Message& message1, const Message& message2, - const std::vector<SpecificField>& parent_fields, - const std::vector<const FieldDescriptor*>& key_field_path, + const std::vector<SpecificField>& parent_fields, + const std::vector<const FieldDescriptor*>& key_field_path, int path_index) const { const FieldDescriptor* field = key_field_path[path_index]; - std::vector<SpecificField> current_parent_fields(parent_fields); + std::vector<SpecificField> current_parent_fields(parent_fields); if (path_index == static_cast<int64_t>(key_field_path.size() - 1)) { if (field->is_map()) { return message_differencer_->CompareMapField(message1, message2, field, @@ -179,7 +179,7 @@ class MessageDifferencer::MultipleFieldsMapKeyComparator } } MessageDifferencer* message_differencer_; - std::vector<std::vector<const FieldDescriptor*> > key_field_paths_; + std::vector<std::vector<const FieldDescriptor*> > key_field_paths_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MultipleFieldsMapKeyComparator); }; @@ -383,10 +383,10 @@ void MessageDifferencer::TreatAsMap(const FieldDescriptor* field, void MessageDifferencer::TreatAsMapWithMultipleFieldsAsKey( const FieldDescriptor* field, - const std::vector<const FieldDescriptor*>& key_fields) { - std::vector<std::vector<const FieldDescriptor*> > key_field_paths; + const std::vector<const FieldDescriptor*>& key_fields) { + std::vector<std::vector<const FieldDescriptor*> > key_field_paths; for (const FieldDescriptor* key_filed : key_fields) { - std::vector<const FieldDescriptor*> key_field_path; + std::vector<const FieldDescriptor*> key_field_path; key_field_path.push_back(key_filed); key_field_paths.push_back(key_field_path); } @@ -395,7 +395,7 @@ void MessageDifferencer::TreatAsMapWithMultipleFieldsAsKey( void MessageDifferencer::TreatAsMapWithMultipleFieldPathsAsKey( const FieldDescriptor* field, - const std::vector<std::vector<const FieldDescriptor*> >& key_field_paths) { + const std::vector<std::vector<const FieldDescriptor*> >& key_field_paths) { GOOGLE_CHECK(field->is_repeated()) << "Field must be repeated: " << field->full_name(); GOOGLE_CHECK_EQ(FieldDescriptor::CPPTYPE_MESSAGE, field->cpp_type()) @@ -488,7 +488,7 @@ bool MessageDifferencer::FieldBefore(const FieldDescriptor* field1, bool MessageDifferencer::Compare(const Message& message1, const Message& message2) { - std::vector<SpecificField> parent_fields; + std::vector<SpecificField> parent_fields; bool result = false; // Setup the internal reporter if need be. @@ -507,15 +507,15 @@ bool MessageDifferencer::Compare(const Message& message1, bool MessageDifferencer::CompareWithFields( const Message& message1, const Message& message2, - const std::vector<const FieldDescriptor*>& message1_fields_arg, - const std::vector<const FieldDescriptor*>& message2_fields_arg) { + const std::vector<const FieldDescriptor*>& message1_fields_arg, + const std::vector<const FieldDescriptor*>& message2_fields_arg) { if (message1.GetDescriptor() != message2.GetDescriptor()) { GOOGLE_LOG(DFATAL) << "Comparison between two messages with different " << "descriptors."; return false; } - std::vector<SpecificField> parent_fields; + std::vector<SpecificField> parent_fields; bool result = false; @@ -638,7 +638,7 @@ bool MessageDifferencer::CompareRequestedFieldsUsingSettings( const Message& message1, const Message& message2, const FieldDescriptorArray& message1_fields, const FieldDescriptorArray& message2_fields, - std::vector<SpecificField>* parent_fields) { + std::vector<SpecificField>* parent_fields) { if (scope_ == FULL) { if (message_field_comparison_ == EQUIVALENT) { // We need to merge the field lists of both messages (i.e. @@ -714,7 +714,7 @@ bool MessageDifferencer::CompareWithFieldsInternal( const Message& message1, const Message& message2, const FieldDescriptorArray& message1_fields, const FieldDescriptorArray& message2_fields, - std::vector<SpecificField>* parent_fields) { + std::vector<SpecificField>* parent_fields) { bool isDifferent = false; int field_index1 = 0; int field_index2 = 0; @@ -877,7 +877,7 @@ bool MessageDifferencer::IsMatch( 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); + std::vector<SpecificField> current_parent_fields(parent_fields); if (repeated_field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) { return CompareFieldValueUsingParentFields(*message1, *message2, repeated_field, index1, index2, @@ -1009,7 +1009,7 @@ bool MessageDifferencer::CompareMapFieldByMapReflection( bool MessageDifferencer::CompareMapField( const Message& message1, const Message& message2, const FieldDescriptor* repeated_field, - std::vector<SpecificField>* parent_fields) { + std::vector<SpecificField>* parent_fields) { GOOGLE_DCHECK(repeated_field->is_map()); // the input FieldDescriptor is guaranteed to be repeated field. @@ -1080,8 +1080,8 @@ bool MessageDifferencer::CompareRepeatedRep( // These two list are used for store the index of the correspondent // element in peer repeated field. - std::vector<int> match_list1; - std::vector<int> match_list2; + std::vector<int> match_list1; + std::vector<int> match_list2; const MapKeyComparator* key_comparator = GetMapKeyComparator(repeated_field); bool smart_list = IsTreatedAsSmartList(repeated_field); @@ -1214,7 +1214,7 @@ bool MessageDifferencer::CompareFieldValue(const Message& message1, bool MessageDifferencer::CompareFieldValueUsingParentFields( const Message& message1, const Message& message2, const FieldDescriptor* field, int index1, int index2, - std::vector<SpecificField>* parent_fields) { + std::vector<SpecificField>* parent_fields) { FieldContext field_context(parent_fields); FieldComparator::ComparisonResult result = GetFieldComparisonResult( message1, message2, field, index1, index2, &field_context); @@ -1255,7 +1255,7 @@ bool MessageDifferencer::CompareFieldValueUsingParentFields( } bool MessageDifferencer::CheckPathChanged( - const std::vector<SpecificField>& field_path) { + const std::vector<SpecificField>& field_path) { for (const SpecificField& specific_field : field_path) { // Don't check indexes for map entries -- maps are unordered. if (specific_field.field != nullptr && specific_field.field->is_map()) @@ -1303,7 +1303,7 @@ bool MessageDifferencer::IsTreatedAsSubset(const FieldDescriptor* field) { bool MessageDifferencer::IsIgnored( const Message& message1, const Message& message2, const FieldDescriptor* field, - const std::vector<SpecificField>& parent_fields) { + const std::vector<SpecificField>& parent_fields) { if (ignored_fields_.find(field) != ignored_fields_.end()) { return true; } @@ -1346,7 +1346,7 @@ MessageDifferencer ::GetMapKeyComparator(const FieldDescriptor* field) const { namespace { -typedef std::pair<int, const UnknownField*> IndexUnknownFieldPair; +typedef std::pair<int, const UnknownField*> IndexUnknownFieldPair; struct UnknownFieldOrdering { inline bool operator()(const IndexUnknownFieldPair& a, @@ -1397,7 +1397,7 @@ bool MessageDifferencer::CompareUnknownFields( const Message& message1, const Message& message2, const UnknownFieldSet& unknown_field_set1, const UnknownFieldSet& unknown_field_set2, - std::vector<SpecificField>* parent_field) { + std::vector<SpecificField>* parent_field) { // Ignore unknown fields in EQUIVALENT mode. if (message_field_comparison_ == EQUIVALENT) return true; @@ -1413,8 +1413,8 @@ bool MessageDifferencer::CompareUnknownFields( // two sets -- that is, differing values for the same tag. We use // IndexUnknownFieldPairs to keep track of the field's original index for // reporting purposes. - std::vector<IndexUnknownFieldPair> fields1; // unknown_field_set1, sorted - std::vector<IndexUnknownFieldPair> fields2; // unknown_field_set2, sorted + std::vector<IndexUnknownFieldPair> fields1; // unknown_field_set1, sorted + std::vector<IndexUnknownFieldPair> fields2; // unknown_field_set2, sorted fields1.reserve(unknown_field_set1.field_count()); fields2.reserve(unknown_field_set2.field_count()); @@ -1623,7 +1623,7 @@ class MaximumMatcher { // the x-th node on the right side is matched to y-th node on the left side. // match_list1[i] == -1 means the node is not matched. Same with match_list2. MaximumMatcher(int count1, int count2, NodeMatchCallback callback, - std::vector<int>* match_list1, std::vector<int>* match_list2); + std::vector<int>* match_list1, std::vector<int>* match_list2); // Find a maximum match and return the number of matched node pairs. // If early_return is true, this method will return 0 immediately when it // finds that not all nodes on the left side can be matched. @@ -1636,21 +1636,21 @@ class MaximumMatcher { // Find an argumenting path starting from the node v on the left side. If a // path can be found, update match_list2_ to reflect the path and return // true. - bool FindArgumentPathDFS(int v, std::vector<bool>* visited); + bool FindArgumentPathDFS(int v, std::vector<bool>* visited); int count1_; int count2_; NodeMatchCallback match_callback_; - std::map<std::pair<int, int>, bool> cached_match_results_; - std::vector<int>* match_list1_; - std::vector<int>* match_list2_; + std::map<std::pair<int, int>, bool> cached_match_results_; + std::vector<int>* match_list1_; + std::vector<int>* match_list2_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MaximumMatcher); }; MaximumMatcher::MaximumMatcher(int count1, int count2, NodeMatchCallback callback, - std::vector<int>* match_list1, - std::vector<int>* match_list2) + std::vector<int>* match_list1, + std::vector<int>* match_list2) : count1_(count1), count2_(count2), match_callback_(std::move(callback)), @@ -1663,7 +1663,7 @@ MaximumMatcher::MaximumMatcher(int count1, int count2, int MaximumMatcher::FindMaximumMatch(bool early_return) { int result = 0; for (int i = 0; i < count1_; ++i) { - std::vector<bool> visited(count1_); + std::vector<bool> visited(count1_); if (FindArgumentPathDFS(i, &visited)) { ++result; } else if (early_return) { @@ -1681,7 +1681,7 @@ int MaximumMatcher::FindMaximumMatch(bool early_return) { } bool MaximumMatcher::Match(int left, int right) { - std::pair<int, int> p(left, right); + std::pair<int, int> p(left, right); std::map<std::pair<int, int>, bool>::iterator it = cached_match_results_.find(p); if (it != cached_match_results_.end()) { @@ -1691,7 +1691,7 @@ bool MaximumMatcher::Match(int left, int right) { return cached_match_results_[p]; } -bool MaximumMatcher::FindArgumentPathDFS(int v, std::vector<bool>* visited) { +bool MaximumMatcher::FindArgumentPathDFS(int v, std::vector<bool>* visited) { (*visited)[v] = true; // We try to match those un-matched nodes on the right side first. This is // the step that the naive greedy matching algorithm uses. In the best cases @@ -1727,7 +1727,7 @@ bool MessageDifferencer::MatchRepeatedFieldIndices( const Message& message1, const Message& message2, 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) { const int count1 = message1.GetReflection()->FieldSize(message1, repeated_field); @@ -1909,7 +1909,7 @@ MessageDifferencer::StreamReporter::~StreamReporter() { } void MessageDifferencer::StreamReporter::PrintPath( - const std::vector<SpecificField>& field_path, bool left_side) { + const std::vector<SpecificField>& field_path, bool left_side) { for (size_t i = 0; i < field_path.size(); ++i) { SpecificField specific_field = field_path[i]; @@ -2114,7 +2114,7 @@ void MessageDifferencer::StreamReporter::PrintMapKey( void MessageDifferencer::StreamReporter::ReportAdded( const Message& message1, const Message& message2, - const std::vector<SpecificField>& field_path) { + const std::vector<SpecificField>& field_path) { printer_->Print("added: "); PrintPath(field_path, false); printer_->Print(": "); @@ -2124,7 +2124,7 @@ void MessageDifferencer::StreamReporter::ReportAdded( void MessageDifferencer::StreamReporter::ReportDeleted( const Message& message1, const Message& message2, - const std::vector<SpecificField>& field_path) { + const std::vector<SpecificField>& field_path) { printer_->Print("deleted: "); PrintPath(field_path, true); printer_->Print(": "); @@ -2134,7 +2134,7 @@ void MessageDifferencer::StreamReporter::ReportDeleted( void MessageDifferencer::StreamReporter::ReportModified( const Message& message1, const Message& message2, - const std::vector<SpecificField>& field_path) { + const std::vector<SpecificField>& field_path) { if (!report_modified_aggregates_ && field_path.back().field == NULL) { if (field_path.back().unknown_field_type == UnknownField::TYPE_GROUP) { // Any changes to the subfields have already been printed. @@ -2163,7 +2163,7 @@ void MessageDifferencer::StreamReporter::ReportModified( void MessageDifferencer::StreamReporter::ReportMoved( const Message& message1, const Message& message2, - const std::vector<SpecificField>& field_path) { + const std::vector<SpecificField>& field_path) { printer_->Print("moved: "); PrintPath(field_path, true); printer_->Print(" -> "); @@ -2175,7 +2175,7 @@ void MessageDifferencer::StreamReporter::ReportMoved( void MessageDifferencer::StreamReporter::ReportMatched( const Message& message1, const Message& message2, - const std::vector<SpecificField>& field_path) { + const std::vector<SpecificField>& field_path) { printer_->Print("matched: "); PrintPath(field_path, true); if (CheckPathChanged(field_path)) { @@ -2189,7 +2189,7 @@ void MessageDifferencer::StreamReporter::ReportMatched( void MessageDifferencer::StreamReporter::ReportIgnored( const Message& message1, const Message& message2, - const std::vector<SpecificField>& field_path) { + const std::vector<SpecificField>& field_path) { printer_->Print("ignored: "); PrintPath(field_path, true); if (CheckPathChanged(field_path)) { @@ -2207,7 +2207,7 @@ void MessageDifferencer::StreamReporter::SetMessages(const Message& message1, void MessageDifferencer::StreamReporter::ReportUnknownFieldIgnored( const Message& message1, const Message& message2, - const std::vector<SpecificField>& field_path) { + const std::vector<SpecificField>& field_path) { printer_->Print("ignored: "); PrintPath(field_path, true); if (CheckPathChanged(field_path)) { 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 b68c24b7de..ac1d6f41b5 100644 --- a/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.h +++ b/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.h @@ -256,12 +256,12 @@ class PROTOBUF_EXPORT MessageDifferencer { // Reports that a field has been deleted from Message1. virtual void ReportDeleted( const Message& message1, const Message& message2, - const std::vector<SpecificField>& field_path) = 0; + const std::vector<SpecificField>& field_path) = 0; // Reports that the value of a field has been modified. virtual void ReportModified( const Message& message1, const Message& message2, - const std::vector<SpecificField>& field_path) = 0; + const std::vector<SpecificField>& field_path) = 0; // Reports that a repeated field has been moved to another location. This // only applies when using TreatAsSet or TreatAsMap() -- see below. Also @@ -477,7 +477,7 @@ class PROTOBUF_EXPORT MessageDifferencer { // size of each element. void TreatAsMapWithMultipleFieldsAsKey( const FieldDescriptor* field, - const std::vector<const FieldDescriptor*>& key_fields); + const std::vector<const FieldDescriptor*>& key_fields); // Same as TreatAsMapWithMultipleFieldsAsKey, except that each of the field // do not necessarily need to be a direct subfield. Each element in // key_field_paths indicate a path from the message being compared, listing @@ -493,7 +493,7 @@ class PROTOBUF_EXPORT MessageDifferencer { // !key_field_path[i]->is_repeated() void TreatAsMapWithMultipleFieldPathsAsKey( const FieldDescriptor* field, - const std::vector<std::vector<const FieldDescriptor*> >& key_field_paths); + const std::vector<std::vector<const FieldDescriptor*> >& key_field_paths); // Uses a custom MapKeyComparator to determine if two elements have the same // key when comparing a repeated field as a map. @@ -677,7 +677,7 @@ class PROTOBUF_EXPORT MessageDifferencer { protected: // Prints the specified path of fields to the buffer. - virtual void PrintPath(const std::vector<SpecificField>& field_path, + virtual void PrintPath(const std::vector<SpecificField>& field_path, bool left_side); // Prints the value of fields to the buffer. left_side is true if the @@ -686,7 +686,7 @@ class PROTOBUF_EXPORT MessageDifferencer { // unknown_field_index1 or unknown_field_index2 when an unknown field // is encountered in field_path. virtual void PrintValue(const Message& message, - const std::vector<SpecificField>& field_path, + const std::vector<SpecificField>& field_path, bool left_side); // Prints the specified path of unknown fields to the buffer. @@ -754,12 +754,12 @@ class PROTOBUF_EXPORT MessageDifferencer { // (i.e. if the current message is an embedded message, the parent_fields // vector will contain the field that has this embedded message). bool Compare(const Message& message1, const Message& message2, - std::vector<SpecificField>* parent_fields); + std::vector<SpecificField>* parent_fields); // Compares all the unknown fields in two messages. bool CompareUnknownFields(const Message& message1, const Message& message2, const UnknownFieldSet&, const UnknownFieldSet&, - std::vector<SpecificField>* parent_fields); + std::vector<SpecificField>* parent_fields); // Compares the specified messages for the requested field lists. The field // lists are modified depending on comparison settings, and then passed to @@ -768,7 +768,7 @@ class PROTOBUF_EXPORT MessageDifferencer { const Message& message1, const Message& message2, const FieldDescriptorArray& message1_fields, const FieldDescriptorArray& message2_fields, - std::vector<SpecificField>* parent_fields); + std::vector<SpecificField>* parent_fields); // Compares the specified messages with the specified field lists. bool CompareWithFieldsInternal(const Message& message1, @@ -780,7 +780,7 @@ class PROTOBUF_EXPORT MessageDifferencer { // Compares the repeated fields, and report the error. bool CompareRepeatedField(const Message& message1, const Message& message2, const FieldDescriptor* field, - std::vector<SpecificField>* parent_fields); + std::vector<SpecificField>* parent_fields); // Compares map fields, and report the error. bool CompareMapField(const Message& message1, const Message& message2, @@ -833,7 +833,7 @@ class PROTOBUF_EXPORT MessageDifferencer { bool IsMatch(const FieldDescriptor* repeated_field, const MapKeyComparator* key_comparator, const Message* message1, const Message* message2, - const std::vector<SpecificField>& parent_fields, + const std::vector<SpecificField>& parent_fields, Reporter* reporter, int index1, int index2); // Returns true when this repeated field has been configured to be treated @@ -864,7 +864,7 @@ class PROTOBUF_EXPORT MessageDifferencer { // MessageDifferencer compares messages. bool IsUnknownFieldIgnored(const Message& message1, const Message& message2, const SpecificField& field, - const std::vector<SpecificField>& parent_fields); + 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. @@ -887,7 +887,7 @@ class PROTOBUF_EXPORT MessageDifferencer { std::vector<int>* match_list1, std::vector<int>* match_list2); // Checks if index is equal to new_index in all the specific fields. - static bool CheckPathChanged(const std::vector<SpecificField>& parent_fields); + static bool CheckPathChanged(const std::vector<SpecificField>& parent_fields); // CHECKs that the given repeated field can be compared according to // new_comparison. @@ -902,7 +902,7 @@ class PROTOBUF_EXPORT MessageDifferencer { // Defines a set to store field descriptors. Used for repeated fields when // they are configured as TreatAsSet. - typedef std::set<const FieldDescriptor*> FieldSet; + typedef std::set<const FieldDescriptor*> FieldSet; typedef std::map<const FieldDescriptor*, RepeatedFieldComparison> FieldMap; Reporter* reporter_; @@ -918,10 +918,10 @@ class PROTOBUF_EXPORT MessageDifferencer { // When TreatAsMap or TreatAsMapWithMultipleFieldsAsKey is called, we don't // store the supplied FieldDescriptors directly. Instead, a new // MapKeyComparator is created for comparison purpose. - std::vector<MapKeyComparator*> owned_key_comparators_; + std::vector<MapKeyComparator*> owned_key_comparators_; FieldKeyComparatorMap map_field_key_comparator_; MapEntryKeyComparator map_entry_key_comparator_; - std::vector<IgnoreCriteria*> ignore_criteria_; + std::vector<IgnoreCriteria*> ignore_criteria_; // Reused multiple times in RetrieveFields to avoid extra allocations std::vector<const FieldDescriptor*> tmp_message_fields_; @@ -952,15 +952,15 @@ class PROTOBUF_EXPORT MessageDifferencer { class PROTOBUF_EXPORT FieldContext { public: explicit FieldContext( - std::vector<MessageDifferencer::SpecificField>* parent_fields) + std::vector<MessageDifferencer::SpecificField>* parent_fields) : parent_fields_(parent_fields) {} - std::vector<MessageDifferencer::SpecificField>* parent_fields() const { + std::vector<MessageDifferencer::SpecificField>* parent_fields() const { return parent_fields_; } private: - std::vector<MessageDifferencer::SpecificField>* parent_fields_; + std::vector<MessageDifferencer::SpecificField>* parent_fields_; }; } // namespace util 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 0a297e9e64..8b5296daea 100644 --- a/contrib/libs/protobuf/src/google/protobuf/util/time_util.h +++ b/contrib/libs/protobuf/src/google/protobuf/util/time_util.h @@ -251,7 +251,7 @@ inline Duration operator%(const Duration& d1, const Duration& d2) { return result %= d2; } -inline std::ostream& operator<<(std::ostream& out, const Duration& d) { +inline std::ostream& operator<<(std::ostream& out, const Duration& d) { out << ::PROTOBUF_NAMESPACE_ID::util::TimeUtil::ToString(d); return out; } @@ -300,7 +300,7 @@ inline Timestamp operator-(const Timestamp& t, const Duration& d) { } PROTOBUF_EXPORT Duration operator-(const Timestamp& t1, const Timestamp& t2); -inline std::ostream& operator<<(std::ostream& out, const Timestamp& t) { +inline std::ostream& operator<<(std::ostream& out, const Timestamp& t) { out << ::PROTOBUF_NAMESPACE_ID::util::TimeUtil::ToString(t); return out; } diff --git a/contrib/libs/protobuf/src/google/protobuf/wire_format.cc b/contrib/libs/protobuf/src/google/protobuf/wire_format.cc index cb0b32465f..9a883f8e5b 100644 --- a/contrib/libs/protobuf/src/google/protobuf/wire_format.cc +++ b/contrib/libs/protobuf/src/google/protobuf/wire_format.cc @@ -1035,7 +1035,7 @@ uint8* WireFormat::_InternalSerialize(const Message& message, uint8* target, const Descriptor* descriptor = message.GetDescriptor(); const Reflection* message_reflection = message.GetReflection(); - std::vector<const FieldDescriptor*> fields; + std::vector<const FieldDescriptor*> fields; // Fields of map entry should always be serialized. if (descriptor->options().map_entry()) { @@ -1449,7 +1449,7 @@ size_t WireFormat::ByteSize(const Message& message) { size_t our_size = 0; - std::vector<const FieldDescriptor*> fields; + std::vector<const FieldDescriptor*> fields; // Fields of map entry should always be serialized. if (descriptor->options().map_entry()) { diff --git a/contrib/libs/protobuf/src/google/protobuf/wire_format.h b/contrib/libs/protobuf/src/google/protobuf/wire_format.h index d4ffbdfd7b..e65f914b61 100644 --- a/contrib/libs/protobuf/src/google/protobuf/wire_format.h +++ b/contrib/libs/protobuf/src/google/protobuf/wire_format.h @@ -372,8 +372,8 @@ inline void WireFormat::VerifyUTF8StringNamedField(const char* data, int size, #ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED WireFormatLite::VerifyUtf8String( data, size, static_cast<WireFormatLite::Operation>(op), field_name); -#else - // Avoid the compiler warning about unused variables. +#else + // Avoid the compiler warning about unused variables. (void)data; (void)size; (void)op; 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 ed82bdd48e..07ffb7539d 100644 --- a/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.cc +++ b/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.cc @@ -562,7 +562,7 @@ bool WireFormatLite::ReadBytes(io::CodedInputStream* input, bool WireFormatLite::ReadBytes(io::CodedInputStream* input, TProtoStringType** p) { if (*p == &GetEmptyStringAlreadyInited()) { - *p = new TProtoStringType(); + *p = new TProtoStringType(); } return ReadBytesToString(input, *p); } diff --git a/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.h b/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.h index 81e9349c07..0673f8fca2 100644 --- a/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.h +++ b/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.h @@ -1189,12 +1189,12 @@ class PROTOBUF_EXPORT StringValue final : }; // string value = 1; void clear_value(); - const TProtoStringType& value() const; + const TProtoStringType& value() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_value(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_value(); + TProtoStringType* mutable_value(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_value(); - void set_allocated_value(TProtoStringType* value); + void set_allocated_value(TProtoStringType* value); private: const TProtoStringType& _internal_value() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const TProtoStringType& value); @@ -1333,12 +1333,12 @@ class PROTOBUF_EXPORT BytesValue final : }; // bytes value = 1; void clear_value(); - const TProtoStringType& value() const; + const TProtoStringType& value() const; template <typename ArgT0 = const TProtoStringType&, typename... ArgT> void set_value(ArgT0&& arg0, ArgT... args); - TProtoStringType* mutable_value(); + TProtoStringType* mutable_value(); PROTOBUF_MUST_USE_RESULT TProtoStringType* release_value(); - void set_allocated_value(TProtoStringType* value); + void set_allocated_value(TProtoStringType* value); private: const TProtoStringType& _internal_value() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const TProtoStringType& value); @@ -1539,7 +1539,7 @@ inline void BoolValue::set_value(bool value) { inline void StringValue::clear_value() { value_.ClearToEmpty(); } -inline const TProtoStringType& StringValue::value() const { +inline const TProtoStringType& StringValue::value() const { // @@protoc_insertion_point(field_get:google.protobuf.StringValue.value) return _internal_value(); } @@ -1566,11 +1566,11 @@ inline TProtoStringType* StringValue::_internal_mutable_value() { return value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* StringValue::release_value() { +inline TProtoStringType* StringValue::release_value() { // @@protoc_insertion_point(field_release:google.protobuf.StringValue.value) return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void StringValue::set_allocated_value(TProtoStringType* value) { +inline void StringValue::set_allocated_value(TProtoStringType* value) { if (value != nullptr) { } else { @@ -1589,7 +1589,7 @@ inline void StringValue::set_allocated_value(TProtoStringType* value) { inline void BytesValue::clear_value() { value_.ClearToEmpty(); } -inline const TProtoStringType& BytesValue::value() const { +inline const TProtoStringType& BytesValue::value() const { // @@protoc_insertion_point(field_get:google.protobuf.BytesValue.value) return _internal_value(); } @@ -1616,11 +1616,11 @@ inline TProtoStringType* BytesValue::_internal_mutable_value() { return value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline TProtoStringType* BytesValue::release_value() { +inline TProtoStringType* BytesValue::release_value() { // @@protoc_insertion_point(field_release:google.protobuf.BytesValue.value) return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void BytesValue::set_allocated_value(TProtoStringType* value) { +inline void BytesValue::set_allocated_value(TProtoStringType* value) { if (value != nullptr) { } else { diff --git a/contrib/libs/protobuf/ya.make b/contrib/libs/protobuf/ya.make index 044e24badd..2bac6fafb0 100644 --- a/contrib/libs/protobuf/ya.make +++ b/contrib/libs/protobuf/ya.make @@ -1,7 +1,7 @@ # Generated by devtools/yamaker from nixpkgs 21.11. -LIBRARY() - +LIBRARY() + PROVIDES(protobuf) OWNER( @@ -10,7 +10,7 @@ OWNER( ) VERSION(3.17.3) - + ORIGINAL_SOURCE(https://github.com/protocolbuffers/protobuf/archive/v3.17.3.tar.gz) LICENSE( @@ -30,9 +30,9 @@ ADDINCL( proto contrib/libs/protobuf/src ) - + NO_COMPILER_WARNINGS() - + CFLAGS( -DHAVE_CONFIG_H -DHAVE_PTHREAD=1 @@ -43,7 +43,7 @@ IF (OS_ANDROID) EXTRALIBS(log) ENDIF() -SRCS( +SRCS( GLOBAL src/google/protobuf/generated_message_util.cc src/google/protobuf/any.cc src/google/protobuf/any.pb.cc @@ -126,8 +126,8 @@ SRCS( src/google/protobuf/wire_format.cc src/google/protobuf/wire_format_lite.cc src/google/protobuf/wrappers.pb.cc -) - +) + FILES( src/google/protobuf/any.proto src/google/protobuf/api.proto @@ -142,7 +142,7 @@ FILES( src/google/protobuf/wrappers.proto ) -END() +END() RECURSE( builtin_proto |