about summary refs log tree commit diff stats
path: root/030container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-11-06 11:59:50 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-11-06 11:59:50 -0800
commitf8fbad1bcf68ac8412a54d58cd9cc3214bac8631 (patch)
tree984e1d7dbb86176b3c40b063e6b114568778ab0a /030container.cc
parent4769dd2e8721e41769fce0a98523fe2e50035277 (diff)
downloadmu-f8fbad1bcf68ac8412a54d58cd9cc3214bac8631.tar.gz
3639
Following commit 3637, rename another auxiliary variable with our new
convention.
Diffstat (limited to '030container.cc')
-rw-r--r--030container.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/030container.cc b/030container.cc
index 52c3c1ae..c5edb686 100644
--- a/030container.cc
+++ b/030container.cc
@@ -896,12 +896,12 @@ void check_or_set_invalid_types(reagent& r, const recipe& caller, const instruct
   check_or_set_invalid_types(r.type, maybe(caller.name), "'"+inst.original_string+"'");
 }
 
-void check_or_set_invalid_types(type_tree* type, const string& block, const string& name) {
+void check_or_set_invalid_types(type_tree* type, const string& location_for_error_messages, const string& name_for_error_messages) {
   if (!type) return;
   // End Container Type Checks
   if (!type->atom) {
-    check_or_set_invalid_types(type->left, block, name);
-    check_or_set_invalid_types(type->right, block, name);
+    check_or_set_invalid_types(type->left, location_for_error_messages, name_for_error_messages);
+    check_or_set_invalid_types(type->right, location_for_error_messages, name_for_error_messages);
     return;
   }
   if (type->value == 0) return;
@@ -910,7 +910,7 @@ void check_or_set_invalid_types(type_tree* type, const string& block, const stri
     if (contains_key(Type_ordinal, type->name))
       type->value = get(Type_ordinal, type->name);
     else
-      raise << block << "unknown type " << type->name << " in " << name << '\n' << end();
+      raise << location_for_error_messages << "unknown type " << type->name << " in " << name_for_error_messages << '\n' << end();
   }
 }
 
@@ -951,15 +951,15 @@ void check_container_field_types() {
   }
 }
 
-void check_invalid_types(const type_tree* type, const string& block, const string& name) {
+void check_invalid_types(const type_tree* type, const string& location_for_error_messages, const string& name_for_error_messages) {
   if (!type) return;  // will throw a more precise error elsewhere
   if (!type->atom) {
-    check_invalid_types(type->left, block, name);
-    check_invalid_types(type->right, block, name);
+    check_invalid_types(type->left, location_for_error_messages, name_for_error_messages);
+    check_invalid_types(type->right, location_for_error_messages, name_for_error_messages);
     return;
   }
   if (type->value != 0) {  // value 0 = compound types (layer parse_tree) or type ingredients (layer shape_shifting_container)
     if (!contains_key(Type, type->value))
-      raise << block << "unknown type in " << name << '\n' << end();
+      raise << location_for_error_messages << "unknown type in " << name_for_error_messages << '\n' << end();
   }
 }