diff options
Diffstat (limited to 'src/theory/sets')
-rw-r--r-- | src/theory/sets/theory_sets_type_enumerator.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/theory/sets/theory_sets_type_enumerator.h b/src/theory/sets/theory_sets_type_enumerator.h index 40863b0f2..f2d6bae68 100644 --- a/src/theory/sets/theory_sets_type_enumerator.h +++ b/src/theory/sets/theory_sets_type_enumerator.h @@ -153,14 +153,16 @@ public: } while (d_constituentVec.size() < d_index) { - TypeEnumerator *d_newEnumerator = new TypeEnumerator(*d_constituentVec.back()); - ++(*d_newEnumerator); - if( (*d_newEnumerator).isFinished() ) { + TypeEnumerator* newEnumerator = + new TypeEnumerator(*d_constituentVec.back()); + ++(*newEnumerator); + if (newEnumerator->isFinished()) { Trace("set-type-enum") << "operator++ finished!" << std::endl; + delete newEnumerator; d_finished = true; return *this; } - d_constituentVec.push_back(d_newEnumerator); + d_constituentVec.push_back(newEnumerator); } Trace("set-type-enum") << "operator++ returning, **this = " << **this << std::endl; |