From 34a6a45fba582eac815e42e1d9c3ee003d1efd2e Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Mon, 28 Sep 2020 14:12:54 +0200 Subject: [PATCH] Work around MSVC warning. --- spirv_cross.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spirv_cross.cpp b/spirv_cross.cpp index aa276572..ef1028d9 100644 --- a/spirv_cross.cpp +++ b/spirv_cross.cpp @@ -1717,7 +1717,7 @@ uint32_t Compiler::evaluate_spec_constant_u32(const SPIRConstantOp &spec) const break; case OpSNegate: - value = -eval_u32(spec.arguments[0]); + value = uint32_t(-int32_t(eval_u32(spec.arguments[0]))); break; case OpSelect: