// typename has the form __egl_{funcname}_t
//
#define FUNC_TYPE(fname) __egl_ ## fname ## _t
+// NOLINT: clang-tidy adds parentheses around 'params'.
#define API_ENTRY(fname,params,args) \
- typedef void (GL_APIENTRY *FUNC_TYPE(fname)) params;
+ typedef void (GL_APIENTRY *FUNC_TYPE(fname)) params; // NOLINT
#define API_ENTRY_RET(rtype,fname,params,args) \
- typedef rtype (GL_APIENTRY *FUNC_TYPE(fname)) params;
+ typedef rtype (GL_APIENTRY *FUNC_TYPE(fname)) params; // NOLINT
#include "ClientAPIExts.in"
#undef API_ENTRY
// loaded.
/////
#define API_ENTRY(fname,params,args) \
- FUNC_TYPE(fname) fname;
+ FUNC_TYPE(fname) (fname);
#define API_ENTRY_RET(rtype,fname,params,args) \
API_ENTRY(fname,params,args)
// the current context version and calls to the correct client API
// function.
//
+// NOLINT: clang-tidy adds parentheses around 'args'.
#define API_ENTRY(fname,params,args) \
static void _egl_ ## fname params \
{ \
if (!s_client_extensions[idx].fname) { \
return; \
} \
- (*s_client_extensions[idx].fname) args; \
+ (*s_client_extensions[idx].fname) args; /* NOLINT */ \
}
#define API_ENTRY_RET(rtype,fname,params,args) \
if (!s_client_extensions[idx].fname) { \
return (rtype)0; \
} \
- return (*s_client_extensions[idx].fname) args; \
+ return (*s_client_extensions[idx].fname) args; /* NOLINT */ \
}
#include "ClientAPIExts.in"
#endif //LOG_EGL_ERRORS
#define VALIDATE_CONFIG(cfg,ret) \
- if(((intptr_t)cfg<0)||((intptr_t)cfg>s_display.getNumConfigs())) { \
+ if(((intptr_t)(cfg)<0)||((intptr_t)(cfg)>s_display.getNumConfigs())) { \
RETURN_ERROR(ret,EGL_BAD_CONFIG); \
}
return ret; \
}
-#define VALIDATE_CONTEXT_RETURN(context,ret) \
- if (!context) { \
+#define VALIDATE_CONTEXT_RETURN(context,ret) \
+ if (!(context)) { \
RETURN_ERROR(ret,EGL_BAD_CONTEXT); \
}
#define VALIDATE_SURFACE_RETURN(surface, ret) \
- if (surface != EGL_NO_SURFACE) { \
+ if ((surface) != EGL_NO_SURFACE) { \
egl_surface_t* s( static_cast<egl_surface_t*>(surface) ); \
if (s->dpy != (EGLDisplay)&s_display) \
setErrorReturn(EGL_BAD_DISPLAY, EGL_FALSE); \