Removed checks for clearly invalid NULL pointers.

This commit is contained in:
Camilla Berglund 2013-01-25 01:08:14 +01:00
parent 8c766b57e7
commit 75705ba2c5

View File

@ -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;