From b00a7d0619752b606b5964b02eefdcd4bc5146cd Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 1 Jun 2015 20:50:10 +0200 Subject: [PATCH] Simplified version string functions. --- src/cocoa_init.m | 4 +--- src/mir_init.c | 4 +--- src/win32_init.c | 4 +--- src/wl_init.c | 4 +--- src/x11_init.c | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/cocoa_init.m b/src/cocoa_init.m index 8779cdfa..8bb6b427 100644 --- a/src/cocoa_init.m +++ b/src/cocoa_init.m @@ -249,7 +249,7 @@ void _glfwPlatformTerminate(void) const char* _glfwPlatformGetVersionString(void) { - const char* version = _GLFW_VERSION_NUMBER " Cocoa" + return _GLFW_VERSION_NUMBER " Cocoa" #if defined(_GLFW_NSGL) " NSGL" #endif @@ -266,7 +266,5 @@ const char* _glfwPlatformGetVersionString(void) " dynamic" #endif ; - - return version; } diff --git a/src/mir_init.c b/src/mir_init.c index c2de5620..153e4005 100644 --- a/src/mir_init.c +++ b/src/mir_init.c @@ -87,7 +87,7 @@ void _glfwPlatformTerminate(void) const char* _glfwPlatformGetVersionString(void) { - const char* version = _GLFW_VERSION_NUMBER " Mir EGL" + return _GLFW_VERSION_NUMBER " Mir EGL" #if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) " clock_gettime" #else @@ -100,7 +100,5 @@ const char* _glfwPlatformGetVersionString(void) " shared" #endif ; - - return version; } diff --git a/src/win32_init.c b/src/win32_init.c index 7c3bd093..c39c67c1 100644 --- a/src/win32_init.c +++ b/src/win32_init.c @@ -369,7 +369,7 @@ void _glfwPlatformTerminate(void) const char* _glfwPlatformGetVersionString(void) { - const char* version = _GLFW_VERSION_NUMBER " Win32" + return _GLFW_VERSION_NUMBER " Win32" #if defined(_GLFW_WGL) " WGL" #elif defined(_GLFW_EGL) @@ -384,7 +384,5 @@ const char* _glfwPlatformGetVersionString(void) " DLL" #endif ; - - return version; } diff --git a/src/wl_init.c b/src/wl_init.c index 280608dd..ea621f99 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -620,7 +620,7 @@ void _glfwPlatformTerminate(void) const char* _glfwPlatformGetVersionString(void) { - const char* version = _GLFW_VERSION_NUMBER " Wayland EGL" + return _GLFW_VERSION_NUMBER " Wayland EGL" #if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) " clock_gettime" #else @@ -633,7 +633,5 @@ const char* _glfwPlatformGetVersionString(void) " shared" #endif ; - - return version; } diff --git a/src/x11_init.c b/src/x11_init.c index ea194c9b..033a0698 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -788,7 +788,7 @@ void _glfwPlatformTerminate(void) const char* _glfwPlatformGetVersionString(void) { - const char* version = _GLFW_VERSION_NUMBER " X11" + return _GLFW_VERSION_NUMBER " X11" #if defined(_GLFW_GLX) " GLX" #elif defined(_GLFW_EGL) @@ -806,7 +806,5 @@ const char* _glfwPlatformGetVersionString(void) " shared" #endif ; - - return version; }