Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
f1e92dd1
Unverified
Commit
f1e92dd1
authored
May 03, 2021
by
busypeter
Committed by
GitHub
May 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix code comments (#2658)
parent
9048e565
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
5 deletions
+1
-5
Math.sol
contracts/utils/math/Math.sol
+1
-1
SafeMath.sol
contracts/utils/math/SafeMath.sol
+0
-4
No files found.
contracts/utils/math/Math.sol
View file @
f1e92dd1
...
@@ -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);
}
}
}
}
contracts/utils/math/SafeMath.sol
View file @
f1e92dd1
...
@@ -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).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment