diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
commit | 8cbc307de0221f84c80c42dcbe07d40727537e2c (patch) | |
tree | 625d5a673015d1df891e051033e9fcde5c7be4e5 /util/random/fast.cpp | |
parent | 30d1ef3941e0dc835be7609de5ebee66958f215a (diff) | |
download | ydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/random/fast.cpp')
-rw-r--r-- | util/random/fast.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/random/fast.cpp b/util/random/fast.cpp index 2f98dfc5d3..82d3c9bf76 100644 --- a/util/random/fast.cpp +++ b/util/random/fast.cpp @@ -27,13 +27,13 @@ TFastRng64::TArgs::TArgs(ui64 seed) noexcept { Seq2 = rng.GenRand(); } -TFastRng64::TArgs::TArgs(IInputStream& entropy) { +TFastRng64::TArgs::TArgs(IInputStream& entropy) { static_assert(sizeof(*this) == 3 * sizeof(ui64), "please, fix me"); entropy.LoadOrFail(this, sizeof(*this)); } template <class T> -static inline T Read(IInputStream& in) noexcept { +static inline T Read(IInputStream& in) noexcept { T t = T(); in.LoadOrFail(&t, sizeof(t)); @@ -41,12 +41,12 @@ static inline T Read(IInputStream& in) noexcept { return t; } -TFastRng32::TFastRng32(IInputStream& entropy) +TFastRng32::TFastRng32(IInputStream& entropy) : TFastRng32(Read<ui64>(entropy), Read<ui32>(entropy)) { } -TReallyFastRng32::TReallyFastRng32(IInputStream& entropy) +TReallyFastRng32::TReallyFastRng32(IInputStream& entropy) : TReallyFastRng32(Read<ui64>(entropy)) { } |