diff options
-rw-r--r-- | CODING_STYLE.md | 2 | ||||
-rw-r--r-- | docs/solidity-by-example.rst | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CODING_STYLE.md b/CODING_STYLE.md index 8101db0c..a0fe9864 100644 --- a/CODING_STYLE.md +++ b/CODING_STYLE.md @@ -146,7 +146,7 @@ for (auto i = x->begin(); i != x->end(); ++i) {} ``` No: -```cp +```cpp const double d = 0; int i, j; char *s; diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst index 8f58f339..f71f1e23 100644 --- a/docs/solidity-by-example.rst +++ b/docs/solidity-by-example.rst @@ -152,6 +152,7 @@ of votes. /// to proposal `proposals[proposal].name`. function vote(uint proposal) public { Voter storage sender = voters[msg.sender]; + require(sender.weight != 0, "Has no right to vote"); require(!sender.voted, "Already voted."); sender.voted = true; sender.vote = proposal; |