summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim King <taking@google.com>2016-09-25 18:20:52 -0700
committerTim King <taking@google.com>2016-09-25 18:20:52 -0700
commitaa71918ae7a636e0b50c85cef5e8591bc93d353c (patch)
tree58a556a766c5c210f9eba41dfac833e8bee9e32c
parent3589ffa88b622341e358e831ee3f1f48a5f58b8f (diff)
Deleting a temporary in theory sets enumerator.
-rw-r--r--src/theory/sets/theory_sets_type_enumerator.h10
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;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback