Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51303 - sandbox/msm/boost/msm
From: christophe.j.henry_at_[hidden]
Date: 2009-02-17 16:43:15


Author: chenry
Date: 2009-02-17 16:43:15 EST (Tue, 17 Feb 2009)
New Revision: 51303
URL: http://svn.boost.org/trac/boost/changeset/51303

Log:
bugfix
Text files modified:
   sandbox/msm/boost/msm/state_machine.hpp | 8 +++++---
   1 files changed, 5 insertions(+), 3 deletions(-)

Modified: sandbox/msm/boost/msm/state_machine.hpp
==============================================================================
--- sandbox/msm/boost/msm/state_machine.hpp (original)
+++ sandbox/msm/boost/msm/state_machine.hpp 2009-02-17 16:43:15 EST (Tue, 17 Feb 2009)
@@ -164,9 +164,11 @@
     // start the state machine (calls entry of the initial state)
     void start()
     {
- typedef typename get_initial_states<typename Derived::initial_state>::type init_states;
- ::boost::mpl::for_each<init_states, boost::msm::wrap<mpl::placeholders::_1> >
- (call_init<InitEvent>(&m_state_list[0],InitEvent()));
+ // call on_entry on this SM
+ (static_cast<Derived*>(this))->on_entry(InitEvent());
+ typedef typename get_initial_states<typename Derived::initial_state>::type init_states;
+ ::boost::mpl::for_each<init_states, boost::msm::wrap<mpl::placeholders::_1> >
+ (call_init<InitEvent>(&m_state_list[0],InitEvent()));
     }
 
     // Main function used by clients of the derived FSM to make


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk