Skip to content

Commit

Permalink
Fix: isEmpty checking wrongly in ArrayList.
Browse files Browse the repository at this point in the history
  • Loading branch information
Heromyth committed Nov 16, 2021
1 parent 4abd41f commit 51b5542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/hunt/collection/ArrayList.d
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ class ArrayList(E) : AbstractList!E {
* @return <tt>true</tt> if this list contains no elements
*/
override bool isEmpty() {
return _array.length == 0;
return _size == 0;
}

/**
Expand Down

0 comments on commit 51b5542

Please sign in to comment.