1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2026-07-09 01:57:09 +02:00

Prevent ambiguity errors during compilation caused by the new dispatch system under x64 builds.

This commit is contained in:
Sandu Liviu Catalin
2016-08-25 01:01:03 +03:00
parent d449247b5e
commit fae1e51c7b
11 changed files with 127 additions and 46 deletions
+13 -5
View File
@@ -42,7 +42,7 @@ struct Vector2
/* --------------------------------------------------------------------------------------------
* Construct a vector with the same scalar value for all components.
*/
Vector2(Value sv);
explicit Vector2(Value sv);
/* --------------------------------------------------------------------------------------------
* Construct a vector with the specified component values.
@@ -257,15 +257,23 @@ struct Vector2
/* --------------------------------------------------------------------------------------------
* Used by the script engine to compare an instance of this type with a scalar value.
*/
Int32 Cmp(Value s) const
Int32 Cmp(SQFloat s) const
{
return Cmp(Vector2(s));
return Cmp(Vector2(static_cast< Value >(s)));
}
/* --------------------------------------------------------------------------------------------
* Used by the script engine to compare an instance of this type with a scalar value.
*/
Int32 Cmp(Int32 s) const
Int32 Cmp(SQInteger s) const
{
return Cmp(Vector2(static_cast< Value >(s)));
}
/* --------------------------------------------------------------------------------------------
* Used by the script engine to compare an instance of this type with a scalar value.
*/
Int32 Cmp(bool s) const
{
return Cmp(Vector2(static_cast< Value >(s)));
}
@@ -355,4 +363,4 @@ struct Vector2
} // Namespace:: SqMod
#endif // _BASE_VECTOR2_HPP_
#endif // _BASE_VECTOR2_HPP_