From e6315eedd0f2b65d04df44c0be831d2c43d7d363 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 26 Feb 2021 22:38:28 +0000 Subject: [PATCH] Fix -Wunused-result warnings in node wrappers --- Lib/javascript/v8/javascriptcomplex.swg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/javascript/v8/javascriptcomplex.swg b/Lib/javascript/v8/javascriptcomplex.swg index d1cbe7642..52a554905 100644 --- a/Lib/javascript/v8/javascriptcomplex.swg +++ b/Lib/javascript/v8/javascriptcomplex.swg @@ -19,8 +19,8 @@ SWIG_From_dec(Type)(%ifcplusplus(const Type&, Type) c) v8::Local vals = SWIGV8_ARRAY_NEW(); - vals->Set(0, SWIG_From(double)(Real(c))); - vals->Set(1, SWIG_From(double)(Imag(c))); + vals->Set(SWIGV8_CURRENT_CONTEXT(), 0, SWIG_From(double)(Real(c))).Check(); + vals->Set(SWIGV8_CURRENT_CONTEXT(), 1, SWIG_From(double)(Imag(c))).Check(); SWIGV8_ESCAPE(vals); } }