diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-05-07 15:49:40 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-05-07 15:49:40 -0700 |
commit | 05d177737c980aad2fcdb54765433e02021ab1e0 (patch) | |
tree | 3b146349a2674db7e585f396bfb5eb0062c4ccd9 /037call_reply.cc | |
parent | 0487a30e7078861ed7de42bdb21b5c71fb9b54a1 (diff) | |
download | mu-05d177737c980aad2fcdb54765433e02021ab1e0.tar.gz |
1299 - stop using [] in any vector
Useful check: $ grep "[^ '\"]\[[^\"]" *.cc \ |perl -pwe 's/\Wargv\[|\WTests\[|\Wframe\[|\WMemory\[|\WName\[|\WSurrounding_space\[|\WRecipe\[|\WType\[|\WRecipe_number\[|\WType_number\[|\WBefore_fragments\[|\WAfter_fragments\[//g' \ |perl -pwe 's/\Wargv\[|\WTests\[|\Wframe\[|\WMemory\[|\WName\[|\WSurrounding_space\[|\WRecipe\[|\WType\[|\WRecipe_number\[|\WType_number\[|\WBefore_fragments\[|\WAfter_fragments\[//g' \ |grep '[^ ]\['
Diffstat (limited to '037call_reply.cc')
-rw-r--r-- | 037call_reply.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/037call_reply.cc b/037call_reply.cc index da1cf1f1..a13c88e5 100644 --- a/037call_reply.cc +++ b/037call_reply.cc @@ -33,8 +33,8 @@ case REPLY: { vector<string> tmp = property(reply_inst.ingredients.at(i), "same-as-ingredient"); assert(tmp.size() == 1); long long int ingredient_index = to_int(tmp.at(0)); - if (caller_instruction.products.at(i).value != caller_instruction.ingredients[ingredient_index].value) - raise << "'same-as-ingredient' result " << caller_instruction.products.at(i).value << " must be location " << caller_instruction.ingredients[ingredient_index].value << '\n'; + if (caller_instruction.products.at(i).value != caller_instruction.ingredients.at(ingredient_index).value) + raise << "'same-as-ingredient' result " << caller_instruction.products.at(i).value << " must be location " << caller_instruction.ingredients.at(ingredient_index).value << '\n'; } } // refresh instruction_counter to caller's step_index |