Conver to using \ for member variables in classes. In structs just use the name.

This commit is contained in:
Zed A. Shaw 2024-10-03 17:05:23 -04:00
parent 187edb898e
commit 5cf66aad02
8 changed files with 143 additions and 144 deletions

View file

@ -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;
}
};