mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Removed superflous casts of allocated memory.
This commit is contained in:
@@ -113,7 +113,7 @@ static void addJoystickElement(_GLFWjoy* joystick, CFTypeRef elementRef)
|
||||
{
|
||||
long number;
|
||||
CFTypeRef numberRef;
|
||||
_GLFWjoyelement* element = (_GLFWjoyelement*) calloc(1, sizeof(_GLFWjoyelement));
|
||||
_GLFWjoyelement* element = calloc(1, sizeof(_GLFWjoyelement));
|
||||
|
||||
CFArrayAppendValue(elementsArray, element);
|
||||
|
||||
@@ -427,10 +427,10 @@ void _glfwInitJoysticks(void)
|
||||
CFRelease(valueRef);
|
||||
}
|
||||
|
||||
joystick->axes = (float*) calloc(CFArrayGetCount(joystick->axisElements),
|
||||
joystick->axes = calloc(CFArrayGetCount(joystick->axisElements),
|
||||
sizeof(float));
|
||||
joystick->buttons = (unsigned char*) calloc(CFArrayGetCount(joystick->buttonElements) +
|
||||
CFArrayGetCount(joystick->hatElements) * 4, 1);
|
||||
joystick->buttons = calloc(CFArrayGetCount(joystick->buttonElements) +
|
||||
CFArrayGetCount(joystick->hatElements) * 4, 1);
|
||||
|
||||
joy++;
|
||||
if (joy > GLFW_JOYSTICK_LAST)
|
||||
|
||||
Reference in New Issue
Block a user