mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Updated some examples following the naming convention
According to Solidity naming convention: https://docs.soliditylang.org/en/latest/style-guide.html#naming-conventions There is no need to use underscore except when there is a naming collision. In which case, a trailing underscore is used to avoid the collision. So in this change, I am removing all underscores, except for the ones that could shadow other symbols in their context (none of the changed names is a reserved keyword: https://docs.soliditylang.org/en/latest/cheatsheet.html?highlight=reserved#reserved-keywords )
This commit is contained in:
@@ -36,8 +36,8 @@ you can use state machine-like constructs inside a contract.
|
||||
// The state variable has a default value of the first member, `State.created`
|
||||
State public state;
|
||||
|
||||
modifier condition(bool _condition) {
|
||||
require(_condition);
|
||||
modifier condition(bool condition_) {
|
||||
require(condition_);
|
||||
_;
|
||||
}
|
||||
|
||||
@@ -62,8 +62,8 @@ you can use state machine-like constructs inside a contract.
|
||||
_;
|
||||
}
|
||||
|
||||
modifier inState(State _state) {
|
||||
if (state != _state)
|
||||
modifier inState(State state_) {
|
||||
if (state != state_)
|
||||
revert InvalidState();
|
||||
_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user