diff options
author | gotmanov <gotmanov@yandex-team.ru> | 2022-02-10 16:49:26 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:26 +0300 |
commit | 243edeedfd2c5152b5c7812e0af471e1bb0232e8 (patch) | |
tree | 7efbef4b4e045bcee8833f7fc22a639fa0ff06aa /library/cpp/protobuf/util/traits.h | |
parent | 56c39b3cf908e7202b1f7551a1653681e8015607 (diff) | |
download | ydb-243edeedfd2c5152b5c7812e0af471e1bb0232e8.tar.gz |
Restoring authorship annotation for <gotmanov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/protobuf/util/traits.h')
-rw-r--r-- | library/cpp/protobuf/util/traits.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/protobuf/util/traits.h b/library/cpp/protobuf/util/traits.h index 50f036d0ea..e2d75e4a90 100644 --- a/library/cpp/protobuf/util/traits.h +++ b/library/cpp/protobuf/util/traits.h @@ -44,8 +44,8 @@ namespace NProtoBuf { Y_ASSERT(fd); \ return fd->default_value_##method(); \ } \ - }; - + }; + DECLARE_CPPTYPE_DEFAULT(FieldDescriptor::CppType::CPPTYPE_INT32, int32); DECLARE_CPPTYPE_DEFAULT(FieldDescriptor::CppType::CPPTYPE_INT64, int64); DECLARE_CPPTYPE_DEFAULT(FieldDescriptor::CppType::CPPTYPE_UINT32, uint32); @@ -55,9 +55,9 @@ namespace NProtoBuf { DECLARE_CPPTYPE_DEFAULT(FieldDescriptor::CppType::CPPTYPE_BOOL, bool); DECLARE_CPPTYPE_DEFAULT(FieldDescriptor::CppType::CPPTYPE_ENUM, enum); DECLARE_CPPTYPE_DEFAULT(FieldDescriptor::CppType::CPPTYPE_STRING, string); - -#undef DECLARE_CPPTYPE_DEFAULT - + +#undef DECLARE_CPPTYPE_DEFAULT + // getters/setters of field with specified CppType template <FieldDescriptor::CppType cpptype> struct TCppTypeTraits : TCppTypeTraitsBase { @@ -190,7 +190,7 @@ namespace NProtoBuf { Y_ASSERT(index == 0); TBaseTraits::Set(msg, field, value); } - + static inline void Add(Message& msg, const FieldDescriptor* field, T value) { TBaseTraits::Set(msg, field, value); } @@ -220,7 +220,7 @@ namespace NProtoBuf { static inline void Set(Message& msg, const FieldDescriptor* field, T value, size_t index = 0) { TBaseTraits::SetRepeated(msg, field, index, value); } - + static inline void Add(Message& msg, const FieldDescriptor* field, T value) { TBaseTraits::AddRepeated(msg, field, value); } |