summaryrefslogtreecommitdiffstats
path: root/util/random/fast.cpp
diff options
context:
space:
mode:
authoryazevnul <[email protected]>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /util/random/fast.cpp
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/random/fast.cpp')
-rw-r--r--util/random/fast.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/random/fast.cpp b/util/random/fast.cpp
index 82d3c9bf761..2f98dfc5d35 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))
{
}