diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-01-02 20:17:31 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-01-02 20:17:31 -0300 |
commit | 1597082c85a2bf3ddca0414de1fa32fb5f2e5350 (patch) | |
tree | 9329b37b872ef4b97ccd9ea7c2a9f2a234867303 /core/variant.cpp | |
parent | 61745855d0bb309cb0ebcd2d92fc15f7f6fb1840 (diff) | |
download | redot-engine-1597082c85a2bf3ddca0414de1fa32fb5f2e5350.tar.gz |
-Ability to roll-back script-exported properties to their default value on the script, closes #2128
Diffstat (limited to 'core/variant.cpp')
-rw-r--r-- | core/variant.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/variant.cpp b/core/variant.cpp index ab560e0d45..674c57a0fc 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; |