aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/die.cpp
diff options
context:
space:
mode:
authorrenaud guezennec <renaud@rolisteam.org>2019-07-29 20:35:52 +0000
committerrenaud guezennec <renaud@rolisteam.org>2019-07-29 20:35:52 +0000
commit1a902d383eef1e042d4462cd07b9384fcdf4d118 (patch)
tree766b8ab720fa5da11730d2fc2388f51b9d14de49 /die.cpp
parentf5906125576a8323a731c9456ce3dfc53b67ef59 (diff)
parent0d4b68221bda594cc695d216dfa21306ddb69c85 (diff)
downloadOneRoll-1a902d383eef1e042d4462cd07b9384fcdf4d118.tar.gz
OneRoll-1a902d383eef1e042d4462cd07b9384fcdf4d118.zip
Merge branch 'liberation' into 'master'
Add fuzzer on the DiceParser See merge request kde/rolisteam-diceparser!2
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)