summaryrefslogtreecommitdiffstats
path: root/core/variant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/variant.cpp')
-rw-r--r--core/variant.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/variant.cpp b/core/variant.cpp
index e0c4b4244d..fe6a6b3e4f 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 ) {