From aa71918ae7a636e0b50c85cef5e8591bc93d353c Mon Sep 17 00:00:00 2001 From: Tim King Date: Sun, 25 Sep 2016 18:20:52 -0700 Subject: [PATCH] Deleting a temporary in theory sets enumerator. --- src/theory/sets/theory_sets_type_enumerator.h | 10 ++++++---- 1 file 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; -- 2.30.2