From: Tim King Date: Mon, 9 Nov 2015 19:16:47 +0000 (-0800) Subject: Replacing an inefficient use of std::find(...) to use std::set's find() instead. X-Git-Tag: cvc5-1.0.0~6173 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=50c8533760bfd5b1f803d52bc4318c544521e6af;p=cvc5.git Replacing an inefficient use of std::find(...) to use std::set's find() instead. --- diff --git a/src/theory/uf/symmetry_breaker.cpp b/src/theory/uf/symmetry_breaker.cpp index bd85b735d..d5e18ed14 100644 --- a/src/theory/uf/symmetry_breaker.cpp +++ b/src/theory/uf/symmetry_breaker.cpp @@ -743,7 +743,7 @@ SymmetryBreaker::selectMostPromisingTerm(Terms& terms) { void SymmetryBreaker::insertUsedIn(Term term, const Permutation& p, set& cts) { // insert terms from p used in term into cts //Debug("ufsymm") << "UFSYMM usedIn(): " << term << " , " << p << endl; - if(find(p.begin(), p.end(), term) != p.end()) { + if (p.find(term) != p.end()) { cts.insert(term); } else { for(TNode::iterator i = term.begin(); i != term.end(); ++i) {