diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-10-24 08:57:45 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-10-24 08:57:45 -0700 |
commit | ae9db5a45f5e6bbee363fb0cd0a75a904d913b7b (patch) | |
tree | a35afd62e18c4b026e0703fe04f2136aa0402216 /053recipe_header.cc | |
parent | 87eb3acae90e0c7a36562da1bc930e03f1e12cb7 (diff) | |
download | mu-ae9db5a45f5e6bbee363fb0cd0a75a904d913b7b.tar.gz |
3587
Another CI fix.
Diffstat (limited to '053recipe_header.cc')
-rw-r--r-- | 053recipe_header.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/053recipe_header.cc b/053recipe_header.cc index e6cc51d9..87b018c8 100644 --- a/053recipe_header.cc +++ b/053recipe_header.cc @@ -248,6 +248,15 @@ def foo a:num [ if (is_present_in_ingredients(get(Recipe, get(Recipe_ordinal, recipe_name)), x.name)) raise << " did you forget 'load-ingredients'?\n" << end(); +:(code) +bool is_present_in_ingredients(const recipe& callee, const string& ingredient_name) { + for (int i = 0; i < SIZE(callee.ingredients); ++i) { + if (callee.ingredients.at(i).name == ingredient_name) + return true; + } + return false; +} + //:: Check all calls against headers. :(scenario show_clear_error_on_bad_call) |