소스 검색

Silence false positive warning on preValidatePurchase (#1857)

Nicolás Venturo 6 년 전
부모
커밋
1c1fa5d968
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      contracts/crowdsale/Crowdsale.sol

+ 1 - 0
contracts/crowdsale/Crowdsale.sol

@@ -138,6 +138,7 @@ contract Crowdsale is ReentrancyGuard {
     function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal view {
         require(beneficiary != address(0), "Crowdsale: beneficiary is the zero address");
         require(weiAmount != 0, "Crowdsale: weiAmount is 0");
+        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
     }
 
     /**