about summary refs log tree commit diff stats
path: root/045closure_name.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-02-20 21:58:48 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-02-20 21:58:48 -0800
commitf22250a174d5ad5abf8bf99ad140ced52563aee2 (patch)
tree9c18edbad8b10e7b310032dbd4ad0860f28e6836 /045closure_name.cc
parent791c5eb1398bff36c74b1f7581ddff70d298cbc5 (diff)
downloadmu-f22250a174d5ad5abf8bf99ad140ced52563aee2.tar.gz
2680
Delete all the [] that has crept in since 2377 in November.
Diffstat (limited to '045closure_name.cc')
-rw-r--r--045closure_name.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/045closure_name.cc b/045closure_name.cc
index 52e415fc..cb258583 100644
--- a/045closure_name.cc
+++ b/045closure_name.cc
@@ -73,8 +73,8 @@ void collect_surrounding_spaces(const recipe_ordinal r) {
         continue;
       }
       if (contains_key(Surrounding_space, r)
-          && Surrounding_space[r] != get(Recipe_ordinal, surrounding_recipe_name)) {
-        raise_error << "recipe " << get(Recipe, r).name << " can have only one 'surrounding' recipe but has " << get(Recipe, Surrounding_space[r]).name << " and " << surrounding_recipe_name << '\n' << end();
+          && get(Surrounding_space, r) != get(Recipe_ordinal, surrounding_recipe_name)) {
+        raise_error << "recipe " << get(Recipe, r).name << " can have only one 'surrounding' recipe but has " << get(Recipe, get(Surrounding_space, r)).name << " and " << surrounding_recipe_name << '\n' << end();
         continue;
       }
       trace(9993, "name") << "lexically surrounding space for recipe " << get(Recipe, r).name << " comes from " << surrounding_recipe_name << end();
@@ -83,7 +83,7 @@ void collect_surrounding_spaces(const recipe_ordinal r) {
         raise << "can't find recipe providing surrounding space for " << get(Recipe, r).name << ": " << surrounding_recipe_name << '\n' << end();
         continue;
       }
-      Surrounding_space[r] = get(Recipe_ordinal, surrounding_recipe_name);
+      put(Surrounding_space, r, get(Recipe_ordinal, surrounding_recipe_name));
     }
   }
 }
@@ -132,8 +132,8 @@ recipe_ordinal lookup_surrounding_recipe(const recipe_ordinal r, long long int n
     raise_error << "don't know surrounding recipe of " << get(Recipe, r).name << '\n' << end();
     return 0;
   }
-  assert(Surrounding_space[r]);
-  return lookup_surrounding_recipe(Surrounding_space[r], n-1);
+  assert(contains_key(Surrounding_space, r));
+  return lookup_surrounding_recipe(get(Surrounding_space, r), n-1);
 }
 
 //: weaken use-before-set detection just a tad