1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Avoid compile errors from implicit cast to int by making the type explicit.

This commit is contained in:
Sandu Liviu Catalin 2016-06-19 19:38:24 +03:00
parent 6ec8ca620f
commit c5c3af4f5e

View File

@ -115,7 +115,7 @@ SQRESULT SqGrabPlayerMessageColor(HSQUIRRELVM vm, Int32 idx, Uint32 & color, Int
// Attempt to treat the value as a hex color
color = ConvTo< Uint32 >::From(std::strtoull(++str, nullptr, 16));
// Adjust the color if necessary
switch (ClampMin(--len, 0))
switch (ClampMin(--len, static_cast< SQInteger >(0)))
{
case 0:
{
@ -164,7 +164,7 @@ SQRESULT SqGrabPlayerMessageColor(HSQUIRRELVM vm, Int32 idx, Uint32 & color, Int
// Attempt to treat the value as a hex color
color = ConvTo< Uint32 >::From(std::strtoull(str, nullptr, 16));
// Adjust the color if necessary
switch (ClampMin(len-2, 0))
switch (ClampMin(len-2, static_cast< SQInteger >(0)))
{
case 0:
{