diff options
author | Alexey Salmin <alexey.salmin@gmail.com> | 2022-02-10 16:49:37 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:37 +0300 |
commit | 3c5b1607b38f637d2f3313791ed25c2e080d2647 (patch) | |
tree | 99be7b96e7c66612fbca94331100ef3b5fedcb88 /util/system/unaligned_mem.h | |
parent | de89752358147d7b25ef59a85b431bb564068a49 (diff) | |
download | ydb-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.h | 8 |
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; |