Conver to using \ for member variables in classes. In structs just use the name.
This commit is contained in:
parent
187edb898e
commit
5cf66aad02
8 changed files with 143 additions and 144 deletions
6
fsm.hpp
6
fsm.hpp
|
@ -12,17 +12,17 @@ template<typename S, typename E>
|
|||
class DeadSimpleFSM {
|
||||
protected:
|
||||
// BUG: don't put this in your class because state() won't work
|
||||
S _state = S::START;
|
||||
S $state = S::START;
|
||||
|
||||
public:
|
||||
template<typename... Types>
|
||||
void event(E event, Types... args);
|
||||
|
||||
void state(S next_state) {
|
||||
_state = next_state;
|
||||
$state = next_state;
|
||||
}
|
||||
|
||||
bool in_state(S state) {
|
||||
return _state == state;
|
||||
return $state == state;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue