aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/scheme/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/scheme/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/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 29c0bf99a9..a11c4dd444 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)