diff options
| author | Juan Linietsky | 2016-01-02 20:17:31 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-01-02 20:17:31 -0300 |
| commit | 1597082c85a2bf3ddca0414de1fa32fb5f2e5350 (patch) | |
| tree | 9329b37b872ef4b97ccd9ea7c2a9f2a234867303 /core | |
| parent | 61745855d0bb309cb0ebcd2d92fc15f7f6fb1840 (diff) | |
| download | godot-1597082c85a2bf3ddca0414de1fa32fb5f2e5350.tar.gz godot-1597082c85a2bf3ddca0414de1fa32fb5f2e5350.tar.zst godot-1597082c85a2bf3ddca0414de1fa32fb5f2e5350.zip | |
Diffstat (limited to 'core')
| -rw-r--r-- | core/script_language.h | 1 | ||||
| -rw-r--r-- | core/variant.cpp | 11 | ||||
| -rw-r--r-- | core/variant.h | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/core/script_language.h b/core/script_language.h index a179949c1..3138c88e8 100644 --- a/core/script_language.h +++ b/core/script_language.h @@ -98,6 +98,7 @@ public: virtual bool has_script_signal(const StringName& p_signal) const=0; virtual void get_script_signal_list(List<MethodInfo> *r_signals) const=0; + virtual bool get_property_default_value(const StringName& p_property,Variant& r_value) const=0; virtual void update_exports() {} //editor tool diff --git a/core/variant.cpp b/core/variant.cpp index ab560e0d4..674c57a0f 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -706,6 +706,17 @@ bool Variant::operator==(const Variant& p_variant) const { } +bool Variant::operator!=(const Variant& p_variant) const { + + if (type!=p_variant.type) //evaluation of operator== needs to be more strict + return true; + bool v; + Variant r; + evaluate(OP_NOT_EQUAL,*this,p_variant,r,v); + return r; + +} + bool Variant::operator<(const Variant& p_variant) const { if (type!=p_variant.type) //if types differ, then order by type first return type<p_variant.type; diff --git a/core/variant.h b/core/variant.h index 05bb5a732..4c3ccc011 100644 --- a/core/variant.h +++ b/core/variant.h @@ -411,6 +411,7 @@ public: //argsVariant call() bool operator==(const Variant& p_variant) const; + bool operator!=(const Variant& p_variant) const; bool operator<(const Variant& p_variant) const; uint32_t hash() const; |
