Skip to content

Commit

Permalink
fix some assertions in Vector_isConsistent and Vector_splice.
Browse files Browse the repository at this point in the history
  • Loading branch information
lbckmnn authored and cgzones committed Apr 4, 2023
1 parent 61e7cb1 commit c707b0e
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions Vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ static bool Vector_isConsistent(const Vector* this) {
assert(this->items <= this->arraySize);
assert(!Vector_isDirty(this));

if (this->owner) {
for (int i = 0; i < this->items; i++) {
if (!this->array[i]) {
return false;
}
}
}

return true;
}

Expand Down Expand Up @@ -396,7 +388,7 @@ int Vector_indexOf(const Vector* this, const void* search_, Object_Compare compa
void Vector_splice(Vector* this, Vector* from) {
assert(Vector_isConsistent(this));
assert(Vector_isConsistent(from));
assert(!(this->owner && from->owner));
assert(!this->owner);

int olditems = this->items;
this->items += from->items;
Expand Down

0 comments on commit c707b0e

Please sign in to comment.