Fix GCC "declaration of ... changes meaning" errors.

PiperOrigin-RevId: 470175500
Change-Id: If13a81f308f803d3cc4731b3d4d0561cfe56d5c8
This commit is contained in:
Saran Tunyasuvunakool
2022-08-26 00:13:13 -07:00
committed by Copybara-Service
parent 3240596c3a
commit 9d9493153c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ const struct Glfw& Glfw(void* dlhandle) {
glfw.func = reinterpret_cast<decltype(glfw.func)>(dlsym(dlhandle, #func))
#endif
#else
#define mjGLFW_RESOLVE_SYMBOL(func) glfw.func = &func
#define mjGLFW_RESOLVE_SYMBOL(func) glfw.func = &::func
#endif
#define mjGLFW_INITIALIZE_SYMBOL(func) \
+1 -1
View File
@@ -22,7 +22,7 @@ namespace mujoco {
// This allows us to use GLFW without introducing a link-time dependency on the
// library, which is useful e.g. when using GLFW via Python.
struct Glfw {
#define mjGLFW_DECLARE_SYMBOL(func) decltype(&func) func
#define mjGLFW_DECLARE_SYMBOL(func) decltype(&::func) func
// go/keep-sorted start
mjGLFW_DECLARE_SYMBOL(glfwCreateWindow);
mjGLFW_DECLARE_SYMBOL(glfwGetCursorPos);