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 ++++---- html/054static_dispatch.cc.html | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) 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); diff --git a/html/054static_dispatch.cc.html b/html/054static_dispatch.cc.html index f3723be9..c3f2c8cc 100644 --- a/html/054static_dispatch.cc.html +++ b/html/054static_dispatch.cc.html @@ -390,12 +390,12 @@ if ('onhashchange' in window) { 325 ¦ int score = abs(SIZE(candidate.products)-SIZE(inst.products)) 326 ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ + abs(SIZE(candidate.ingredients)-SIZE(inst.ingredients)); 327 ¦ // prefer functions with non-address ingredients or products -328 ¦ for (int i = 0; i < SIZE(candidate.ingredients); ++i) { -329 ¦ ¦ if (is_mu_address(candidate.ingredients.at(i))) +328 ¦ for (int j = 0; j < SIZE(candidate.ingredients); ++j) { +329 ¦ ¦ if (is_mu_address(candidate.ingredients.at(j))) 330 ¦ ¦ ¦ ++score; 331 ¦ } -332 ¦ for (int i = 0; i < SIZE(candidate.products); ++i) { -333 ¦ ¦ if (is_mu_address(candidate.products.at(i))) +332 ¦ for (int j = 0; j < SIZE(candidate.products); ++j) { +333 ¦ ¦ if (is_mu_address(candidate.products.at(j))) 334 ¦ ¦ ¦ ++score; 335 ¦ } 336 ¦ assert(score < 999); -- cgit 1.4.1-2-gfad0