AIThreadSafe* update.

Updated/added documentation.
Removed AIThreadSafeWindowsHack that annoyed me (fix your compiler).
Don't use 'static' in anonymous namespace.
Use the AIThreadSafe*DC variants for default constructed objects,
as opposed to the AITHREADSAFE* macro's.
This commit is contained in:
Aleric Inglewood
2012-03-16 00:10:07 +01:00
parent d63c54cb78
commit 4391614d6e
9 changed files with 104 additions and 39 deletions

View File

@@ -65,18 +65,18 @@ namespace {
};
typedef std::vector<QueueElement> active_statemachines_type;
static active_statemachines_type active_statemachines;
active_statemachines_type active_statemachines;
typedef std::vector<AIStateMachine*> continued_statemachines_type;
struct cscm_type
{
continued_statemachines_type continued_statemachines;
bool calling_mainloop;
};
static AITHREADSAFE(cscm_type, continued_statemachines_and_calling_mainloop, );
AIThreadSafeDC<cscm_type> continued_statemachines_and_calling_mainloop;
}
// static
AITHREADSAFESIMPLE(U64, AIStateMachine::sMaxCount, );
AIThreadSafeSimpleDC<U64> AIStateMachine::sMaxCount;
void AIStateMachine::updateSettings(void)
{