From 75705ba2c56b0e7bf7fed0559c03b973393a4cc7 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Fri, 25 Jan 2013 01:08:14 +0100 Subject: [PATCH] Removed checks for clearly invalid NULL pointers. --- src/monitor.c | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/monitor.c b/src/monitor.c index 6a6e8b91..729de745 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -312,12 +312,6 @@ GLFWAPI GLFWmonitor** glfwGetMonitors(int* count) return NULL; } - if (count == NULL) - { - _glfwInputError(GLFW_INVALID_VALUE, NULL); - return NULL; - } - *count = _glfw.monitorCount; return (GLFWmonitor**) _glfw.monitors; } @@ -371,13 +365,6 @@ GLFWAPI int glfwGetMonitorParam(GLFWmonitor* handle, int param) return 0; } - if (monitor == NULL) - { - _glfwInputError(GLFW_INVALID_VALUE, - "glfwGetMonitorParam: Invalid monitor handle"); - return 0; - } - switch (param) { case GLFW_MONITOR_WIDTH_MM: @@ -410,13 +397,6 @@ GLFWAPI const char* glfwGetMonitorName(GLFWmonitor* handle) return NULL; } - if (monitor == NULL) - { - _glfwInputError(GLFW_INVALID_VALUE, - "glfwGetMonitorString: Invalid monitor handle"); - return NULL; - } - return monitor->name; } @@ -451,19 +431,6 @@ GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* handle, int* count) return NULL; } - if (monitor == NULL) - { - _glfwInputError(GLFW_INVALID_VALUE, - "glfwGetVideoModes: Invalid monitor handle"); - return 0; - } - - if (count == NULL) - { - _glfwInputError(GLFW_INVALID_VALUE, NULL); - return NULL; - } - if (!refreshVideoModes(monitor)) return GL_FALSE;