mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- FScanner::Float is a double so there's no need to cast values to float before assigning them to this variable.
SVN r2865 (trunk)
This commit is contained in:
parent
bc08502132
commit
5be9729872
2 changed files with 3 additions and 15 deletions
|
@ -868,18 +868,6 @@ void AM_initVariables ()
|
||||||
old_m_h = m_h;
|
old_m_h = m_h;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
static void GetComponents (int color, DWORD *palette, float &r, float &g, float &b)
|
|
||||||
{
|
|
||||||
if (palette)
|
|
||||||
color = palette[color];
|
|
||||||
|
|
||||||
r = (float)RPART(color);
|
|
||||||
g = (float)GPART(color);
|
|
||||||
b = (float)BPART(color);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
|
@ -606,7 +606,7 @@ bool FScanner::GetNumber ()
|
||||||
ScriptError ("SC_GetNumber: Bad numeric constant \"%s\".", String);
|
ScriptError ("SC_GetNumber: Bad numeric constant \"%s\".", String);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Float = (float)Number;
|
Float = Number;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -662,7 +662,7 @@ bool FScanner::CheckNumber ()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Float = (float)Number;
|
Float = Number;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -719,7 +719,7 @@ bool FScanner::GetFloat ()
|
||||||
CheckOpen ();
|
CheckOpen ();
|
||||||
if (GetString())
|
if (GetString())
|
||||||
{
|
{
|
||||||
Float = (float)strtod (String, &stopper);
|
Float = strtod (String, &stopper);
|
||||||
if (*stopper != 0)
|
if (*stopper != 0)
|
||||||
{
|
{
|
||||||
ScriptError ("SC_GetFloat: Bad numeric constant \"%s\".", String);
|
ScriptError ("SC_GetFloat: Bad numeric constant \"%s\".", String);
|
||||||
|
|
Loading…
Reference in a new issue