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

@@ -352,7 +352,7 @@ namespace bgfx { namespace gl
{ \
if (NULL == _func) \
{ \
_func = (_proto)glXGetProcAddress( (const GLubyte*)#_import); \
_func = BGFX_CAST_FUNCTION(_proto, glXGetProcAddress( (const GLubyte*)#_import)); \
BX_TRACE("%p " #_func " (" #_import ")", _func); \
BGFX_FATAL(_optional || NULL != _func, Fatal::UnableToInitialize, "Failed to create OpenGL context. glXGetProcAddress %s", #_import); \
} \