Skip to content

Commit

Permalink
Merge pull request #23 from Jedzia/c++17
Browse files Browse the repository at this point in the history
fix old-style casts
fix typo in docs
  • Loading branch information
zmij authored Mar 22, 2020
2 parents 274d4c9 + de085f7 commit 251a74e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ using minimal = ::afsm::state_machine<minimal_def>;

void use()
{
mimimal fsm;
minimal fsm;
fsm.process_event(start{});
fsm.process_event(stop{});
}
Expand Down
8 changes: 4 additions & 4 deletions include/afsm/detail/transitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,19 +424,19 @@ class state_transition_table {

state_transition_table(fsm_type& fsm, state_transition_table const& rhs)
: fsm_{&fsm},
current_state_{(std::size_t)rhs.current_state_},
current_state_{static_cast<std::size_t>(rhs.current_state_)},
states_{inner_states_constructor::copy_construct(fsm, rhs.states_)}
{}
state_transition_table(fsm_type& fsm, state_transition_table&& rhs)
: fsm_{&fsm},
current_state_{(std::size_t)rhs.current_state_},
current_state_{static_cast<std::size_t>(rhs.current_state_)},
states_{inner_states_constructor::move_construct(fsm, std::move(rhs.states_))}
{}

state_transition_table(state_transition_table const&) = delete;
state_transition_table(state_transition_table&& rhs)
: fsm_{rhs.fsm_},
current_state_{(std::size_t)rhs.current_state_},
current_state_{static_cast<std::size_t>(rhs.current_state_)},
states_{std::move(rhs.states_)}
{}
state_transition_table&
Expand Down Expand Up @@ -490,7 +490,7 @@ class state_transition_table {
std::size_t
current_state() const
{
return (std::size_t)current_state_;
return static_cast<std::size_t>(current_state_);
}

void
Expand Down

0 comments on commit 251a74e

Please sign in to comment.