about summary refs log tree commit diff stats
path: root/012transform.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 /012transform.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 '012transform.cc')
-rw-r--r--012transform.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/012transform.cc b/012transform.cc
index 2c1e4610..209eb5d9 100644
--- a/012transform.cc
+++ b/012transform.cc
@@ -21,7 +21,7 @@ void transform_all() {
       recipe& r = p->second;
       if (r.steps.empty()) continue;
       if (r.transformed_until != t-1) continue;
-      (*Transform[t])(/*recipe_number*/p->first);
+      (*Transform.at(t))(/*recipe_number*/p->first);
       r.transformed_until = t;
     }
   }
@@ -34,12 +34,12 @@ void parse_int_reagents() {
     recipe& r = p->second;
     if (r.steps.empty()) continue;
     for (index_t index = 0; index < r.steps.size(); ++index) {
-      instruction& inst = r.steps[index];
+      instruction& inst = r.steps.at(index);
       for (index_t i = 0; i < inst.ingredients.size(); ++i) {
-        populate_value(inst.ingredients[i]);
+        populate_value(inst.ingredients.at(i));
       }
       for (index_t i = 0; i < inst.products.size(); ++i) {
-        populate_value(inst.products[i]);
+        populate_value(inst.products.at(i));
       }
     }
   }