aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/result/diceresult.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2015-04-24 21:35:17 +0200
committerRenaud G <renaud@rolisteam.org>2015-04-24 21:35:17 +0200
commit8beb664172cf2c15abb4e12938b8978506471c02 (patch)
treef033c9df5436abe8848a8b4d69353229028c02bd /result/diceresult.cpp
parent67fd3b480f543f2f18bd632ea85d829ba2102a20 (diff)
parentedfcca8d1a630ca7ca79133bd0b03af14fef6363 (diff)
downloadOneRoll-8beb664172cf2c15abb4e12938b8978506471c02.tar.gz
OneRoll-8beb664172cf2c15abb4e12938b8978506471c02.zip
Merge branch 'master' of github.com:obiwankennedy/DiceParser
Conflicts: parsingtoolbox.cpp
Diffstat (limited to 'result/diceresult.cpp')
-rw-r--r--result/diceresult.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/result/diceresult.cpp b/result/diceresult.cpp
index 0cabb11..f87079a 100644
--- a/result/diceresult.cpp
+++ b/result/diceresult.cpp
@@ -35,17 +35,15 @@ QList<Die*>& DiceResult::getResultList()
}
void DiceResult::setResultList(QList<Die*> list)
{
+ qDeleteAll(m_diceValues.begin(), m_diceValues.end());
m_diceValues.clear();
m_diceValues << list;
}
-//bool DiceResult::isScalar() const
-//{
-// if(m_diceValues.size()==1)
-// {
-// return true;
-// }
-// return false;
-//}
+DiceResult::~DiceResult()
+{
+ qDeleteAll(m_diceValues.begin(), m_diceValues.end());
+ m_diceValues.clear();
+}
QVariant DiceResult::getResult(RESULT_TYPE type)
{