From 38e96056e47a68e45c229a5e2f788a72a8efe206 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 4 Oct 2016 09:13:25 -0700 Subject: 3437 Drop an ancient case of premature optimization: skipping transform for recipes without bodies. These days recipes also have headers that need transforming. Thanks Caleb Couch for running into this issue. --- 012transform.cc | 1 - 053recipe_header.cc | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/012transform.cc b/012transform.cc index 36edd807..3a23efeb 100644 --- a/012transform.cc +++ b/012transform.cc @@ -50,7 +50,6 @@ void transform_all() { //? cerr << "transform " << t << '\n'; for (map::iterator p = Recipe.begin(); p != Recipe.end(); ++p) { recipe& r = p->second; - if (r.steps.empty()) continue; if (r.transformed_until != t-1) continue; // End Transform Checks (*Transform.at(t))(/*recipe_ordinal*/p->first); diff --git a/053recipe_header.cc b/053recipe_header.cc index 44e7e8da..c521eb69 100644 --- a/053recipe_header.cc +++ b/053recipe_header.cc @@ -422,6 +422,7 @@ void fill_in_reply_ingredients(recipe_ordinal r) { add_header_products(inst, caller_recipe); } // fall through reply + if (caller_recipe.steps.empty()) return; // error will be raised elsewhere if there's a product in the header; just give up const instruction& final_instruction = caller_recipe.steps.at(SIZE(caller_recipe.steps)-1); if (final_instruction.name != "reply" && final_instruction.name != "return") { instruction inst; -- cgit 1.4.1-2-gfad0