about summary refs log tree commit diff stats
path: root/035call.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-07 15:49:40 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-07 15:49:40 -0700
commit05d177737c980aad2fcdb54765433e02021ab1e0 (patch)
tree3b146349a2674db7e585f396bfb5eb0062c4ccd9 /035call.cc
parent0487a30e7078861ed7de42bdb21b5c71fb9b54a1 (diff)
downloadmu-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 '035call.cc')
-rw-r--r--035call.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/035call.cc b/035call.cc
index c88a16db..57c1513d 100644
--- a/035call.cc
+++ b/035call.cc
@@ -65,7 +65,7 @@ inline const string& current_recipe_name() {
 }
 :(replace{} "inline const instruction& current_instruction()")
 inline const instruction& current_instruction() {
-  return Recipe[Current_routine->calls.top().running_recipe].steps[Current_routine->calls.top().running_step_index];
+  return Recipe[Current_routine->calls.top().running_recipe].steps.at(Current_routine->calls.top().running_step_index);
 }
 
 :(replace{} "default:" following "End Primitive Recipe Implementations")