aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/scheme/scheme_cast.h
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/scheme/scheme_cast.h
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
downloadydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/scheme/scheme_cast.h')
-rw-r--r--library/cpp/scheme/scheme_cast.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/scheme/scheme_cast.h b/library/cpp/scheme/scheme_cast.h
index 0fa1242da5..00839e8017 100644
--- a/library/cpp/scheme/scheme_cast.h
+++ b/library/cpp/scheme/scheme_cast.h
@@ -161,13 +161,13 @@ namespace NJsonConverters {
typedef typename T::key_type TKey;
typedef typename T::mapped_type TMapped;
if (validate)
- Y_ENSURE(x.IsDict() || x.IsNull(), "not valid input scheme");
+ Y_ENSURE(x.IsDict() || x.IsNull(), "not valid input scheme");
out.clear();
if (x.IsDict()) {
const NSc::TDict& dict = x.GetDict();
- for (const auto& it : dict) {
- TKey key = NJsonConverters::FromString<TKey>(it.first, validate);
- TMapped val = NJsonConverters::FromTValue<TMapped>(it.second, validate);
+ for (const auto& it : dict) {
+ TKey key = NJsonConverters::FromString<TKey>(it.first, validate);
+ TMapped val = NJsonConverters::FromTValue<TMapped>(it.second, validate);
out.insert(std::pair<TKey, TMapped>(key, val));
}
}
@@ -187,13 +187,13 @@ namespace NJsonConverters {
void FromTValueSet(const NSc::TValue& x, T& out, const bool validate) {
typedef typename T::key_type TKey;
if (validate)
- Y_ENSURE(x.IsDict() || x.IsNull(), "not valid input scheme");
+ Y_ENSURE(x.IsDict() || x.IsNull(), "not valid input scheme");
out.clear();
if (x.IsDict()) {
const NSc::TDict& dict = x.GetDict();
- for (const auto& it : dict) {
+ for (const auto& it : dict) {
TKey key;
- NJsonConverters::FromString<TKey>(it.first, key, validate);
+ NJsonConverters::FromString<TKey>(it.first, key, validate);
out.insert(key);
}
}
@@ -215,14 +215,14 @@ namespace NJsonConverters {
template <typename T, typename A>
void FromTValue(const NSc::TValue& x, TVector<T, A>& out, const bool validate) {
if (validate)
- Y_ENSURE(x.IsArray() || x.IsNull(), "not valid input scheme");
+ Y_ENSURE(x.IsArray() || x.IsNull(), "not valid input scheme");
out.clear();
if (x.IsArray()) {
const NSc::TArray& arr = x.GetArray();
out.reserve(arr.size());
- for (const auto& it : arr) {
+ for (const auto& it : arr) {
T val;
- NJsonConverters::FromTValue(it, val, validate);
+ NJsonConverters::FromTValue(it, val, validate);
out.push_back(val);
}
}
@@ -289,7 +289,7 @@ namespace NJsonConverters {
template <class T1, class T2>
void FromTValue(const NSc::TValue& x, std::pair<T1, T2>& out, const bool validate) {
if (validate)
- Y_ENSURE(x.IsArray() || x.IsNull(), "not valid input scheme");
+ Y_ENSURE(x.IsArray() || x.IsNull(), "not valid input scheme");
if (x.IsArray()) {
const NSc::TArray& arr = x.GetArray();
if (arr.size() == 2) {