aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/unaligned_mem.h
diff options
context:
space:
mode:
authorAlexey Salmin <alexey.salmin@gmail.com>2022-02-10 16:49:37 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:37 +0300
commit3c5b1607b38f637d2f3313791ed25c2e080d2647 (patch)
tree99be7b96e7c66612fbca94331100ef3b5fedcb88 /util/system/unaligned_mem.h
parentde89752358147d7b25ef59a85b431bb564068a49 (diff)
downloadydb-3c5b1607b38f637d2f3313791ed25c2e080d2647.tar.gz
Restoring authorship annotation for Alexey Salmin <alexey.salmin@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/system/unaligned_mem.h')
-rw-r--r--util/system/unaligned_mem.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/system/unaligned_mem.h b/util/system/unaligned_mem.h
index 4b84686f2f..abcdde9fd6 100644
--- a/util/system/unaligned_mem.h
+++ b/util/system/unaligned_mem.h
@@ -6,11 +6,11 @@
#include <string.h>
#include <type_traits>
-// The following code used to have smart tricks assuming that unaligned reads and writes are OK on x86. This assumption
-// is wrong because compiler may emit alignment-sensitive x86 instructions e.g. movaps. See IGNIETFERRO-735.
-
+// The following code used to have smart tricks assuming that unaligned reads and writes are OK on x86. This assumption
+// is wrong because compiler may emit alignment-sensitive x86 instructions e.g. movaps. See IGNIETFERRO-735.
+
template <class T>
-inline T ReadUnaligned(const void* from) noexcept {
+inline T ReadUnaligned(const void* from) noexcept {
T ret;
memcpy(&ret, from, sizeof(T));
return ret;