aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/scheme/scimpl.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/scimpl.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/scimpl.h')
-rw-r--r--library/cpp/scheme/scimpl.h134
1 files changed, 67 insertions, 67 deletions
diff --git a/library/cpp/scheme/scimpl.h b/library/cpp/scheme/scimpl.h
index fafea0826a..4f68f16290 100644
--- a/library/cpp/scheme/scimpl.h
+++ b/library/cpp/scheme/scimpl.h
@@ -18,8 +18,8 @@ namespace NSc {
: Pool(p)
, Dict(Pool->Get())
, Array(Pool->Get())
- {
- }
+ {
+ }
bool IsNull() const {
return TValue::EType::Null == ValueType;
@@ -101,17 +101,17 @@ namespace NSc {
double& GetNumberMutable(double defaultnum) {
switch (ValueType) {
- case TValue::EType::Bool:
- SetNumber(bool(IntNumber));
- break;
- case TValue::EType::IntNumber:
- SetNumber(IntNumber);
- break;
- case TValue::EType::FloatNumber:
- break;
- default:
- SetNumber(defaultnum);
- break;
+ case TValue::EType::Bool:
+ SetNumber(bool(IntNumber));
+ break;
+ case TValue::EType::IntNumber:
+ SetNumber(IntNumber);
+ break;
+ case TValue::EType::FloatNumber:
+ break;
+ default:
+ SetNumber(defaultnum);
+ break;
}
return FloatNumber;
@@ -119,17 +119,17 @@ namespace NSc {
i64& GetIntNumberMutable(i64 defaultnum) {
switch (ValueType) {
- case TValue::EType::Bool:
- SetIntNumber(bool(IntNumber));
- break;
- case TValue::EType::IntNumber:
- break;
- case TValue::EType::FloatNumber:
- SetIntNumber(FloatNumber);
- break;
- default:
- SetIntNumber(defaultnum);
- break;
+ case TValue::EType::Bool:
+ SetIntNumber(bool(IntNumber));
+ break;
+ case TValue::EType::IntNumber:
+ break;
+ case TValue::EType::FloatNumber:
+ SetIntNumber(FloatNumber);
+ break;
+ default:
+ SetIntNumber(defaultnum);
+ break;
}
return IntNumber;
@@ -153,27 +153,27 @@ namespace NSc {
double GetNumber(double d = 0) const {
switch (ValueType) {
- case TValue::EType::Bool:
- return (bool)IntNumber;
- case TValue::EType::IntNumber:
- return IntNumber;
- case TValue::EType::FloatNumber:
- return FloatNumber;
- default:
- return d;
+ case TValue::EType::Bool:
+ return (bool)IntNumber;
+ case TValue::EType::IntNumber:
+ return IntNumber;
+ case TValue::EType::FloatNumber:
+ return FloatNumber;
+ default:
+ return d;
}
}
i64 GetIntNumber(i64 n = 0) const {
switch (ValueType) {
- case TValue::EType::Bool:
- return (bool)IntNumber;
- case TValue::EType::IntNumber:
- return IntNumber;
- case TValue::EType::FloatNumber:
- return FloatNumber;
- default:
- return n;
+ case TValue::EType::Bool:
+ return (bool)IntNumber;
+ case TValue::EType::IntNumber:
+ return IntNumber;
+ case TValue::EType::FloatNumber:
+ return FloatNumber;
+ default:
+ return n;
}
}
@@ -399,14 +399,14 @@ namespace NSc {
TValue::TValue(TValue& v)
: TheCore(v.TheCore)
, CopyOnWrite(v.CopyOnWrite)
- {
- }
+ {
+ }
TValue::TValue(const TValue& v)
: TheCore(v.TheCore)
, CopyOnWrite(true)
- {
- }
+ {
+ }
TValue::TValue(TValue&& v) noexcept
: TheCore(std::move(v.TheCore))
@@ -609,13 +609,13 @@ namespace NSc {
template <class TIt>
TValue& TValue::AppendAll(TIt begin, TIt end) {
- GetArrayMutable().AppendAll(begin, end);
- return *this;
+ GetArrayMutable().AppendAll(begin, end);
+ return *this;
}
template <class TColl>
TValue& TValue::AppendAll(TColl&& coll) {
- return AppendAll(std::begin(coll), std::end(coll));
+ return AppendAll(std::begin(coll), std::end(coll));
}
TValue& TValue::AppendAll(std::initializer_list<TValue> coll) {
@@ -810,30 +810,30 @@ namespace NSc {
int CompareFloat(const NSc::TValue& a, double r);
}
- bool operator==(const TValue& a, const TValue& b);
+ bool operator==(const TValue& a, const TValue& b);
- bool operator!=(const TValue& a, const TValue& b);
+ bool operator!=(const TValue& a, const TValue& b);
- bool operator<=(const TValue&, const TValue&) = delete;
- bool operator>=(const TValue&, const TValue&) = delete;
- bool operator<(const TValue&, const TValue&) = delete;
- bool operator>(const TValue&, const TValue&) = delete;
+ bool operator<=(const TValue&, const TValue&) = delete;
+ bool operator>=(const TValue&, const TValue&) = delete;
+ bool operator<(const TValue&, const TValue&) = delete;
+ bool operator>(const TValue&, const TValue&) = delete;
#define LIBRARY_SCHEME_DECLARE_TVALUE_OPS(T, Impl) \
- bool operator==(const NSc::TValue& a, T b); \
- bool operator==(T b, const NSc::TValue& a); \
- bool operator!=(const NSc::TValue& a, T b); \
- bool operator!=(T b, const NSc::TValue& a); \
- bool operator<=(const NSc::TValue& a, T b); \
- bool operator<=(T b, const NSc::TValue& a); \
- bool operator>=(const NSc::TValue& a, T b); \
- bool operator>=(T b, const NSc::TValue& a); \
- bool operator<(const NSc::TValue& a, T b); \
- bool operator<(T b, const NSc::TValue& a); \
- bool operator>(const NSc::TValue& a, T b); \
- bool operator>(T b, const NSc::TValue& a);
-
-#define LIBRARY_SCHEME_DECLARE_TVALUE_INT_OPS(T) \
+ bool operator==(const NSc::TValue& a, T b); \
+ bool operator==(T b, const NSc::TValue& a); \
+ bool operator!=(const NSc::TValue& a, T b); \
+ bool operator!=(T b, const NSc::TValue& a); \
+ bool operator<=(const NSc::TValue& a, T b); \
+ bool operator<=(T b, const NSc::TValue& a); \
+ bool operator>=(const NSc::TValue& a, T b); \
+ bool operator>=(T b, const NSc::TValue& a); \
+ bool operator<(const NSc::TValue& a, T b); \
+ bool operator<(T b, const NSc::TValue& a); \
+ bool operator>(const NSc::TValue& a, T b); \
+ bool operator>(T b, const NSc::TValue& a);
+
+#define LIBRARY_SCHEME_DECLARE_TVALUE_INT_OPS(T) \
LIBRARY_SCHEME_DECLARE_TVALUE_OPS(signed T, CompareInt) \
LIBRARY_SCHEME_DECLARE_TVALUE_OPS(unsigned T, CompareInt)