diff options
Diffstat (limited to '028call_return.cc')
-rw-r--r-- | 028call_return.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/028call_return.cc b/028call_return.cc index 3e547f06..0227acee 100644 --- a/028call_return.cc +++ b/028call_return.cc @@ -67,7 +67,7 @@ void check_types_of_return_instructions(const recipe_ordinal r) { const instruction& caller_instruction = caller.steps.at(i); if (caller_instruction.is_label) continue; if (caller_instruction.products.empty()) continue; - if (caller_instruction.operation < MAX_PRIMITIVE_RECIPES) continue; + if (is_primitive(caller_instruction.operation)) continue; const recipe& callee = get(Recipe, caller_instruction.operation); for (int i = 0; i < SIZE(callee.steps); ++i) { const instruction& return_inst = callee.steps.at(i); @@ -111,6 +111,10 @@ void check_types_of_return_instructions(const recipe_ordinal r) { } } +bool is_primitive(recipe_ordinal r) { + return r < MAX_PRIMITIVE_RECIPES; +} + :(scenario return_type_mismatch) % Hide_errors = true; def main [ |