diff options
author | Emmanuel Leblond <emmanuel.leblond@gmail.com> | 2020-02-01 07:04:14 +0100 |
---|---|---|
committer | Emmanuel Leblond <emmanuel.leblond@gmail.com> | 2021-10-30 13:11:01 +0200 |
commit | f9ba2efe1e60fa919b0efe70994416149b54ee26 (patch) | |
tree | 4cdf64b6325b49908973ad6f6ece9c5934e8d1d6 /core/variant/variant.h | |
parent | 78f86ff5152074bcd6a19d05b028d2306c57ed67 (diff) | |
download | redot-engine-f9ba2efe1e60fa919b0efe70994416149b54ee26.tar.gz |
Modify Dictionary::operator== to do real key/value comparison with recursive support (and add unittests)
Diffstat (limited to 'core/variant/variant.h')
-rw-r--r-- | core/variant/variant.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/variant/variant.h b/core/variant/variant.h index d3f694e7ca..8ce5e7dcd2 100644 --- a/core/variant/variant.h +++ b/core/variant/variant.h @@ -481,7 +481,8 @@ public: static PTROperatorEvaluator get_ptr_operator_evaluator(Operator p_operator, Type p_type_a, Type p_type_b); void zero(); - Variant duplicate(bool deep = false) const; + Variant duplicate(bool p_deep = false) const; + Variant recursive_duplicate(bool p_deep, int recursion_count) const; static void blend(const Variant &a, const Variant &b, float c, Variant &r_dst); static void interpolate(const Variant &a, const Variant &b, float c, Variant &r_dst); @@ -659,10 +660,11 @@ public: bool operator!=(const Variant &p_variant) const; bool operator<(const Variant &p_variant) const; uint32_t hash() const; + uint32_t recursive_hash(int recursion_count) const; - bool hash_compare(const Variant &p_variant) const; + bool hash_compare(const Variant &p_variant, int recursion_count = 0) const; bool booleanize() const; - String stringify(List<const void *> &stack) const; + String stringify(int recursion_count = 0) const; String to_json_string() const; void static_assign(const Variant &p_variant); |