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:
+13
-5
@@ -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_
|
||||
|
||||
Reference in New Issue
Block a user