Update function visibility example

Two functions don't access state and should be `pure`. Also, inconsistent spacing when using arithmetic.
This commit is contained in:
Daniel Kronovet 2018-06-03 12:25:52 +03:00 committed by GitHub
parent 0a1a8bfb09
commit 0d4adc44c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,10 +194,10 @@ In the following example, ``D``, can call ``c.getData()`` to retrieve the value
contract C {
uint private data;
function f(uint a) private returns(uint b) { return a + 1; }
function f(uint a) private pure returns(uint b) { return a + 1; }
function setData(uint a) public { data = a; }
function getData() public returns(uint) { return data; }
function compute(uint a, uint b) internal returns (uint) { return a+b; }
function compute(uint a, uint b) internal pure returns (uint) { return a + b; }
}
contract D {