Commit 643bd164 authored by Philip Chimento's avatar Philip Chimento

wrapperutils: Avoid template policy warning

In cases where the template function pointer parameter type_struct is
not null in a particular instantiation, GCC will warn about the code
here that the pointer can never be null. We want to avoid that warning
because the whole point is that the pointer is always or never null in a
particular instantiation.
parent 56bbcca0
......@@ -143,7 +143,9 @@ bool gjs_define_static_methods(JSContext* cx, JS::HandleObject constructor,
if (!InfoMethodsPolicy<TAG>::type_struct)
// Casting to void* avoids warning that the function pointer will never be
// null in template instantiations where it is not null
if (!reinterpret_cast<void*>(InfoMethodsPolicy<TAG>::type_struct))
return true;
// Also define class/interface methods if there is a gtype struct
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment