Merge pull request #33706 from madmiraal/fix-c4146-warning

Fix Visual Studio throwing C4146 warning.
This commit is contained in:
Rémi Verschelde 2019-11-18 17:03:10 +01:00 committed by GitHub
commit 17ee8d0465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3769,8 +3769,8 @@ ShaderLanguage::Node *ShaderLanguage::_reduce_expression(BlockNode *p_block, Sha
nv.sint = -cn->values[i].sint;
} break;
case TYPE_UINT: {
// FIXME: This can't work on uint
nv.uint = -cn->values[i].uint;
// Intentionally wrap the unsigned int value, because GLSL does.
nv.uint = 0 - cn->values[i].uint;
} break;
case TYPE_FLOAT: {
nv.real = -cn->values[i].real;