diff options
| author | pmatsula <[email protected]> | 2022-02-10 16:49:20 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:49:20 +0300 | 
| commit | 1278240bfbb8240f3c2d7a88085543f6bfaba73e (patch) | |
| tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/scheme | |
| parent | b4c80a816aa1aafd8484de35b31cee234033ad59 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/scheme')
| -rw-r--r-- | library/cpp/scheme/domscheme_traits.h | 52 | 
1 files changed, 26 insertions, 26 deletions
diff --git a/library/cpp/scheme/domscheme_traits.h b/library/cpp/scheme/domscheme_traits.h index 776a3c588ea..a11c4dd4446 100644 --- a/library/cpp/scheme/domscheme_traits.h +++ b/library/cpp/scheme/domscheme_traits.h @@ -4,30 +4,30 @@  #include <util/string/cast.h>  struct TSchemeTraits { -    using TValue = NSc::TValue;  -    using TValueRef = TValue*;  -    using TConstValueRef = const TValue*;  +    using TValue = NSc::TValue; +    using TValueRef = TValue*; +    using TConstValueRef = const TValue*;      using TStringType = TStringBuf; -    // anyvalue defaults  -    template <class T>  -    static inline TValue Value(T&& t) {  -        return TValue(std::forward<T>(t));  -    }  -  -    template <class T>  -    static inline TValue Value(std::initializer_list<T> t) {  -        return TValue().SetArray().AppendAll(t);  -    }  -  -    static inline TValueRef Ref(TValue& v) {  -        return &v;  -    }  -  -    static inline TConstValueRef Ref(const TValue& v) {  -        return &v;  -    }  -  +    // anyvalue defaults +    template <class T> +    static inline TValue Value(T&& t) { +        return TValue(std::forward<T>(t)); +    } + +    template <class T> +    static inline TValue Value(std::initializer_list<T> t) { +        return TValue().SetArray().AppendAll(t); +    } + +    static inline TValueRef Ref(TValue& v) { +        return &v; +    } + +    static inline TConstValueRef Ref(const TValue& v) { +        return &v; +    } +      // common ops      static inline bool IsNull(TConstValueRef v) {          return v->IsNull(); @@ -56,13 +56,13 @@ struct TSchemeTraits {          v->ClearArray();      } -    using TArrayIterator = size_t;  -  -    static inline TValueRef ArrayElement(TValueRef v, TArrayIterator n) {  +    using TArrayIterator = size_t; + +    static inline TValueRef ArrayElement(TValueRef v, TArrayIterator n) {          return &(*v)[n];      } -    static inline TConstValueRef ArrayElement(TConstValueRef v, TArrayIterator n) {  +    static inline TConstValueRef ArrayElement(TConstValueRef v, TArrayIterator n) {          return &(*v)[n];      }  | 
