Removed superflous casts of allocated memory.

This commit is contained in:
Camilla Berglund
2013-07-04 14:54:07 +02:00
parent d7512f529c
commit 7a03ca8dbc
12 changed files with 27 additions and 27 deletions
+4 -4
View File
@@ -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)