aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--die.cpp5
-rw-r--r--die.h10
2 files changed, 5 insertions, 10 deletions
diff --git a/die.cpp b/die.cpp
index 7cacf18..d398021 100644
--- a/die.cpp
+++ b/die.cpp
@@ -29,13 +29,8 @@
Die::Die()
: m_hasValue(false),m_displayStatus(false),m_highlighted(true),m_base(1),m_color(""),m_op(Die::PLUS)//,m_mt(m_randomDevice)
{
-// uint seed = quintptr(this) + QDateTime::currentDateTime().toMSecsSinceEpoch();
-
- // qsrand(seed);
-
auto seed = std::chrono::high_resolution_clock::now().time_since_epoch().count();
m_rng = std::mt19937(quintptr(this)+seed);
-
}
Die::Die(const Die& die)
{
diff --git a/die.h b/die.h
index b17ced4..79bed6d 100644
--- a/die.h
+++ b/die.h
@@ -135,12 +135,12 @@ public:
void setOp(const Die::ArithmeticOperator &op);
private:
- qint64 m_value;
+ qint64 m_value = 0;
QList<qint64> m_rollResult;
- bool m_selected;
- bool m_hasValue;
- bool m_displayStatus;
- bool m_highlighted;
+ bool m_selected = false;
+ bool m_hasValue = false;
+ bool m_displayStatus = false;
+ bool m_highlighted = true;
qint64 m_maxValue;
qint64 m_base;
QString m_color;