|
|
@@ -192,6 +192,12 @@ void Variant::Set(Variant&& other)
|
|
|
RMLUI_ASSERT(type == other.type);
|
|
|
}
|
|
|
|
|
|
+void Variant::Set(const bool value)
|
|
|
+{
|
|
|
+ type = BOOL;
|
|
|
+ SET_VARIANT(bool);
|
|
|
+}
|
|
|
+
|
|
|
void Variant::Set(const byte value)
|
|
|
{
|
|
|
type = BYTE;
|
|
|
@@ -210,15 +216,22 @@ void Variant::Set(const float value)
|
|
|
SET_VARIANT(float);
|
|
|
}
|
|
|
|
|
|
+void Variant::Set(const double value)
|
|
|
+{
|
|
|
+ type = DOUBLE;
|
|
|
+ SET_VARIANT(double);
|
|
|
+}
|
|
|
+
|
|
|
void Variant::Set(const int value)
|
|
|
{
|
|
|
type = INT;
|
|
|
SET_VARIANT(int);
|
|
|
}
|
|
|
-void Variant::Set(const Character value)
|
|
|
+
|
|
|
+void Variant::Set(const int64_t value)
|
|
|
{
|
|
|
- type = WORD;
|
|
|
- SET_VARIANT(Character);
|
|
|
+ type = INT64;
|
|
|
+ SET_VARIANT(int64_t);
|
|
|
}
|
|
|
|
|
|
void Variant::Set(const char* value)
|
|
|
@@ -444,18 +457,22 @@ bool Variant::operator==(const Variant & other) const
|
|
|
|
|
|
switch (type)
|
|
|
{
|
|
|
+ case BOOL:
|
|
|
+ return DEFAULT_VARIANT_COMPARE(bool);
|
|
|
case BYTE:
|
|
|
return DEFAULT_VARIANT_COMPARE(byte);
|
|
|
case CHAR:
|
|
|
return DEFAULT_VARIANT_COMPARE(char);
|
|
|
case FLOAT:
|
|
|
return DEFAULT_VARIANT_COMPARE(float);
|
|
|
+ case DOUBLE:
|
|
|
+ return DEFAULT_VARIANT_COMPARE(double);
|
|
|
case INT:
|
|
|
return DEFAULT_VARIANT_COMPARE(int);
|
|
|
+ case INT64:
|
|
|
+ return DEFAULT_VARIANT_COMPARE(int64_t);
|
|
|
case STRING:
|
|
|
return DEFAULT_VARIANT_COMPARE(String);
|
|
|
- case WORD:
|
|
|
- return DEFAULT_VARIANT_COMPARE(Character);
|
|
|
case VECTOR2:
|
|
|
return DEFAULT_VARIANT_COMPARE(Vector2f);
|
|
|
case VECTOR3:
|