aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/json/domscheme_traits.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/json/domscheme_traits.h
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 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 68b149a690..a5a99cd8cf 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>(); \
}