diff options
author | nga <nga@yandex-team.ru> | 2022-02-10 16:48:09 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:09 +0300 |
commit | c2a1af049e9deca890e9923abe64fe6c59060348 (patch) | |
tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/protobuf/util/is_equal.cpp | |
parent | 1f553f46fb4f3c5eec631352cdd900a0709016af (diff) | |
download | ydb-c2a1af049e9deca890e9923abe64fe6c59060348.tar.gz |
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/protobuf/util/is_equal.cpp')
-rw-r--r-- | library/cpp/protobuf/util/is_equal.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/protobuf/util/is_equal.cpp b/library/cpp/protobuf/util/is_equal.cpp index 9a0e94b57e..227408006e 100644 --- a/library/cpp/protobuf/util/is_equal.cpp +++ b/library/cpp/protobuf/util/is_equal.cpp @@ -4,8 +4,8 @@ #include <google/protobuf/descriptor.h> #include <util/generic/yexception.h> -#include <util/string/cast.h> -#include <util/string/vector.h> +#include <util/string/cast.h> +#include <util/string/vector.h> namespace NProtoBuf { template <bool useDefault> @@ -19,7 +19,7 @@ namespace NProtoBuf { return value1 == value2; } }; - + template <bool useDefault> struct TCompareValue<FieldDescriptor::CPPTYPE_MESSAGE, useDefault> { static inline bool IsEqual(const Message* value1, const Message* value2, TVector<TString>* differentPath) { @@ -113,7 +113,7 @@ namespace NProtoBuf { const Descriptor* descr = m1.GetDescriptor(); if (descr != m2.GetDescriptor()) { return false; - } + } for (int i = 0; i < descr->field_count(); ++i) if (!IsEqualField<useDefault>(m1, m2, *descr->field(i), differentPath)) { return false; @@ -148,14 +148,14 @@ namespace NProtoBuf { const Descriptor* descr = m1.GetDescriptor(); if (descr != m2.GetDescriptor()) { return false; - } + } return IsEqualField<useDefault>(m1, m2, field, differentPath); } bool IsEqualField(const Message& m1, const Message& m2, const FieldDescriptor& field) { return IsEqualFieldImpl<false>(m1, m2, field, nullptr); - } - + } + bool IsEqualFieldDefault(const Message& m1, const Message& m2, const FieldDescriptor& field) { return IsEqualFieldImpl<true>(m1, m2, field, nullptr); } |