Skip to content

Commit

Permalink
Use new style for the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Denton-L committed Aug 26, 2016
1 parent f1e6bc2 commit 532266b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
9 changes: 3 additions & 6 deletions docs/common-patterns.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ become the new richest.
richest = msg.sender;
mostSent = msg.value;
return true;
}
else {
} else {
return false;
}
}
Expand All @@ -58,8 +57,7 @@ become the new richest.
pendingWithdrawals[msg.sender] = 0;
if (msg.sender.send(amount)) {
return true;
}
else {
} else {
pendingWithdrawals[msg.sender] = amount;
return false;
}
Expand Down Expand Up @@ -90,8 +88,7 @@ This is as opposed to the more intuitive sending pattern.
richest = msg.sender;
mostSent = msg.value;
return true;
}
else {
} else {
return false;
}
}
Expand Down
3 changes: 1 addition & 2 deletions docs/control-structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,7 @@ As a result, the following code is legal, despite being poorly written::
uint bar = 5;
if (true) {
bar += baz;
}
else {
} else {
uint baz = 10;// never executes
}
return bar;// returns 5
Expand Down
9 changes: 5 additions & 4 deletions docs/frequently-asked-questions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -461,16 +461,17 @@ If you do not want to throw, you can return a pair::

function getCounter(uint index)
returns (uint counter, bool error) {
if (index >= counters.length) return (0, true);
else return (counters[index], false);
if (index >= counters.length)
return (0, true);
else
return (counters[index], false);
}

function checkCounter(uint index) {
var (counter, error) = getCounter(index);
if (error) {
...
}
else {
} else {
...
}
}
Expand Down
3 changes: 1 addition & 2 deletions docs/solidity-by-example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ of votes.
// If the delegate already voted,
// directly add to the number of votes
proposals[delegate.vote].voteCount += sender.weight;
}
else {
} else {
// If the delegate did not vote yet,
// add to her weight.
delegate.weight += sender.weight;
Expand Down

0 comments on commit 532266b

Please sign in to comment.