aboutsummaryrefslogtreecommitdiff
path: root/core/variant.h
diff options
context:
space:
mode:
authorHein-Pieter van Braam2017-02-15 14:41:16 +0100
committerHein-Pieter van Braam2017-02-16 18:44:29 +0100
commitb696beea65bbffd31edac169ccf9708f46ab9652 (patch)
tree27bd4f630dda96d028aa0efd7752000844ac996b /core/variant.h
parent903a3aa5f0e128abb1fb752c10b343b34af8f799 (diff)
downloadgodot-b696beea65bbffd31edac169ccf9708f46ab9652.tar.gz
godot-b696beea65bbffd31edac169ccf9708f46ab9652.tar.zst
godot-b696beea65bbffd31edac169ccf9708f46ab9652.zip
Diffstat (limited to 'core/variant.h')
-rw-r--r--core/variant.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/variant.h b/core/variant.h
index 5936325c1..f9ceca1ca 100644
--- a/core/variant.h
+++ b/core/variant.h
@@ -421,6 +421,7 @@ public:
bool operator<(const Variant& p_variant) const;
uint32_t hash() const;
+ bool hash_compare(const Variant& p_variant) const;
bool booleanize(bool &valid) const;
void static_assign(const Variant& p_variant);
@@ -459,6 +460,10 @@ struct VariantHasher {
static _FORCE_INLINE_ uint32_t hash(const Variant &p_variant) { return p_variant.hash(); }
};
+struct VariantComparator {
+
+ static _FORCE_INLINE_ bool compare(const Variant &p_lhs, const Variant &p_rhs) { return p_lhs.hash_compare(p_rhs); }
+};
Variant::ObjData& Variant::_get_obj() {