-Ability to roll-back script-exported properties to their default value on the script, closes #2128

This commit is contained in:
Juan Linietsky
2016-01-02 20:17:31 -03:00
parent 61745855d0
commit 1597082c85
7 changed files with 160 additions and 49 deletions

View File

@ -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;