File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ add_geode_library(
8080 Bitsery::bitsery
8181 PRIVATE_DEPENDENCIES
8282 Async++
83+ absl::random_random
8384 absl::time
8485 spdlog::spdlog_header_only
8586 MINIZIP::minizip-ng
Original file line number Diff line number Diff line change 2424#include < geode/basic/uuid.h>
2525
2626#include < iomanip>
27- #include < random>
2827#include < sstream>
2928
29+ #include < absl/random/random.h>
30+
3031namespace
3132{
3233 size_t decode ( char ch )
@@ -51,12 +52,12 @@ namespace geode
5152{
5253 uuid::uuid ()
5354 {
54- static thread_local std::random_device rd ;
55- static thread_local std ::uniform_int_distribution< uint64_t > dist (
55+ static thread_local absl::BitGen gen ;
56+ static thread_local absl ::uniform_int_distribution< uint64_t > dist (
5657 0u , ~0u );
5758
58- ab = dist ( rd );
59- cd = dist ( rd );
59+ ab = dist ( gen );
60+ cd = dist ( gen );
6061
6162 ab = ( ab & 0xFFFFFFFFFFFF0FFFULL ) | 0x0000000000004000ULL ;
6263 cd = ( cd & 0x3FFFFFFFFFFFFFFFULL ) | 0x8000000000000000ULL ;
You can’t perform that action at this time.
0 commit comments