diff options
author | mowgli <mowgli@yandex-team.ru> | 2022-02-10 16:49:25 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:25 +0300 |
commit | 56c39b3cf908e7202b1f7551a1653681e8015607 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/json/writer/json_value.cpp | |
parent | 89afbbe4ca0e02e386dd4df08f7945f190dc1b84 (diff) | |
download | ydb-56c39b3cf908e7202b1f7551a1653681e8015607.tar.gz |
Restoring authorship annotation for <mowgli@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/json/writer/json_value.cpp')
-rw-r--r-- | library/cpp/json/writer/json_value.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/json/writer/json_value.cpp b/library/cpp/json/writer/json_value.cpp index e92099e44c..c61e8d1dc4 100644 --- a/library/cpp/json/writer/json_value.cpp +++ b/library/cpp/json/writer/json_value.cpp @@ -3,7 +3,7 @@ #include <util/generic/ymath.h> #include <util/generic/ylimits.h> -#include <util/generic/utility.h> +#include <util/generic/utility.h> #include <util/generic/singleton.h> #include <util/stream/str.h> #include <util/stream/output.h> @@ -286,8 +286,8 @@ namespace NJson { TArray::iterator it = Value.Array->begin() + index; Value.Array->erase(it); } - } - + } + void TJsonValue::Clear() noexcept { switch (Type) { case JSON_STRING: @@ -714,8 +714,8 @@ namespace NJson { return false; *value = Value.Array; - return true; - } + return true; + } bool TJsonValue::GetValue(const size_t index, TJsonValue* value) const { const TJsonValue* tmp = nullptr; @@ -724,7 +724,7 @@ namespace NJson { return true; } return false; - } + } bool TJsonValue::GetValue(const TStringBuf key, TJsonValue* value) const { const TJsonValue* tmp = nullptr; @@ -733,15 +733,15 @@ namespace NJson { return true; } return false; - } + } bool TJsonValue::GetValuePointer(const size_t index, const TJsonValue** value) const noexcept { if (Type == JSON_ARRAY && index < Value.Array->size()) { *value = &(*Value.Array)[index]; - return true; - } + return true; + } return false; - } + } bool TJsonValue::GetValuePointer(const TStringBuf key, const TJsonValue** value) const noexcept { if (Type == JSON_MAP) { @@ -882,8 +882,8 @@ namespace NJson { const TJsonValue* TJsonValue::GetValueByPath(const TStringBuf key, char delim) const noexcept { return GetValuePtrByPath<false>(this, key, delim); - } - + } + TJsonValue* TJsonValue::GetValueByPath(const TStringBuf key, char delim) noexcept { return GetValuePtrByPath<false>(this, key, delim); } @@ -945,11 +945,11 @@ namespace NJson { case JSON_INTEGER: { return (rhs.IsInteger() && GetInteger() == rhs.GetInteger()); } - + case JSON_UINTEGER: { return (rhs.IsUInteger() && GetUInteger() == rhs.GetUInteger()); } - + case JSON_STRING: { return (rhs.IsString() && Value.String == rhs.Value.String); } @@ -978,7 +978,7 @@ namespace NJson { } else { std::memcpy(&output.Value, &Value, sizeof(Value)); } - + output.Type = Type; Type = JSON_UNDEFINED; } |