diff options
-rw-r--r-- | 057static_dispatch.cc | 4 | ||||
-rw-r--r-- | 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<string, vector<recipe_ordinal> > Recipe_variants; for (map<string, vector<recipe_ordinal> >::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<reagent>& 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<recipe_ordinal>& 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(); |