Drop duplicate and always true condition

This block is only entered if this->owner is true.
This commit is contained in:
Christian Göttsche 2020-10-27 11:02:34 +01:00 committed by cgzones
parent c98d4577c9
commit 1533ea88a6
1 changed files with 1 additions and 3 deletions

View File

@ -264,11 +264,9 @@ void Vector_set(Vector* this, int idx, void* data_) {
if (this->owner) { if (this->owner) {
Object* removed = this->array[idx]; Object* removed = this->array[idx];
assert (removed != NULL); assert (removed != NULL);
if (this->owner) {
Object_delete(removed); Object_delete(removed);
} }
} }
}
this->array[idx] = data; this->array[idx] = data;
assert(Vector_isConsistent(this)); assert(Vector_isConsistent(this));
} }