Skip to content

Commit

Permalink
Some fixes in NgfStates.h
Browse files Browse the repository at this point in the history
  • Loading branch information
nikki93 committed Sep 4, 2010
1 parent 9bef885 commit 0881b80
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions include/ngfplugins/NgfStates.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,12 @@
(__mStateMap[ind])

//Internal switch method (takes state pointer name).
#define __NGF_STATES_SWITCH_STATE(ptr) \
#define __NGF_STATES_SWITCH_STATE(ptr1) \
do \
{ \
__State *ptr = ptr1; \
ptr->mPrevState = mCurrState; \
__mNextState = 0; \
\
if (mCurrState) \
{ \
Expand All @@ -161,7 +163,14 @@
mCurrState->mNextState = 0; \
} \
\
mCurrState = ptr; \
if (__mNextState) \
{ \
mCurrState = __mNextState; \
__mNextState = 0; \
} \
else \
mCurrState = ptr; \
\
mCurrState->enter(); \
mCurrState->mPrevState = 0; \
} while (0)
Expand Down

0 comments on commit 0881b80

Please sign in to comment.