diff options
| author | est31 | 2015-05-01 02:53:41 +0200 |
|---|---|---|
| committer | est31 | 2015-05-01 03:41:45 +0200 |
| commit | b2b514367824263e2dc1e26b010b0df63fd3700a (patch) | |
| tree | 8d9ef509c495ceaa25c8a5b34b844fd9c9ed216c /core/variant.cpp | |
| parent | 5c6b31c024b60ae9c43dc48c04128de99d147f5a (diff) | |
| download | godot-b2b514367824263e2dc1e26b010b0df63fd3700a.tar.gz godot-b2b514367824263e2dc1e26b010b0df63fd3700a.tar.zst godot-b2b514367824263e2dc1e26b010b0df63fd3700a.zip | |
Diffstat (limited to 'core/variant.cpp')
| -rw-r--r-- | core/variant.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/variant.cpp b/core/variant.cpp index e0c4b4244..fe6a6b3e4 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 ) { |
