diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-02-17 10:09:48 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-02-17 10:09:48 -0800 |
commit | 3adc9e08715fb695b8a7f53d5cfb3db1bd434b05 (patch) | |
tree | 2336287ac111e0038fd01391ea9d4c57fe9a3f2b /042name.cc | |
parent | 89500176d9ff86eedcc99c2d2d11b1ac96022c97 (diff) | |
download | mu-3adc9e08715fb695b8a7f53d5cfb3db1bd434b05.tar.gz |
2667 - redo container data structure
I've been gradually Greenspunning reagents. Just go all the way.
Diffstat (limited to '042name.cc')
-rw-r--r-- | 042name.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/042name.cc b/042name.cc index a8268b4a..bdaf50e9 100644 --- a/042name.cc +++ b/042name.cc @@ -104,9 +104,8 @@ type_ordinal skip_addresses(type_tree* type, const string& recipe_name) { int find_element_name(const type_ordinal t, const string& name, const string& recipe_name) { const type_info& container = get(Type, t); - for (long long int i = 0; i < SIZE(container.element_names); ++i) { - if (container.element_names.at(i) == name) return i; - } + for (long long int i = 0; i < SIZE(container.elements); ++i) + if (container.elements.at(i).name == name) return i; raise_error << maybe(recipe_name) << "unknown element " << name << " in container " << get(Type, t).name << '\n' << end(); return -1; } |