diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /util/system/hi_lo.h | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
download | ydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/hi_lo.h')
-rw-r--r-- | util/system/hi_lo.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/util/system/hi_lo.h b/util/system/hi_lo.h index ddd89836ab..f86870534f 100644 --- a/util/system/hi_lo.h +++ b/util/system/hi_lo.h @@ -5,7 +5,7 @@ #include <utility> #ifndef _little_endian_ - #error "Not implemented" + #error "Not implemented" #endif namespace NHiLoPrivate { @@ -17,23 +17,23 @@ namespace NHiLoPrivate { { } - TRepr Get() const { - return ReadUnaligned<TRepr>(Ptr); - } - operator TRepr() const { - return Get(); - } + TRepr Get() const { + return ReadUnaligned<TRepr>(Ptr); + } + operator TRepr() const { + return Get(); + } - const char* GetPtr() const { - return Ptr; - } + const char* GetPtr() const { + return Ptr; + } protected: const char* Ptr; }; template <class TRepr> - class TIntRef: public TConstIntRef<TRepr> { + class TIntRef: public TConstIntRef<TRepr> { public: explicit TIntRef(char* ptr) : TConstIntRef<TRepr>(ptr) @@ -45,9 +45,9 @@ namespace NHiLoPrivate { return *this; } - char* GetPtr() const { - return const_cast<char*>(this->Ptr); - } + char* GetPtr() const { + return const_cast<char*>(this->Ptr); + } }; template <class T> @@ -77,12 +77,12 @@ namespace NHiLoPrivate { template <class T> const char* CharPtrOf(const T& value) { - return reinterpret_cast<const char*>(&value); + return reinterpret_cast<const char*>(&value); } template <class T> char* CharPtrOf(T& value) { - return reinterpret_cast<char*>(&value); + return reinterpret_cast<char*>(&value); } template <class T> @@ -99,8 +99,8 @@ namespace NHiLoPrivate { auto MakeIntRef(T&& value) { using TRef = typename TReferenceType<typename std::decay<T>::type>::TType; static_assert( - std::is_scalar<TRef>::value, - "Hi* and Lo* functions can be applied only to scalar values"); + std::is_scalar<TRef>::value, + "Hi* and Lo* functions can be applied only to scalar values"); static_assert(sizeof(TRef) >= sizeof(TRepr), "Requested bit range is not within provided value"); constexpr size_t offset = IsLow ? 0 : sizeof(TRef) - sizeof(TRepr); |