From 5b96e723f17681368900dd817bfff7d11ef55b9a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 4 Apr 2017 19:43:57 -0700 Subject: 3813 --- 054static_dispatch.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '054static_dispatch.cc') diff --git a/054static_dispatch.cc b/054static_dispatch.cc index 7fdfa391..6e2638ef 100644 --- a/054static_dispatch.cc +++ b/054static_dispatch.cc @@ -325,12 +325,12 @@ const recipe& best_variant(const instruction& inst, vector& cand int score = abs(SIZE(candidate.products)-SIZE(inst.products)) + abs(SIZE(candidate.ingredients)-SIZE(inst.ingredients)); // prefer functions with non-address ingredients or products - for (int i = 0; i < SIZE(candidate.ingredients); ++i) { - if (is_mu_address(candidate.ingredients.at(i))) + for (int j = 0; j < SIZE(candidate.ingredients); ++j) { + if (is_mu_address(candidate.ingredients.at(j))) ++score; } - for (int i = 0; i < SIZE(candidate.products); ++i) { - if (is_mu_address(candidate.products.at(i))) + for (int j = 0; j < SIZE(candidate.products); ++j) { + if (is_mu_address(candidate.products.at(j))) ++score; } assert(score < 999); -- cgit 1.4.1-2-gfad0