diff options
| author | 2018-12-15 03:48:35 +0100 | |
|---|---|---|
| committer | 2018-12-15 03:48:35 +0100 | |
| commit | d442933e69771ddfdd4a6dd5f2c71526859394cb (patch) | |
| tree | 020cb4c757e033f3c036823f033320bed4c031fe /result | |
| parent | 2eaaedebc6750d5984190fd0f87caf771b248ae0 (diff) | |
| download | OneRoll-d442933e69771ddfdd4a6dd5f2c71526859394cb.tar.gz OneRoll-d442933e69771ddfdd4a6dd5f2c71526859394cb.zip | |
fix indent.
Diffstat (limited to 'result')
| -rw-r--r-- | result/result.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/result/result.cpp b/result/result.cpp index feede47..4c7275e 100644 --- a/result/result.cpp +++ b/result/result.cpp @@ -38,6 +38,7 @@ Result* Result::getPrevious() void Result::setPrevious(Result* p) { + Q_ASSERT(p != this); m_previous = p; } @@ -55,12 +56,15 @@ bool Result::hasResultOfType(RESULT_TYPE type) const } void Result::generateDotTree(QString& s) { - s.append(toString(true)); - s.append(";\n"); + auto str = toString(true); + if(s.contains(str)) + return; + s.append(str); + s.append(";\n"); if(nullptr!=m_previous) { - s.append(toString(false)); + s.append(toString(false)); s.append(" -> "); s.append(m_previous->toString(false)); s.append("[label=\"previousResult\"]\n"); @@ -68,9 +72,9 @@ void Result::generateDotTree(QString& s) } else { - s.append(toString(false)); + s.append(toString(false)); s.append(" -> "); - s.append("nullptr"); + s.append("nullptr"); s.append(" [label=\"previousResult\", shape=\"box\"];\n"); } |