diff options
Diffstat (limited to 'core/variant.cpp')
-rw-r--r-- | core/variant.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/variant.cpp b/core/variant.cpp index e0c4b4244d..5e2ab962a6 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -456,6 +456,15 @@ bool Variant::operator==(const Variant& p_variant) const { } +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; + bool v; + Variant r; + evaluate(OP_LESS,*this,p_variant,r,v); + return r; +} + bool Variant::is_zero() const { switch( type ) { @@ -523,7 +532,7 @@ bool Variant::is_zero() const { } break; case QUAT: { - *reinterpret_cast<const Quat*>(_data._mem)==Quat(); + return *reinterpret_cast<const Quat*>(_data._mem)==Quat(); } break; case MATRIX3: { |