1
0
forked from mirrors/0ad

Fix MSVC unknown pragma warning

Follows f3aedf88a6.

Reported by: Stan
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D3623
This was SVN commit r24976.
This commit is contained in:
wraitii
2021-03-02 15:00:33 +00:00
parent 5e5ea5cba5
commit a64536b45f
+4
View File
@@ -213,8 +213,10 @@ public:
ScriptRequest rq(*scriptInterface);
// GCC 7 triggers spurious warnings
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Waddress"
#endif
ObjType* obj = nullptr;
if constexpr (thisGetter != nullptr)
{
@@ -222,7 +224,9 @@ public:
if (!obj)
return false;
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
bool went_ok = true;
typename args_info<decltype(callable)>::arg_types outs = ConvertFromJS(ScriptInterface::GetScriptInterfaceAndCBData(cx), rq, args, went_ok, static_cast<typename args_info<decltype(callable)>::arg_types*>(nullptr));