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
@@ -58,7 +58,7 @@ static const char* getDisplayName(CGDirectDisplayID displayID)
size = CFStringGetMaximumSizeForEncoding(CFStringGetLength(value),
kCFStringEncodingUTF8);
name = (char*) calloc(size + 1, sizeof(char));
name = calloc(size + 1, sizeof(char));
CFStringGetCString(value, name, size, kCFStringEncodingUTF8);
CFRelease(info);
@@ -253,8 +253,8 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
CGGetActiveDisplayList(0, NULL, &monitorCount);
displays = (CGDirectDisplayID*) calloc(monitorCount, sizeof(CGDirectDisplayID));
monitors = (_GLFWmonitor**) calloc(monitorCount, sizeof(_GLFWmonitor*));
displays = calloc(monitorCount, sizeof(CGDirectDisplayID));
monitors = calloc(monitorCount, sizeof(_GLFWmonitor*));
CGGetActiveDisplayList(monitorCount, displays, &monitorCount);
@@ -341,7 +341,7 @@ GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found)
modes = CGDisplayCopyAllDisplayModes(monitor->ns.displayID, NULL);
count = CFArrayGetCount(modes);
result = (GLFWvidmode*) calloc(count, sizeof(GLFWvidmode));
result = calloc(count, sizeof(GLFWvidmode));
*found = 0;
for (i = 0; i < count; i++)