From 4ddcacdcac249202b156bd8c9db6682e29970fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Venturo?= Date: Fri, 24 Jan 2020 13:06:49 -0300 Subject: [PATCH] Update docs --- contracts/utils/EnumerableSet.sol | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/contracts/utils/EnumerableSet.sol b/contracts/utils/EnumerableSet.sol index 9d2f6f68b..6798a30df 100644 --- a/contracts/utils/EnumerableSet.sol +++ b/contracts/utils/EnumerableSet.sol @@ -9,7 +9,7 @@ pragma solidity ^0.5.0; * * - Elements are added, removed, and checked for existence in constant time * (O(1)). - * - Elements are enumerated in O(n). The ordering in this list may change. + * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * As of v2.5.0, only `address` sets are supported. * @@ -30,7 +30,7 @@ library EnumerableSet { } /** - * @dev Add a value. O(1). + * @dev Creates a new empty address set. */ function newAddressSet() internal @@ -41,7 +41,8 @@ library EnumerableSet { } /** - * @dev Add a value. O(1). Returns false if the value was already in the set. + * @dev Add a value to a set. O(1). + * Returns false if the value was already in the set. */ function add(AddressSet storage set, address value) internal @@ -56,7 +57,8 @@ library EnumerableSet { } /** - * @dev Remove a value. O(1). Returns false if the calue was not present in the set. + * @dev Removes a value from a set. O(1). + * Returns false if the value was not present in the set. */ function remove(AddressSet storage set, address value) internal @@ -100,7 +102,9 @@ library EnumerableSet { } /** - * @dev Return an array with all values in the set. O(N). + * @dev Returns an array with all values in the set. O(N). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. */ function enumerate(AddressSet storage set) internal