diff options
author | danlark <danlark@yandex-team.ru> | 2022-02-10 16:46:10 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:10 +0300 |
commit | baa58daefa91fde4b4769facdbd2903763b9c6a8 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/system/unaligned_mem.h | |
parent | 3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (diff) | |
download | ydb-baa58daefa91fde4b4769facdbd2903763b9c6a8.tar.gz |
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 2 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 61433ccfbe..4b84686f2f 100644 --- a/util/system/unaligned_mem.h +++ b/util/system/unaligned_mem.h @@ -16,11 +16,11 @@ inline T ReadUnaligned(const void* from) noexcept { return ret; } -// std::remove_reference_t for non-deduced context to prevent such code to blow below: -// ui8 first = f(); ui8 second = g(); -// WriteUnaligned(to, first - second) (int will be deduced) +// std::remove_reference_t for non-deduced context to prevent such code to blow below: +// ui8 first = f(); ui8 second = g(); +// WriteUnaligned(to, first - second) (int will be deduced) template <class T> -inline void WriteUnaligned(void* to, const std::remove_reference_t<T>& t) noexcept { +inline void WriteUnaligned(void* to, const std::remove_reference_t<T>& t) noexcept { memcpy(to, &t, sizeof(T)); } |