[client] remove all casts around malloc

The cast is unnecessary in C and should be removed to avoid clutter.
This commit is contained in:
Quantum
2021-08-15 18:55:19 -04:00
committed by Geoffrey McRae
parent fd4a4114e6
commit 81c38e825c
12 changed files with 18 additions and 18 deletions

View File

@@ -54,7 +54,7 @@ void update_uniform_bindings(EGL_Model * model);
bool egl_modelInit(EGL_Model ** model)
{
*model = (EGL_Model *)malloc(sizeof(**model));
*model = malloc(sizeof(**model));
if (!*model)
{
DEBUG_ERROR("Failed to malloc EGL_Model");
@@ -123,11 +123,11 @@ void egl_modelSetDefault(EGL_Model * model, bool flipped)
void egl_modelAddVerts(EGL_Model * model, const GLfloat * verticies, const GLfloat * uvs, const size_t count)
{
struct FloatList * fl = (struct FloatList *)malloc(sizeof(*fl));
struct FloatList * fl = malloc(sizeof(*fl));
fl->count = count;
fl->v = (GLfloat *)malloc(sizeof(GLfloat) * count * 3);
fl->u = (GLfloat *)malloc(sizeof(GLfloat) * count * 2);
fl->v = malloc(sizeof(GLfloat) * count * 3);
fl->u = malloc(sizeof(GLfloat) * count * 2);
memcpy(fl->v, verticies, sizeof(GLfloat) * count * 3);
if (uvs)