From dc36e719eb73d292f4dab98061ea099b61695133 Mon Sep 17 00:00:00 2001 From: "John K. Luebs" Date: Mon, 26 Feb 2024 23:16:11 -0600 Subject: [PATCH] squelch silly MSVC warning --- .gitignore | 1 + luakiwi/luakiwi.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 35e2c35..d71302b 100644 --- a/.gitignore +++ b/.gitignore @@ -16,5 +16,6 @@ *.obj *.exp *.dll +*.rock .cache/ compile_commands.json diff --git a/luakiwi/luakiwi.cpp b/luakiwi/luakiwi.cpp index 89ffa8a..42bcce2 100644 --- a/luakiwi/luakiwi.cpp +++ b/luakiwi/luakiwi.cpp @@ -266,7 +266,8 @@ inline ConstraintData* constraint_new( push_type(L, CONSTRAINT); lua_setmetatable(L, -2); - if (lk_unlikely(!(*c = kiwi_constraint_new(lhs, rhs, op, strength)))) { + *c = kiwi_constraint_new(lhs, rhs, op, strength); + if (lk_unlikely(!*c)) { lua_rawgeti(L, lua_upvalueindex(1), MEM_ERR_MSG); lua_error(L); }