diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-02-20 20:05:52 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-02-20 20:17:07 -0800 |
commit | 65c905fe84c0e8b7acd6839469d7bb9727f0632b (patch) | |
tree | b9af97e9191b82675713cda3874677ee81b3bc9b /010vm.cc | |
parent | 343bc5359b93d4b589544671804f11d42f67d694 (diff) | |
download | mu-65c905fe84c0e8b7acd6839469d7bb9727f0632b.tar.gz |
2678
Start using type names from the type tree rather than the property tree in most places. Hopefully the only occurrences of 'properties.at(0).second' left are ones where we're managing it. Next we can stop writing to it.
Diffstat (limited to '010vm.cc')
-rw-r--r-- | 010vm.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/010vm.cc b/010vm.cc index b059ece0..d10bfa7d 100644 --- a/010vm.cc +++ b/010vm.cc @@ -269,7 +269,7 @@ type_tree* new_type_tree(const string_tree* properties) { if (!properties) return NULL; type_tree* result = new type_tree("", 0); if (!properties->value.empty()) { - const string& type_name = properties->value; + const string& type_name = result->name = properties->value; if (contains_key(Type_ordinal, type_name)) result->value = get(Type_ordinal, type_name); else if (is_integer(type_name)) // sometimes types will contain non-type tags, like numbers for the size of an array @@ -298,6 +298,7 @@ reagent::reagent(const reagent& old) { } type_tree::type_tree(const type_tree& old) { + name = old.name; value = old.value; left = old.left ? new type_tree(*old.left) : NULL; right = old.right ? new type_tree(*old.right) : NULL; |