diff options
author | pg <pg@yandex-team.com> | 2023-08-20 03:20:59 +0300 |
---|---|---|
committer | pg <pg@yandex-team.com> | 2023-08-20 04:44:35 +0300 |
commit | 5017c0605609840684cdc5e1bcbc83000f24a08c (patch) | |
tree | 7b29efcc6e2f710a0bd974b8ad7b26386cd4b961 | |
parent | 759857fab05dac463877ff6ef8b8776ff2076f47 (diff) | |
download | ydb-5017c0605609840684cdc5e1bcbc83000f24a08c.tar.gz |
-rw-r--r-- | util/generic/hash_table.h | 16 | ||||
-rw-r--r-- | ydb/library/yql/core/yql_expr_type_annotation.cpp | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/util/generic/hash_table.h b/util/generic/hash_table.h index 31e245339e..a09c5e73d6 100644 --- a/util/generic/hash_table.h +++ b/util/generic/hash_table.h @@ -88,11 +88,11 @@ struct __yhashtable_iterator { } iterator& operator++(); iterator operator++(int); - bool operator==(const iterator& it) const { - return cur == it.cur; + friend bool operator==(const iterator& l, const iterator& r) { + return l.cur == r.cur; } - bool operator!=(const iterator& it) const { - return cur != it.cur; + friend bool operator!=(const iterator& l, const iterator& r) { + return l.cur != r.cur; } bool IsEnd() const { return !cur; @@ -135,11 +135,11 @@ struct __yhashtable_const_iterator { } const_iterator& operator++(); const_iterator operator++(int); - bool operator==(const const_iterator& it) const { - return cur == it.cur; + friend bool operator==(const const_iterator& l, const const_iterator& r) { + return l.cur == r.cur; } - bool operator!=(const const_iterator& it) const { - return cur != it.cur; + friend bool operator!=(const const_iterator& l, const const_iterator& r) { + return l.cur != r.cur; } bool IsEnd() const { return !cur; diff --git a/ydb/library/yql/core/yql_expr_type_annotation.cpp b/ydb/library/yql/core/yql_expr_type_annotation.cpp index c3c7efd75e..99a82dce2a 100644 --- a/ydb/library/yql/core/yql_expr_type_annotation.cpp +++ b/ydb/library/yql/core/yql_expr_type_annotation.cpp @@ -4423,7 +4423,7 @@ IGraphTransformer::TStatus ConvertChildrenToType(const TExprNode::TPtr& input, c } status = status.Combine(TryConvertTo(input->ChildRef(i), *targetType, ctx)); - if (IGraphTransformer::TStatus::Error == status) + if (status == IGraphTransformer::TStatus::Error) break; } @@ -5373,10 +5373,10 @@ IGraphTransformer::TStatus NormalizeTupleOfAtoms(const TExprNode::TPtr& input, u if (1U == item->ChildrenSize() && item->Head().IsAtom()) { needRestart = true; children[i] = item->HeadPtr(); - } else if (const auto status = NormalizeTupleOfAtoms<Deduplicte, 1U>(input->ChildPtr(index), i, children[i], ctx); IGraphTransformer::TStatus::Error == status) + } else if (const auto status = NormalizeTupleOfAtoms<Deduplicte, 1U>(input->ChildPtr(index), i, children[i], ctx); status == IGraphTransformer::TStatus::Error) return status; else - needRestart = needRestart || IGraphTransformer::TStatus::Repeat == status; + needRestart = needRestart || (status == IGraphTransformer::TStatus::Repeat); } else if (!EnsureAtom(*item, ctx)) return IGraphTransformer::TStatus::Error; } |