Skip to content

Commit

Permalink
Automatically format code with clang-format.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Egli committed Aug 3, 2016
1 parent db0f82a commit 5885289
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions fsm.h
Expand Up @@ -170,10 +170,10 @@ The following example implements this simple state machine.
*/

// Includes
#include <functional>
#include <limits>
#include <map>
#include <vector>
#include <functional>

// Forward declarations

Expand All @@ -192,7 +192,8 @@ enum Fsm_Errors {
/**
* An generic finite state machine (FSM) implementation.
*/
template <class State, State Initial, class Trigger> class Fsm
template <class State, State Initial, class Trigger>
class Fsm
{

public:
Expand All @@ -207,7 +208,8 @@ template <class State, State Initial, class Trigger> class Fsm
/**
* Defines a transition between two states.
*/
struct Trans {
struct Trans
{
State from_state;
State to_state;
Trigger trigger;
Expand Down Expand Up @@ -249,7 +251,8 @@ template <class State, State Initial, class Trigger> class Fsm
* This function can be called multiple times at any time. Added
* transitions cannot be removed from the machine.
*/
template <typename InputIt> void add_transitions(InputIt start, InputIt end)
template <typename InputIt>
void add_transitions(InputIt start, InputIt end)
{
InputIt it = start;
for(; it != end; ++it) {
Expand All @@ -264,7 +267,8 @@ template <class State, State Initial, class Trigger> class Fsm
* This method takes a collection and adds all its elements to the list of
* transitions.
*/
template <typename Coll> void add_transitions(Coll&& c)
template <typename Coll>
void add_transitions(Coll&& c)
{
add_transitions(std::begin(c), std::end(c));
}
Expand Down Expand Up @@ -358,6 +362,7 @@ template <class State, State Initial, class Trigger> class Fsm
{
return m_cs;
}

/**
* Returns whether the current state is the initial state.
*/
Expand Down

0 comments on commit 5885289

Please sign in to comment.