aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/hi_lo.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 /util/system/hi_lo.h
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/hi_lo.h')
-rw-r--r--util/system/hi_lo.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/util/system/hi_lo.h b/util/system/hi_lo.h
index f86870534f..ddd89836ab 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);