Fix code comments (#2658)

This commit is contained in:
busypeter
2021-05-03 21:50:07 +02:00
committed by GitHub
parent 9048e565d7
commit f1e92dd184
2 changed files with 1 additions and 5 deletions

View File

@ -25,7 +25,7 @@ library Math {
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute
// (a + b) / 2 can overflow, so we distribute.
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
}
}

View File

@ -175,10 +175,6 @@ library SafeMath {
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).