From c78bc9bde9ad6db54e2d38b2651b275a88f78a85 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 25 May 2016 22:18:45 -0700 Subject: 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. --- 055shape_shifting_container.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '055shape_shifting_container.cc') 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; } -- cgit 1.4.1-2-gfad0