diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-01-18 16:19:00 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-01-18 16:36:09 -0800 |
commit | 4821d76f1e4ddfb51b5b162a453544367bdaaee3 (patch) | |
tree | 6c245b529aac83f49f63755b726babc2da4fa401 | |
parent | 63bd37bc53e2e8eba66cfcfc18a45ceea2e93f6a (diff) | |
download | mu-4821d76f1e4ddfb51b5b162a453544367bdaaee3.tar.gz |
2567
-rw-r--r-- | 010vm.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/010vm.cc b/010vm.cc index 94fa23b7..9806511e 100644 --- a/010vm.cc +++ b/010vm.cc @@ -287,7 +287,11 @@ type_tree* new_type_tree(const string_tree* properties) { //: avoid memory leaks for the type tree -reagent::reagent(const reagent& old) :original_string(old.original_string), properties(old.properties), name(old.name), value(old.value), initialized(old.initialized) { +reagent::reagent(const reagent& old) { + original_string = old.original_string; + name = old.name; + value = old.value; + initialized = old.initialized; properties.clear(); for (long long int i = 0; i < SIZE(old.properties); ++i) { properties.push_back(pair<string, string_tree*>(old.properties.at(i).first, @@ -296,7 +300,8 @@ reagent::reagent(const reagent& old) :original_string(old.original_string), prop type = old.type ? new type_tree(*old.type) : NULL; } -type_tree::type_tree(const type_tree& old) :value(old.value) { +type_tree::type_tree(const type_tree& old) { + value = old.value; left = old.left ? new type_tree(*old.left) : NULL; right = old.right ? new type_tree(*old.right) : NULL; } |