diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/yson_pull/read_ops.cpp | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/yson_pull/read_ops.cpp')
-rw-r--r-- | library/cpp/yson_pull/read_ops.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/library/cpp/yson_pull/read_ops.cpp b/library/cpp/yson_pull/read_ops.cpp index 9d7e6a4a2d..d565ac7e51 100644 --- a/library/cpp/yson_pull/read_ops.cpp +++ b/library/cpp/yson_pull/read_ops.cpp @@ -7,53 +7,53 @@ namespace { bool TrySkipValueUntil(EEventType end, TReader& reader) { const auto& event = reader.NextEvent(); if (event.Type() == end) { - return false; - } - SkipCurrentValue(event, reader); - return true; - } + return false; + } + SkipCurrentValue(event, reader); + return true; + } bool TrySkipKeyValueUntil(EEventType end, TReader& reader) { const auto& event = reader.NextEvent(); if (event.Type() == end) { - return false; - } + return false; + } Expect(event, EEventType::Key); - SkipValue(reader); - return true; - } + SkipValue(reader); + return true; + } } void NYsonPull::NReadOps::SkipCurrentValue(const TEvent& event, TReader& reader) { switch (event.Type()) { case EEventType::BeginList: while (TrySkipValueUntil(EEventType::EndList, reader)) { - } - return; + } + return; case EEventType::BeginMap: while (TrySkipKeyValueUntil(EEventType::EndMap, reader)) { - } - return; + } + return; case EEventType::BeginAttributes: while (TrySkipKeyValueUntil(EEventType::EndAttributes, reader)) { - } - // attributes after attributes are disallowed in TReader - SkipValue(reader); - return; + } + // attributes after attributes are disallowed in TReader + SkipValue(reader); + return; case EEventType::Scalar: - return; + return; - default: - throw yexception() << "Unexpected event: " << event; - } + default: + throw yexception() << "Unexpected event: " << event; + } } void NYsonPull::NReadOps::SkipValue(TReader& reader) { const auto& event = reader.NextEvent(); - SkipCurrentValue(event, reader); + SkipCurrentValue(event, reader); } void NYsonPull::NReadOps::SkipControlRecords(TReader& reader) { |