aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJim McDonald <Jim@mcdee.net>2017-12-13 15:55:46 +0800
committerJim McDonald <Jim@mcdee.net>2017-12-13 15:55:46 +0800
commit93cf4dee666e01d6907c75c4018a701e5069daad (patch)
tree8c3732c7a5961c00bee6adb3f916b99744c65bf7 /docs
parent6e521d59b0a30fa0673aaf84559d5b74dbb1eed7 (diff)
downloaddexon-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')
-rw-r--r--docs/assembly.rst4
-rw-r--r--docs/control-structures.rst2
-rw-r--r--docs/solidity-by-example.rst8
-rw-r--r--docs/types.rst2
4 files changed, 8 insertions, 8 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)
diff --git a/docs/control-structures.rst b/docs/control-structures.rst
index 079b14c7..0c5825bc 100644
--- a/docs/control-structures.rst
+++ b/docs/control-structures.rst
@@ -135,7 +135,7 @@ the gas can be specified with special options ``.value()`` and ``.gas()``, respe
contract Consumer {
InfoFeed feed;
function setFeed(address addr) public { feed = InfoFeed(addr); }
- function public callFeed() { feed.info.value(10).gas(800)(); }
+ function callFeed() public { feed.info.value(10).gas(800)(); }
}
The modifier ``payable`` has to be used for ``info``, because otherwise, the `.value()`
diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst
index 6c01278a..b663083c 100644
--- a/docs/solidity-by-example.rst
+++ b/docs/solidity-by-example.rst
@@ -158,9 +158,9 @@ of votes.
returns (uint winningProposal)
{
uint winningVoteCount = 0;
- for (uint p = 0; p < winningProposals.length; p++) {
- if (winningProposals[p].voteCount > winningVoteCount) {
- winningVoteCount = winningProposals[p].voteCount;
+ for (uint p = 0; p < proposals.length; p++) {
+ if (proposals[p].voteCount > winningVoteCount) {
+ winningVoteCount = proposals[p].voteCount;
winningProposal = p;
}
}
@@ -172,7 +172,7 @@ of votes.
function winnerName() public view
returns (bytes32 winnerName)
{
- name = proposals[winningProposal()].name;
+ winnerName = proposals[winningProposal()].name;
}
}
diff --git a/docs/types.rst b/docs/types.rst
index fbebb1aa..98009b3f 100644
--- a/docs/types.rst
+++ b/docs/types.rst
@@ -649,7 +649,7 @@ assigned to a variable right away.
function f() public pure {
g([uint(1), 2, 3]);
}
- function g(uint[3] _data) public {
+ function g(uint[3] _data) public pure {
// ...
}
}