diff options
| author | 2019-07-29 20:35:52 +0000 | |
|---|---|---|
| committer | 2019-07-29 20:35:52 +0000 | |
| commit | 1a902d383eef1e042d4462cd07b9384fcdf4d118 (patch) | |
| tree | 766b8ab720fa5da11730d2fc2388f51b9d14de49 /result/result.cpp | |
| parent | f5906125576a8323a731c9456ce3dfc53b67ef59 (diff) | |
| parent | 0d4b68221bda594cc695d216dfa21306ddb69c85 (diff) | |
| download | OneRoll-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 'result/result.cpp')
| -rw-r--r-- | result/result.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/result/result.cpp b/result/result.cpp index edd00e4..983f1f4 100644 --- a/result/result.cpp +++ b/result/result.cpp @@ -22,7 +22,10 @@ #include "result.h" #include <QUuid> -Result::Result() : m_resultTypes(NONE), m_id(QString("\"%1\"").arg(QUuid::createUuid().toString())), m_previous(nullptr) +Result::Result() + : m_resultTypes(static_cast<int>(Dice::RESULT_TYPE::NONE)) + , m_id(QString("\"%1\"").arg(QUuid::createUuid().toString())) + , m_previous(nullptr) { } Result::~Result() {} @@ -43,9 +46,9 @@ bool Result::isStringResult() const return false; } void Result::clear() {} -bool Result::hasResultOfType(RESULT_TYPE type) const +bool Result::hasResultOfType(Dice::RESULT_TYPE type) const { - return (m_resultTypes & type); + return (m_resultTypes & static_cast<int>(type)); } void Result::generateDotTree(QString& s) { |