Clean up some needless malloc casts, convert some mallocs to callocs, and fix some style

This commit is contained in:
Michael McConville
2015-09-16 23:42:36 -04:00
parent 1d805b36b4
commit 445222e48c
8 changed files with 20 additions and 28 deletions

View File

@ -37,7 +37,7 @@ Vector* Vector_new(ObjectClass* type, bool owner, int size) {
if (size == DEFAULT_SIZE)
size = 10;
this = (Vector*) malloc(sizeof(Vector));
this = malloc(sizeof(Vector));
this->growthRate = size;
this->array = (Object**) calloc(size, sizeof(Object*));
this->arraySize = size;