diff options
author | Abseil Team <absl-team@google.com> | 2020-09-16 11:55:16 -0700 |
---|---|---|
committer | Gennadiy Rozental <rogeeff@google.com> | 2020-09-17 03:58:02 -0400 |
commit | 20feb1cdbd60a80fa1776d23adef1ad69d879110 (patch) | |
tree | 25e5a619bab70e2bfad9719a51740f598d3fec9a /absl/container | |
parent | c1ae0a497586edd38b0261846b8e4afdcfa30f0b (diff) |
Export of internal Abseil changes
--
9214ee309fa224a43eb1621bcf826ab9c86a4cd7 by Abseil Team <absl-team@google.com>:
Don't keep constructing/destructing `random_device`.
It causes an open/close pair on /dev/urandom.
This is somewhat expensive on Emscripten, and unnecessary since it is not using
the value anyway.
PiperOrigin-RevId: 332055452
--
4931ab77995b946f3ffba8036e0a00927b0d47e6 by Abseil Team <absl-team@google.com>:
TYPO: Stess->Stress
PiperOrigin-RevId: 332010526
--
95ae1dde505f74dc7fd68447bf27718db223688e by Gennadiy Rozental <rogeeff@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 332010411
GitOrigin-RevId: 9214ee309fa224a43eb1621bcf826ab9c86a4cd7
Change-Id: I23c5d6aa5aa488370e1b48f37366d3d99448e7ec
Diffstat (limited to 'absl/container')
-rw-r--r-- | absl/container/internal/hash_generator_testing.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/absl/container/internal/hash_generator_testing.cc b/absl/container/internal/hash_generator_testing.cc index 75c4db6c..59cc5aac 100644 --- a/absl/container/internal/hash_generator_testing.cc +++ b/absl/container/internal/hash_generator_testing.cc @@ -41,8 +41,10 @@ class RandomDeviceSeedSeq { } // namespace std::mt19937_64* GetSharedRng() { - RandomDeviceSeedSeq seed_seq; - static auto* rng = new std::mt19937_64(seed_seq); + static auto* rng = [] { + RandomDeviceSeedSeq seed_seq; + return new std::mt19937_64(seed_seq); + }(); return rng; } |