From 5d329d9e5546099e3252fe32b11bfdcc0c32262b Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sat, 23 Feb 2013 21:13:14 +0100 Subject: [PATCH] Fix initialization list order. Also fixes a Dout line and initializes mState to 0 so that if ever set_state would be called first from a non-main thread then it will be larger (probably not needed currently). --- indra/aistatemachine/aistatemachine.cpp | 3 ++- indra/aistatemachine/aistatemachine.h | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/indra/aistatemachine/aistatemachine.cpp b/indra/aistatemachine/aistatemachine.cpp index 5352435d2..f64f77d5d 100644 --- a/indra/aistatemachine/aistatemachine.cpp +++ b/indra/aistatemachine/aistatemachine.cpp @@ -82,7 +82,8 @@ void AIStateMachine::setMaxCount(F32 StateMachineMaxTime) void AIStateMachine::run(AIStateMachine* parent, state_type new_parent_state, bool abort_parent, bool on_abort_signal_parent) { - DoutEntering(dc::statemachine, "AIStateMachine::run(" << (void*)parent << ", " << (parent ? parent->state_str(new_parent_state) : "NA") << ", " << abort_parent << ") [" << (void*)this << "]"); + DoutEntering(dc::statemachine, "AIStateMachine::run(" << (void*)parent << ", " << (parent ? parent->state_str(new_parent_state) : "NA") << + ", " << abort_parent << ", " << on_abort_signal_parent << ") [" << (void*)this << "]"); // Must be the first time we're being run, or we must be called from a callback function. llassert(!mParent || mState == bs_callback); llassert(!mCallback || mState == bs_callback); diff --git a/indra/aistatemachine/aistatemachine.h b/indra/aistatemachine/aistatemachine.h index 9048260ba..ab2cd6324 100644 --- a/indra/aistatemachine/aistatemachine.h +++ b/indra/aistatemachine/aistatemachine.h @@ -250,10 +250,11 @@ class AIStateMachine { public: //! Create a non-running state machine. - AIStateMachine(void) : mState(bs_initialize), mIdle(true), mAborted(true), mActive(as_idle), mSleep(0), mParent(NULL), mCallback(NULL) + AIStateMachine(void) : mState(bs_initialize), mIdle(true), mAborted(true), mActive(as_idle), mSleep(0), #ifdef SHOW_ASSERT - , mContThread(AIThreadID::none), mCalledThreadUnsafeIdle(false) + mContThread(AIThreadID::none), mCalledThreadUnsafeIdle(false), #endif + mParent(NULL), mCallback(NULL), mRunState(0) { } protected: