avoid gcc warnings: cast-function-type (#2252)

This commit is contained in:
云风
2020-09-02 11:20:03 +08:00
committed by GitHub
parent 0e1c095c3b
commit 2480ea3dbe
5 changed files with 16 additions and 14 deletions

View File

@@ -188,7 +188,7 @@ namespace bgfx { namespace gl
{ \
_func = (_proto)emscripten_webgl1_get_proc_address(#_import); \
if (!_func && webGLVersion >= 2) \
_func = (_proto)emscripten_webgl2_get_proc_address(#_import); \
_func = BGFX_CAST_FUNCTION(_proto, emscripten_webgl2_get_proc_address(#_import)); \
BX_TRACE("\t%p " #_func " (" #_import ")", _func); \
BGFX_FATAL(_optional || NULL != _func, Fatal::UnableToInitialize, "Failed to create WebGL/OpenGLES context. GetProcAddress(\"%s\")", #_import); \
} \