Skip to content

Commit 2303acb

Browse files
committed
Improved possibility to test current state in orthogonal state machines
1 parent d3fa5b3 commit 2303acb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

include/boost/sml.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,8 +1712,11 @@ class sm {
17121712
auto result = false;
17131713
visit_current_states<T>([&](auto state) {
17141714
(void)state;
1715-
result |= (aux::get_id<state_t, typename TState::type>((states_ids_t *)0) ==
1716-
aux::get_id<state_t, typename decltype(state)::type>((states_ids_t *)0));
1715+
if ((aux::get_id<state_t, typename TState::type>((states_ids_t *)0) ==
1716+
aux::get_id<state_t, typename decltype(state)::type>((states_ids_t *)0))) {
1717+
result = true;
1718+
return;
1719+
}
17171720
});
17181721
return result;
17191722
}

0 commit comments

Comments
 (0)