about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-05-25 22:18:45 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-05-25 22:18:51 -0700
commitc78bc9bde9ad6db54e2d38b2651b275a88f78a85 (patch)
treeeae9b6362d5b782e9662de8ef038659eebc25c7b
parentf8b56b793d48f49c3aecbbbb76c77ef1261a0dcf (diff)
downloadmu-c78bc9bde9ad6db54e2d38b2651b275a88f78a85.tar.gz
3010
insert_container is getting pretty gnarly. It's spread across two layers
(containers and shape-shifting containers), and since it has to deal
with extending existing containers it's coiled in on itself,
constantly reading and writing the Type table.

Maybe I should uncoil the case of extending a container and make it
separate from defining a new container.
-rw-r--r--055shape_shifting_container.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/055shape_shifting_container.cc b/055shape_shifting_container.cc
index 2f5cc81c..13a3c287 100644
--- a/055shape_shifting_container.cc
+++ b/055shape_shifting_container.cc
@@ -111,9 +111,9 @@ bool read_type_ingredients(string& name, const string& command) {
   }
   if (contains_key(Type_ordinal, name)
       && contains_key(Type, get(Type_ordinal, name))) {
-    const type_info& info = get(Type, get(Type_ordinal, name));
+    const type_info& previous_info = get(Type, get(Type_ordinal, name));
     // we've already seen this container; make sure type ingredients match
-    if (!type_ingredients_match(type_ingredient_names, info.type_ingredient_names)) {
+    if (!type_ingredients_match(type_ingredient_names, previous_info.type_ingredient_names)) {
       raise << "headers of " << command << " '" << name << "' must use identical type ingredients\n" << end();
       return false;
     }