aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/solidity-by-example.rst4
-rw-r--r--docs/types.rst4
2 files changed, 4 insertions, 4 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;
diff --git a/docs/types.rst b/docs/types.rst
index 66dfc627..dd9c6269 100644
--- a/docs/types.rst
+++ b/docs/types.rst
@@ -743,7 +743,7 @@ shown in the following example:
}
function contribute(uint campaignID) payable {
- Campaign c = campaigns[campaignID];
+ Campaign storage c = campaigns[campaignID];
// Creates a new temporary memory struct, initialised with the given values
// and copies it over to storage.
// Note that you can also use Funder(msg.sender, msg.value) to initialise.
@@ -752,7 +752,7 @@ shown in the following example:
}
function checkGoalReached(uint campaignID) returns (bool reached) {
- Campaign c = campaigns[campaignID];
+ Campaign storage c = campaigns[campaignID];
if (c.amount < c.fundingGoal)
return false;
uint amount = c.amount;