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

@@ -450,7 +450,7 @@ EGL_IMPORT
{ \
if (NULL == _func) \
{ \
_func = (_proto)bx::dlsym(glesv2, #_import); \
_func = BGFX_CAST_FUNCTION(_proto, bx::dlsym(glesv2, #_import)); \
BX_TRACE("\t%p " #_func " (" #_import ")", _func); \
BGFX_FATAL(_optional || NULL != _func, Fatal::UnableToInitialize, "Failed to create OpenGLES context. eglGetProcAddress(\"%s\")", #_import); \
} \
@@ -460,7 +460,7 @@ EGL_IMPORT
{ \
if (NULL == _func) \
{ \
_func = (_proto)eglGetProcAddress(#_import); \
_func = BGFX_CAST_FUNCTION(_proto , eglGetProcAddress(#_import)); \
BX_TRACE("\t%p " #_func " (" #_import ")", _func); \
BGFX_FATAL(_optional || NULL != _func, Fatal::UnableToInitialize, "Failed to create OpenGLES context. eglGetProcAddress(\"%s\")", #_import); \
} \