aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/byteorder.h
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.ru>2022-02-10 16:45:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:08 +0300
commit4e839db24a3bbc9f1c610c43d6faaaa99824dcca (patch)
tree506dac10f5df94fab310584ee51b24fc5a081c22 /util/system/byteorder.h
parent2d37894b1b037cf24231090eda8589bbb44fb6fc (diff)
downloadydb-4e839db24a3bbc9f1c610c43d6faaaa99824dcca.tar.gz
Restoring authorship annotation for <thegeorg@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/byteorder.h')
-rw-r--r--util/system/byteorder.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/util/system/byteorder.h b/util/system/byteorder.h
index 94b9fea515..b8a2c05f81 100644
--- a/util/system/byteorder.h
+++ b/util/system/byteorder.h
@@ -30,28 +30,28 @@
#define SwapBytes32 OSSwapInt32
#define SwapBytes64 OSSwapInt64
#endif
-#endif
+#endif
-#ifndef SwapBytes16
+#ifndef SwapBytes16
inline ui16 SwapBytes16(ui16 val) noexcept {
- #define byte_n(__val, __n) ((((unsigned char*)(&__val))[__n]))
+ #define byte_n(__val, __n) ((((unsigned char*)(&__val))[__n]))
DoSwap(byte_n(val, 0), byte_n(val, 1));
return val;
- #undef byte_n
+ #undef byte_n
}
-#endif
+#endif
-#ifndef SwapBytes32
+#ifndef SwapBytes32
inline ui32 SwapBytes32(ui32 val) noexcept {
- #define byte_n(__val, __n) ((((unsigned char*)(&__val))[__n]))
+ #define byte_n(__val, __n) ((((unsigned char*)(&__val))[__n]))
DoSwap(byte_n(val, 0), byte_n(val, 3));
DoSwap(byte_n(val, 1), byte_n(val, 2));
return val;
- #undef byte_n
+ #undef byte_n
}
-#endif
+#endif
-#ifndef SwapBytes64
+#ifndef SwapBytes64
inline ui64 SwapBytes64(ui64 val) noexcept {
union {
ui64 val;