aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yson/node/node.cpp
diff options
context:
space:
mode:
authorinsight <insight@yandex-team.ru>2022-02-10 16:46:59 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:59 +0300
commit3649e6106e994e7f969877e4b10207d3556454b2 (patch)
tree85a83202be3b025c776e8de41d80135483e7300f /library/cpp/yson/node/node.cpp
parent55fa8c7df8dba9a6fda8a807e529a9d04bd88580 (diff)
downloadydb-3649e6106e994e7f969877e4b10207d3556454b2.tar.gz
Restoring authorship annotation for <insight@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/yson/node/node.cpp')
-rw-r--r--library/cpp/yson/node/node.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/yson/node/node.cpp b/library/cpp/yson/node/node.cpp
index b39e070718..b38c32357a 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_);