aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/json/writer
diff options
context:
space:
mode:
authorrumvadim <rumvadim@yandex-team.ru>2022-02-10 16:50:11 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:11 +0300
commit03ed72c7c79029264440f45994a0b30e84919e80 (patch)
tree6c09e58101af1040d0c4526b7bb938fc0ba007cb /library/cpp/json/writer
parentf96c49839404784ec306cf2b5523a240c63f8eea (diff)
downloadydb-03ed72c7c79029264440f45994a0b30e84919e80.tar.gz
Restoring authorship annotation for <rumvadim@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/json/writer')
-rw-r--r--library/cpp/json/writer/json_value.cpp24
-rw-r--r--library/cpp/json/writer/json_value.h12
2 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/json/writer/json_value.cpp b/library/cpp/json/writer/json_value.cpp
index c61e8d1dc4..9e7d3d0c4d 100644
--- a/library/cpp/json/writer/json_value.cpp
+++ b/library/cpp/json/writer/json_value.cpp
@@ -249,12 +249,12 @@ namespace NJson {
}
TJsonValue& TJsonValue::Back() {
- BackChecks();
- return Value.Array->back();
- }
+ BackChecks();
+ return Value.Array->back();
+ }
- const TJsonValue& TJsonValue::Back() const {
- BackChecks();
+ const TJsonValue& TJsonValue::Back() const {
+ BackChecks();
return Value.Array->back();
}
@@ -1089,13 +1089,13 @@ namespace NJson {
return true;
}
- void TJsonValue::BackChecks() const {
- if (Type != JSON_ARRAY)
- ythrow TJsonException() << "Not an array";
-
- if (Value.Array->empty())
- ythrow TJsonException() << "Get back on empty array";
- }
+ void TJsonValue::BackChecks() const {
+ if (Type != JSON_ARRAY)
+ ythrow TJsonException() << "Not an array";
+
+ if (Value.Array->empty())
+ ythrow TJsonException() << "Get back on empty array";
+ }
}
template <>
diff --git a/library/cpp/json/writer/json_value.h b/library/cpp/json/writer/json_value.h
index 3f0f50bc4c..965b9dc3c4 100644
--- a/library/cpp/json/writer/json_value.h
+++ b/library/cpp/json/writer/json_value.h
@@ -87,7 +87,7 @@ namespace NJson {
TJsonValue& AppendValue(const TJsonValue& value);
TJsonValue& AppendValue(TJsonValue&& value);
TJsonValue& Back();
- const TJsonValue& Back() const;
+ const TJsonValue& Back() const;
bool GetValueByPath(TStringBuf path, TJsonValue& result, char delimiter = '.') const;
bool SetValueByPath(TStringBuf path, const TJsonValue& value, char delimiter = '.');
@@ -213,11 +213,11 @@ namespace NJson {
TValueUnion Value;
void DoScan(const TString& path, TJsonValue* parent, IScanCallback& callback);
void SwapWithUndefined(TJsonValue& output) noexcept;
-
- /**
- @throw yexception if Back shouldn't be called on the object.
- */
- void BackChecks() const;
+
+ /**
+ @throw yexception if Back shouldn't be called on the object.
+ */
+ void BackChecks() const;
};
inline bool GetBoolean(const TJsonValue& jv, size_t index, bool* value) noexcept {