From ee5d161f6153e1f9da73e477f63f38dcf52ca10c Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 26 Jun 2024 15:44:26 +0200 Subject: `make format` --- shared/FSM.h | 60 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'shared') diff --git a/shared/FSM.h b/shared/FSM.h index 792a44f..db1de07 100644 --- a/shared/FSM.h +++ b/shared/FSM.h @@ -13,38 +13,38 @@ /// class. template class FSM { public: - template FSM(TPState &...args) { - int i = 0; - - ((void)_states.emplace(i++, args), ...); - } - - /// - /// Implement with FSM::act() - /// - void act(); - - /// - /// Used to check current state. - /// - /// Current state. - std::shared_ptr &get_state() { return _currentState; } - - /// - /// Used to get all states. - /// - /// Current states. - std::map> get_states(); - - /// - /// Sets current state, calls appropiate functions. - /// - /// State to transition into. - void set_state(std::shared_ptr); + template FSM(TPState &... args) { + int i = 0; + + ((void) _states.emplace(i++, args), ...); + } + + /// + /// Implement with FSM::act() + /// + void act(); + + /// + /// Used to check current state. + /// + /// Current state. + std::shared_ptr & get_state() { return _currentState; } + + /// + /// Used to get all states. + /// + /// Current states. + std::map> get_states(); + + /// + /// Sets current state, calls appropiate functions. + /// + /// State to transition into. + void set_state(std::shared_ptr); private: - std::map> _states; - std::shared_ptr _currentState; + std::map> _states; + std::shared_ptr _currentState; }; #endif // _FSM_H_ \ No newline at end of file -- cgit v1.2.3