diff options
Diffstat (limited to '010vm.cc')
-rw-r--r-- | 010vm.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/010vm.cc b/010vm.cc index a4c5eb54..08858594 100644 --- a/010vm.cc +++ b/010vm.cc @@ -464,6 +464,14 @@ string_tree* property(const reagent& r, const string& name) { return NULL; } +bool deeply_equal(const string_tree* a, const string_tree* b) { + if (!a) return !b; + if (!b) return !a; + return a->value == b->value + && deeply_equal(a->left, b->left) + && deeply_equal(a->right, b->right); +} + void dump_memory() { for (map<long long int, double>::iterator p = Memory.begin(); p != Memory.end(); ++p) { cout << p->first << ": " << no_scientific(p->second) << '\n'; |