This commit is contained in:
2026-02-15 19:53:55 +01:00
parent 2162b3eadd
commit 6a9a4cc27b
6 changed files with 35 additions and 27 deletions
@@ -34,8 +34,6 @@ struct vector *vector_append(struct vector *v, struct animal *animal){
if(v == NULL || animal == NULL) return NULL;
if (v->capacity <= v->size) v = vector_resize(v, v->capacity * 2);
// TODO A voir si le realloc ajoute de l'espace a gauche ou a droite
// car sinon y a ecrasement de data
v->animal[v->size] = animal;
v->size ++;
return v;
@@ -70,5 +68,4 @@ void vector_destroy(struct vector *v){
free(v->animal);
free(v);
//free_animal(v->animal);
}