mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Ref T387 Cast to avoid clang warning.
This commit is contained in:
committed by
Klaus Basan
parent
1d02975e4c
commit
8716ef4f2d
@@ -28,8 +28,9 @@ namespace BlackMisc
|
||||
//! \threadsafe
|
||||
inline std::mt19937 &defaultRandomGenerator()
|
||||
{
|
||||
//! \fixme Qt 5.10: Use QRandomGenerator.
|
||||
static QThreadStorage<std::mt19937> rng;
|
||||
if (rng.hasLocalData()) { rng.setLocalData(std::mt19937(qrand())); }
|
||||
if (rng.hasLocalData()) { rng.setLocalData(std::mt19937(static_cast<std::mt19937::result_type>(qrand()))); }
|
||||
return rng.localData();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user