From 1d2d18f9dab55b58802c3b1e70257183bb558aa2 Mon Sep 17 00:00:00 2001 From: Klaus Hott Vidal Date: Thu, 29 Mar 2018 07:00:10 +1300 Subject: [PATCH] Small gas improvement in SafeMath.sol (#811) --- contracts/math/SafeMath.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/math/SafeMath.sol b/contracts/math/SafeMath.sol index 788797ea1..35b92ffcb 100644 --- a/contracts/math/SafeMath.sol +++ b/contracts/math/SafeMath.sol @@ -24,9 +24,9 @@ library SafeMath { */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 - uint256 c = a / b; + // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold - return c; + return a / b; } /**