From: yoni206 Date: Tue, 11 Sep 2018 16:30:35 +0000 (-0700) Subject: Avoid calling size() every iteration (#2450) X-Git-Tag: cvc5-1.0.0~4661 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2fb903ed7309fd97c848b03f6587c9d0604efd24;p=cvc5.git Avoid calling size() every iteration (#2450) --- diff --git a/src/preprocessing/passes/global_negate.cpp b/src/preprocessing/passes/global_negate.cpp index ae71b3e78..8f48d417c 100644 --- a/src/preprocessing/passes/global_negate.cpp +++ b/src/preprocessing/passes/global_negate.cpp @@ -103,7 +103,7 @@ PreprocessingPassResult GlobalNegate::applyInternal( NodeManager* nm = NodeManager::currentNM(); Node simplifiedNode = simplify(assertionsToPreprocess->ref(), nm); Node trueNode = nm->mkConst(true); - for (unsigned i = 0; i < assertionsToPreprocess->size(); ++i) + for (unsigned i = 0, size = assertionsToPreprocess->size(); i < size; ++i) { if (i == 0) {