aboutsummaryrefslogtreecommitdiffstats
path: root/docs/solidity-by-example.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/solidity-by-example.rst')
-rw-r--r--docs/solidity-by-example.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst
index ddbca471..79eafd06 100644
--- a/docs/solidity-by-example.rst
+++ b/docs/solidity-by-example.rst
@@ -101,7 +101,7 @@ of votes.
/// Delegate your vote to the voter `to`.
function delegate(address to) {
// assigns reference
- Voter sender = voters[msg.sender];
+ Voter storage sender = voters[msg.sender];
require(!sender.voted);
// Self-delegation is not allowed.
@@ -141,7 +141,7 @@ of votes.
/// Give your vote (including votes delegated to you)
/// to proposal `proposals[proposal].name`.
function vote(uint proposal) {
- Voter sender = voters[msg.sender];
+ Voter storage sender = voters[msg.sender];
require(!sender.voted);
sender.voted = true;
sender.vote = proposal;