Unverified Commit f1e92dd1 by busypeter Committed by GitHub

Fix code comments (#2658)

parent 9048e565
...@@ -25,7 +25,7 @@ library Math { ...@@ -25,7 +25,7 @@ library Math {
* zero. * zero.
*/ */
function average(uint256 a, uint256 b) internal pure returns (uint256) { 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); return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
} }
} }
...@@ -175,10 +175,6 @@ library SafeMath { ...@@ -175,10 +175,6 @@ library SafeMath {
* @dev Returns the integer division of two unsigned integers, reverting with custom message on * @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero. * 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 * Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity * `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas). * uses an invalid opcode to revert (consuming all remaining gas).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment