From 273f8be9c048d19273f87afc62b34727811b7871 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 7 Nov 2015 12:41:08 -0800 Subject: 2386 - core tests passing again Layer 1 of edit/ is introducing spurious types, though. --- 057static_dispatch.cc | 4 ++-- 059generic_recipe.cc | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/057static_dispatch.cc b/057static_dispatch.cc index 8a35f086..0d687385 100644 --- a/057static_dispatch.cc +++ b/057static_dispatch.cc @@ -23,7 +23,7 @@ map > Recipe_variants; for (map >::iterator p = Recipe_variants.begin(); p != Recipe_variants.end(); ++p) { for (long long int i = 0; i < SIZE(p->second); ++i) { if (p->second.at(i) >= Reserved_for_tests) - p->second.at(i) = -1; + p->second.at(i) = -1; // just leave a ghost } } @@ -136,7 +136,7 @@ void replace_best_variant(instruction& inst) { } long long int variant_score(const instruction& inst, recipe_ordinal variant) { - if (variant == -1) return -1; + if (variant == -1) return -1; // ghost from a previous test const vector& header_ingredients = get(Recipe, variant).ingredients; if (SIZE(inst.ingredients) < SIZE(header_ingredients)) { trace(9993, "transform") << "too few ingredients" << end(); diff --git a/059generic_recipe.cc b/059generic_recipe.cc index e435f3f3..7b0ef162 100644 --- a/059generic_recipe.cc +++ b/059generic_recipe.cc @@ -57,6 +57,7 @@ if (any_type_ingredient_in_header(r)) return; recipe_ordinal pick_matching_generic_variant(vector& variants, const instruction& inst, long long int& best_score) { recipe_ordinal result = 0; for (long long int i = 0; i < SIZE(variants); ++i) { + if (variants.at(i) == -1) continue; // ghost from a previous test trace(9992, "transform") << "checking generic variant " << i << end(); long long int current_score = generic_variant_score(inst, variants.at(i)); trace(9992, "transform") << "final score: " << current_score << end(); -- cgit 1.4.1-2-gfad0