aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/json/domscheme_traits.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/json/domscheme_traits.h
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/json/domscheme_traits.h')
-rw-r--r--library/cpp/json/domscheme_traits.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/json/domscheme_traits.h b/library/cpp/json/domscheme_traits.h
index a5a99cd8cf..68b149a690 100644
--- a/library/cpp/json/domscheme_traits.h
+++ b/library/cpp/json/domscheme_traits.h
@@ -1,7 +1,7 @@
#pragma once
-#include "json_value.h"
-#include "json_reader.h"
+#include "json_value.h"
+#include "json_reader.h"
#include "json_writer.h"
#include <util/generic/algorithm.h>
@@ -125,7 +125,7 @@ struct TJsonTraits {
// boolean ops
static inline void Get(TConstValueRef v, bool def, bool& b) {
b =
- v->GetType() == NJson::JSON_UNDEFINED ? def : v->IsNull() ? def : v->GetBooleanRobust();
+ v->GetType() == NJson::JSON_UNDEFINED ? def : v->IsNull() ? def : v->GetBooleanRobust();
}
static inline void Get(TConstValueRef v, bool& b) {
@@ -136,14 +136,14 @@ struct TJsonTraits {
return v->IsBoolean();
}
-#define INTEGER_OPS(type, checkOp, getOp) \
- static inline void Get(TConstValueRef v, type def, type& i) { \
- i = v->checkOp() ? v->getOp() : def; \
- } \
- static inline void Get(TConstValueRef v, type& i) { \
- i = v->getOp(); \
- } \
- static inline bool IsValidPrimitive(const type&, TConstValueRef v) { \
+#define INTEGER_OPS(type, checkOp, getOp) \
+ static inline void Get(TConstValueRef v, type def, type& i) { \
+ i = v->checkOp() ? v->getOp() : def; \
+ } \
+ static inline void Get(TConstValueRef v, type& i) { \
+ i = v->getOp(); \
+ } \
+ static inline bool IsValidPrimitive(const type&, TConstValueRef v) { \
return v->checkOp() && v->getOp() >= Min<type>() && v->getOp() <= Max<type>(); \
}