Small comment.

This commit is contained in:
Alberto Cuesta Cañada
2020-01-23 20:46:52 +00:00
parent 41cb935930
commit 31e9a54c19

View File

@ -44,6 +44,7 @@ library EnumerableSet {
internal
{
require(contains(set, value), "EnumerableSet: value not in set");
// Replaced the value to remove with the last one in the array. O(1)
set.values[set.index[value] - 1] = set.values[set.values.length - 1];
set.values.pop();
delete set.index[value];