aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/scheme/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/scheme/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/scheme/domscheme_traits.h')
-rw-r--r--library/cpp/scheme/domscheme_traits.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/library/cpp/scheme/domscheme_traits.h b/library/cpp/scheme/domscheme_traits.h
index a11c4dd444..29c0bf99a9 100644
--- a/library/cpp/scheme/domscheme_traits.h
+++ b/library/cpp/scheme/domscheme_traits.h
@@ -1,6 +1,6 @@
#pragma once
-#include "scheme.h"
+#include "scheme.h"
#include <util/string/cast.h>
struct TSchemeTraits {
@@ -135,28 +135,28 @@ struct TSchemeTraits {
return v->IsTrue() || v->IsExplicitFalse();
}
-#define INTEGER_OPS_EX(type, min, max, isUnsigned) \
- static inline void Get(TConstValueRef v, type def, type& i) { \
- if (isUnsigned) { \
- i = v->IsNumber() && v->GetIntNumber() >= 0 ? v->GetIntNumber() : def; \
- } else { \
- i = v->IsNumber() ? v->GetIntNumber() : def; \
- } \
- } \
- static inline void Get(TConstValueRef v, type& i) { \
- if (isUnsigned) { \
- i = Max<i64>(0, v->GetIntNumber()); \
- } else { \
- i = v->GetIntNumber(); \
- } \
- } \
- static inline bool IsValidPrimitive(const type&, TConstValueRef v) { \
- return v->IsIntNumber() && \
- v->GetIntNumber() >= min && \
- v->GetIntNumber() <= max; \
- } \
- static inline void Set(TValueRef v, type i) { \
- v->SetIntNumber(i); \
+#define INTEGER_OPS_EX(type, min, max, isUnsigned) \
+ static inline void Get(TConstValueRef v, type def, type& i) { \
+ if (isUnsigned) { \
+ i = v->IsNumber() && v->GetIntNumber() >= 0 ? v->GetIntNumber() : def; \
+ } else { \
+ i = v->IsNumber() ? v->GetIntNumber() : def; \
+ } \
+ } \
+ static inline void Get(TConstValueRef v, type& i) { \
+ if (isUnsigned) { \
+ i = Max<i64>(0, v->GetIntNumber()); \
+ } else { \
+ i = v->GetIntNumber(); \
+ } \
+ } \
+ static inline bool IsValidPrimitive(const type&, TConstValueRef v) { \
+ return v->IsIntNumber() && \
+ v->GetIntNumber() >= min && \
+ v->GetIntNumber() <= max; \
+ } \
+ static inline void Set(TValueRef v, type i) { \
+ v->SetIntNumber(i); \
}
#define INTEGER_OPS(type, isUnsigned) INTEGER_OPS_EX(type, Min<type>(), Max<type>(), isUnsigned)