mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
Removed checks for clearly invalid NULL pointers.
This commit is contained in:
parent
8c766b57e7
commit
75705ba2c5
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user