Adhere to naming convention (#2150)

* Upgrade to latest solhint rc

* Add private-vars-leading-underscore linter rule

* Add leading underscore to GSNRecipient constants

* Remove leading underscore from ERC165Checker functions

* Add leading underscore to multiple private constants

* Fix linter errors in mocks

* Add leading underscore to ERC777's ERC1820 registry

* Add changelog entry
This commit is contained in:
Nicolás Venturo
2020-03-27 13:49:08 -03:00
committed by GitHub
parent 4476a2d531
commit 97894a140d
16 changed files with 2319 additions and 1098 deletions

View File

@ -5,7 +5,7 @@ pragma solidity ^0.6.0;
* @dev Signed math operations with safety checks that revert on error.
*/
library SignedSafeMath {
int256 constant private INT256_MIN = -2**255;
int256 constant private _INT256_MIN = -2**255;
/**
* @dev Multiplies two signed integers, reverts on overflow.
@ -18,7 +18,7 @@ library SignedSafeMath {
return 0;
}
require(!(a == -1 && b == INT256_MIN), "SignedSafeMath: multiplication overflow");
require(!(a == -1 && b == _INT256_MIN), "SignedSafeMath: multiplication overflow");
int256 c = a * b;
require(c / a == b, "SignedSafeMath: multiplication overflow");
@ -31,7 +31,7 @@ library SignedSafeMath {
*/
function div(int256 a, int256 b) internal pure returns (int256) {
require(b != 0, "SignedSafeMath: division by zero");
require(!(b == -1 && a == INT256_MIN), "SignedSafeMath: division overflow");
require(!(b == -1 && a == _INT256_MIN), "SignedSafeMath: division overflow");
int256 c = a / b;