Created AddressSet factory method.
This commit is contained in:
@ -14,7 +14,7 @@ contract EnumerableSetMock{
|
||||
EnumerableSet.AddressSet private set;
|
||||
|
||||
constructor() public {
|
||||
set = EnumerableSet.AddressSet({values: new address[](0)});
|
||||
set = EnumerableSet.newAddressSet();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -27,6 +27,17 @@ library EnumerableSet {
|
||||
address[] values;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Add a value. O(1).
|
||||
*/
|
||||
function newAddressSet()
|
||||
internal
|
||||
pure
|
||||
returns (AddressSet memory)
|
||||
{
|
||||
return AddressSet({values: new address[](0)});
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Add a value. O(1).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user