From 2fb903ed7309fd97c848b03f6587c9d0604efd24 Mon Sep 17 00:00:00 2001 From: yoni206 Date: Tue, 11 Sep 2018 09:30:35 -0700 Subject: [PATCH] Avoid calling size() every iteration (#2450) --- src/preprocessing/passes/global_negate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.30.2