mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 14:32:08 +00:00
- fixed: explicit float to int casts should not emit truncation warnings.
This commit is contained in:
parent
f0d8bd0a74
commit
bd0ca55a35
1 changed files with 1 additions and 1 deletions
|
@ -932,7 +932,7 @@ FxExpression *FxIntCast::Resolve(FCompileContext &ctx)
|
|||
{
|
||||
ExpVal constval = static_cast<FxConstant *>(basex)->GetValue();
|
||||
FxExpression *x = new FxConstant(constval.GetInt(), ScriptPosition);
|
||||
if (constval.GetInt() != constval.GetFloat())
|
||||
if (constval.GetInt() != constval.GetFloat() && !Explicit)
|
||||
{
|
||||
ScriptPosition.Message(MSG_WARNING, "Truncation of floating point constant %f", constval.GetFloat());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue