mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replace constant with view in std/ contracts.
This commit is contained in:
parent
1a014f83cc
commit
5cbe3e1a50
@ -13,11 +13,11 @@ contract StandardToken is Token {
|
||||
balance[_initialOwner] = _supply;
|
||||
}
|
||||
|
||||
function balanceOf(address _account) constant public returns (uint) {
|
||||
function balanceOf(address _account) view public returns (uint) {
|
||||
return balance[_account];
|
||||
}
|
||||
|
||||
function totalSupply() constant public returns (uint) {
|
||||
function totalSupply() view public returns (uint) {
|
||||
return supply;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ contract StandardToken is Token {
|
||||
return true;
|
||||
}
|
||||
|
||||
function allowance(address _owner, address _spender) constant public returns (uint256) {
|
||||
function allowance(address _owner, address _spender) view public returns (uint256) {
|
||||
return m_allowance[_owner][_spender];
|
||||
}
|
||||
}
|
||||
|
@ -4,10 +4,10 @@ contract Token {
|
||||
event Transfer(address indexed _from, address indexed _to, uint256 _value);
|
||||
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
|
||||
|
||||
function totalSupply() constant public returns (uint256 supply);
|
||||
function balanceOf(address _owner) constant public returns (uint256 balance);
|
||||
function totalSupply() view public returns (uint256 supply);
|
||||
function balanceOf(address _owner) view public returns (uint256 balance);
|
||||
function transfer(address _to, uint256 _value) public returns (bool success);
|
||||
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
|
||||
function approve(address _spender, uint256 _value) public returns (bool success);
|
||||
function allowance(address _owner, address _spender) constant public returns (uint256 remaining);
|
||||
function allowance(address _owner, address _spender) view public returns (uint256 remaining);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user