aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/die.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'die.cpp')
-rw-r--r--die.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/die.cpp b/die.cpp
index 2d2ff91..531853c 100644
--- a/die.cpp
+++ b/die.cpp
@@ -35,7 +35,7 @@ Die::Die()
, m_op(Die::PLUS) //,m_mt(m_randomDevice)
{
auto seed= std::chrono::high_resolution_clock::now().time_since_epoch().count();
- m_rng= std::mt19937(quintptr(this) + seed);
+ m_rng= std::mt19937(quintptr(this) + static_cast<unsigned long long>(seed));
}
Die::Die(const Die& die)
{
@@ -49,6 +49,8 @@ Die::Die(const Die& die)
m_base= die.m_base;
m_color= die.getColor();
m_op= die.getOp();
+ auto seed= std::chrono::high_resolution_clock::now().time_since_epoch().count();
+ m_rng= std::mt19937(quintptr(this) + static_cast<unsigned long long>(seed));
}
void Die::setValue(qint64 r)