diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-05-26 16:43:18 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-05-26 17:36:16 -0700 |
commit | 2b25071710656d7a755c2f66c99734cd7990d1ba (patch) | |
tree | f4e3a83d6397343c7c225a354f4f2c837aef8190 /057immutable.cc | |
parent | 5e320aa049bc1d5ad78eec23be0127f4a8d6ec3d (diff) | |
download | mu-2b25071710656d7a755c2f66c99734cd7990d1ba.tar.gz |
3877
Diffstat (limited to '057immutable.cc')
-rw-r--r-- | 057immutable.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/057immutable.cc b/057immutable.cc index ef7dc464..57d36ceb 100644 --- a/057immutable.cc +++ b/057immutable.cc @@ -442,9 +442,9 @@ void check_immutable_ingredient_in_instruction(const instruction& inst, const se && current_ingredient_and_aliases.find(inst.products.at(i)) != current_ingredient_and_aliases.end()) { string current_product_name = inst.products.at(i).name; if (current_product_name == original_ingredient_name) - raise << maybe(caller.name) << "cannot modify '" << current_product_name << "' in instruction '" << inst.original_string << "' because it's an ingredient of recipe " << caller.name << " but not also a product\n" << end(); + raise << maybe(caller.name) << "cannot modify '" << current_product_name << "' in instruction '" << to_original_string(inst) << "' because it's an ingredient of recipe " << caller.name << " but not also a product\n" << end(); else - raise << maybe(caller.name) << "cannot modify '" << current_product_name << "' in instruction '" << inst.original_string << "' because that would modify " << original_ingredient_name << " which is an ingredient of recipe " << caller.name << " but not also a product\n" << end(); + raise << maybe(caller.name) << "cannot modify '" << current_product_name << "' in instruction '" << to_original_string(inst) << "' because that would modify " << original_ingredient_name << " which is an ingredient of recipe " << caller.name << " but not also a product\n" << end(); return; } } @@ -465,9 +465,9 @@ void check_immutable_ingredient_in_instruction(const instruction& inst, const se if (inst.operation == PUT || inst.operation == PUT_INDEX) { if (current_ingredient_index == 0) { if (current_ingredient_name == original_ingredient_name) - raise << maybe(caller.name) << "cannot modify '" << current_ingredient_name << "' in instruction '" << inst.original_string << "' because it's an ingredient of recipe " << caller.name << " but not also a product\n" << end(); + raise << maybe(caller.name) << "cannot modify '" << current_ingredient_name << "' in instruction '" << to_original_string(inst) << "' because it's an ingredient of recipe " << caller.name << " but not also a product\n" << end(); else - raise << maybe(caller.name) << "cannot modify '" << current_ingredient_name << "' in instruction '" << inst.original_string << "' because that would modify '" << original_ingredient_name << "' which is an ingredient of recipe " << caller.name << " but not also a product\n" << end(); + raise << maybe(caller.name) << "cannot modify '" << current_ingredient_name << "' in instruction '" << to_original_string(inst) << "' because that would modify '" << original_ingredient_name << "' which is an ingredient of recipe " << caller.name << " but not also a product\n" << end(); } } } @@ -475,9 +475,9 @@ void check_immutable_ingredient_in_instruction(const instruction& inst, const se // defined recipe if (is_modified_in_recipe(inst.operation, current_ingredient_index, caller)) { if (current_ingredient_name == original_ingredient_name) - raise << maybe(caller.name) << "cannot modify '" << current_ingredient_name << "' in instruction '" << inst.original_string << "' because it's an ingredient of recipe " << caller.name << " but not also a product\n" << end(); + raise << maybe(caller.name) << "cannot modify '" << current_ingredient_name << "' in instruction '" << to_original_string(inst) << "' because it's an ingredient of recipe " << caller.name << " but not also a product\n" << end(); else - raise << maybe(caller.name) << "cannot modify '" << current_ingredient_name << "' in instruction '" << inst.original_string << "' because that would modify '" << original_ingredient_name << "' which is an ingredient of recipe " << caller.name << " but not also a product\n" << end(); + raise << maybe(caller.name) << "cannot modify '" << current_ingredient_name << "' in instruction '" << to_original_string(inst) << "' because that would modify '" << original_ingredient_name << "' which is an ingredient of recipe " << caller.name << " but not also a product\n" << end(); } } } |