From a54b85f373c647118c77daab51802a1d06d34fe0 Mon Sep 17 00:00:00 2001 From: Noah Zinsmeister Date: Mon, 6 Jan 2020 14:50:49 -0500 Subject: [PATCH] put a trailing _ on private variable --- contracts/UniswapV2Factory.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/UniswapV2Factory.sol b/contracts/UniswapV2Factory.sol index 25704c4..50cb5ba 100644 --- a/contracts/UniswapV2Factory.sol +++ b/contracts/UniswapV2Factory.sol @@ -8,7 +8,7 @@ contract UniswapV2Factory is IUniswapV2Factory { address public feeToSetter; address public feeTo; - mapping (address => mapping(address => address)) private _getExchange; + mapping (address => mapping(address => address)) private getExchange_; address[] public exchanges; event ExchangeCreated(address indexed token0, address indexed token1, address exchange, uint); @@ -25,7 +25,7 @@ contract UniswapV2Factory is IUniswapV2Factory { function getExchange(address tokenA, address tokenB) external view returns (address exchange) { (address token0, address token1) = sortTokens(tokenA, tokenB); - return _getExchange[token0][token1]; + return getExchange_[token0][token1]; } function exchangesCount() external view returns (uint) { @@ -36,14 +36,14 @@ contract UniswapV2Factory is IUniswapV2Factory { require(tokenA != tokenB, "UniswapV2Factory: SAME_ADDRESS"); require(tokenA != address(0) && tokenB != address(0), "UniswapV2Factory: ZERO_ADDRESS"); (address token0, address token1) = sortTokens(tokenA, tokenB); - require(_getExchange[token0][token1] == address(0), "UniswapV2Factory: EXCHANGE_EXISTS"); + require(getExchange_[token0][token1] == address(0), "UniswapV2Factory: EXCHANGE_EXISTS"); bytes memory exchangeBytecodeMemory = exchangeBytecode; // load bytecode into memory because create2 requires it bytes32 salt = keccak256(abi.encodePacked(token0, token1)); assembly { // solium-disable-line security/no-inline-assembly exchange := create2(0, add(exchangeBytecodeMemory, 32), mload(exchangeBytecodeMemory), salt) } IUniswapV2(exchange).initialize(token0, token1); - _getExchange[token0][token1] = exchange; + getExchange_[token0][token1] = exchange; exchanges.push(exchange); emit ExchangeCreated(token0, token1, exchange, exchanges.length); }