diff options
author | Jim McDonald <Jim@mcdee.net> | 2017-12-13 15:55:46 +0800 |
---|---|---|
committer | Jim McDonald <Jim@mcdee.net> | 2017-12-13 15:55:46 +0800 |
commit | 93cf4dee666e01d6907c75c4018a701e5069daad (patch) | |
tree | 8c3732c7a5961c00bee6adb3f916b99744c65bf7 /docs/assembly.rst | |
parent | 6e521d59b0a30fa0673aaf84559d5b74dbb1eed7 (diff) | |
download | dexon-solidity-93cf4dee666e01d6907c75c4018a701e5069daad.tar dexon-solidity-93cf4dee666e01d6907c75c4018a701e5069daad.tar.gz dexon-solidity-93cf4dee666e01d6907c75c4018a701e5069daad.tar.bz2 dexon-solidity-93cf4dee666e01d6907c75c4018a701e5069daad.tar.lz dexon-solidity-93cf4dee666e01d6907c75c4018a701e5069daad.tar.xz dexon-solidity-93cf4dee666e01d6907c75c4018a701e5069daad.tar.zst dexon-solidity-93cf4dee666e01d6907c75c4018a701e5069daad.zip |
Fixes for failing tests
Diffstat (limited to 'docs/assembly.rst')
-rw-r--r-- | docs/assembly.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/assembly.rst b/docs/assembly.rst index e09a556b..825892b3 100644 --- a/docs/assembly.rst +++ b/docs/assembly.rst @@ -91,7 +91,7 @@ you really know what you are doing. // We know that we only access the array in bounds, so we can avoid the check. // 0x20 needs to be added to an array because the first slot contains the // array length. - function sumAsm(uint[] _data) returns (uint o_sum) public { + function sumAsm(uint[] _data) public returns (uint o_sum) { for (uint i = 0; i < _data.length; ++i) { assembly { o_sum := add(o_sum, mload(add(add(_data, 0x20), mul(i, 0x20)))) @@ -100,7 +100,7 @@ you really know what you are doing. } // Same as above, but accomplish the entire code within inline assembly. - function sumPureAsm(uint[] _data) returns (uint o_sum) public { + function sumPureAsm(uint[] _data) public returns (uint o_sum) { assembly { // Load the length (first 32 bytes) let len := mload(_data) |