diff options
author | insight <insight@yandex-team.ru> | 2022-02-10 16:46:59 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:59 +0300 |
commit | 122c87ebe5797d52f1800afb02c87f751135d0a4 (patch) | |
tree | b83306b6e37edeea782e9eed673d89286c4fef35 /library/cpp/yson/node/node.cpp | |
parent | 3649e6106e994e7f969877e4b10207d3556454b2 (diff) | |
download | ydb-122c87ebe5797d52f1800afb02c87f751135d0a4.tar.gz |
Restoring authorship annotation for <insight@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yson/node/node.cpp')
-rw-r--r-- | library/cpp/yson/node/node.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/yson/node/node.cpp b/library/cpp/yson/node/node.cpp index b38c32357a..b39e070718 100644 --- a/library/cpp/yson/node/node.cpp +++ b/library/cpp/yson/node/node.cpp @@ -540,17 +540,17 @@ TNode& TNode::operator[](const TStringBuf key) return std::get<TMapType>(Value_)[key]; } -const TNode& TNode::At(const TStringBuf key) const { - CheckType(Map); +const TNode& TNode::At(const TStringBuf key) const { + CheckType(Map); const auto& map = std::get<TMapType>(Value_); - TMapType::const_iterator i = map.find(key); - if (i == map.end()) { + TMapType::const_iterator i = map.find(key); + if (i == map.end()) { ythrow TLookupError() << "Cannot find key " << key; - } else { - return i->second; - } -} - + } else { + return i->second; + } +} + TNode& TNode::At(const TStringBuf key) { CheckType(Map); auto& map = std::get<TMapType>(Value_); |