From 70f8dc7a4f4be217fea5439e474fc75e567c23c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=A6sbye=20Christensen?= Date: Sat, 10 Feb 2024 22:37:52 +0100 Subject: miscellaneous: BOOL (int) to real bool --- indra/llcharacter/llstatemachine.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/llcharacter/llstatemachine.cpp') diff --git a/indra/llcharacter/llstatemachine.cpp b/indra/llcharacter/llstatemachine.cpp index 2e8214ffaf..30f37ce0c2 100644 --- a/indra/llcharacter/llstatemachine.cpp +++ b/indra/llcharacter/llstatemachine.cpp @@ -61,7 +61,7 @@ LLStateDiagram::~LLStateDiagram() BOOL LLStateDiagram::addState(LLFSMState *state) { mStates[state] = Transitions(); - return TRUE; + return true; } // add a directed transition between 2 states @@ -93,7 +93,7 @@ BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_stat } (*state_transitions)[&transition] = &end_state; - return TRUE; + return true; } // add an undirected transition between 2 states @@ -183,7 +183,7 @@ BOOL LLStateDiagram::stateIsValid(LLFSMState& state) { if (mStates.find(&state) != mStates.end()) { - return TRUE; + return true; } return FALSE; } @@ -248,7 +248,7 @@ BOOL LLStateDiagram::saveDotFile(const std::string& filename) apr_file_printf(dot_file, "}\n"); - return TRUE; + return true; } std::ostream& operator<<(std::ostream &s, LLStateDiagram &FSM) @@ -319,7 +319,7 @@ BOOL LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, { initial_state->onEntry(user_data); } - return TRUE; + return true; } return FALSE; @@ -338,7 +338,7 @@ BOOL LLStateMachine::setCurrentState(U32 state_id, void* user_data, BOOL skip_en { state->onEntry(user_data); } - return TRUE; + return true; } return FALSE; -- cgit v1.2.3 From 4419bb870986c6900fc096338622d27b999cd771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=A6sbye=20Christensen?= Date: Sun, 11 Feb 2024 01:23:28 +0100 Subject: more misc: BOOL (int) to real bool --- indra/llcharacter/llstatemachine.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/llcharacter/llstatemachine.cpp') diff --git a/indra/llcharacter/llstatemachine.cpp b/indra/llcharacter/llstatemachine.cpp index 30f37ce0c2..8261670728 100644 --- a/indra/llcharacter/llstatemachine.cpp +++ b/indra/llcharacter/llstatemachine.cpp @@ -89,7 +89,7 @@ BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_stat if (transition_it != state_transitions->end()) { LL_ERRS() << "LLStateTable::addDirectedTransition() : transition already exists" << LL_ENDL; - return FALSE; // transition already exists + return false; // transition already exists } (*state_transitions)[&transition] = &end_state; @@ -185,7 +185,7 @@ BOOL LLStateDiagram::stateIsValid(LLFSMState& state) { return true; } - return FALSE; + return false; } LLFSMState* LLStateDiagram::getState(U32 state_id) @@ -209,7 +209,7 @@ BOOL LLStateDiagram::saveDotFile(const std::string& filename) if (!dot_file) { LL_WARNS() << "LLStateDiagram::saveDotFile() : Couldn't open " << filename << " to save state diagram." << LL_ENDL; - return FALSE; + return false; } apr_file_printf(dot_file, "digraph StateMachine {\n\tsize=\"100,100\";\n\tfontsize=40;\n\tlabel=\"Finite State Machine\";\n\torientation=landscape\n\tratio=.77\n"); @@ -322,7 +322,7 @@ BOOL LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, return true; } - return FALSE; + return false; } BOOL LLStateMachine::setCurrentState(U32 state_id, void* user_data, BOOL skip_entry) @@ -341,7 +341,7 @@ BOOL LLStateMachine::setCurrentState(U32 state_id, void* user_data, BOOL skip_en return true; } - return FALSE; + return false; } void LLStateMachine::processTransition(LLFSMTransition& transition, void* user_data) -- cgit v1.2.3 From 9e854b697a06abed2a0917fb6120445f176764f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=A6sbye=20Christensen?= Date: Fri, 16 Feb 2024 19:29:51 +0100 Subject: misc: BOOL to bool --- indra/llcharacter/llstatemachine.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/llcharacter/llstatemachine.cpp') diff --git a/indra/llcharacter/llstatemachine.cpp b/indra/llcharacter/llstatemachine.cpp index 8261670728..261eaf0350 100644 --- a/indra/llcharacter/llstatemachine.cpp +++ b/indra/llcharacter/llstatemachine.cpp @@ -49,7 +49,7 @@ bool operator!=(const LLUniqueID &a, const LLUniqueID &b) LLStateDiagram::LLStateDiagram() { mDefaultState = NULL; - mUseDefaultState = FALSE; + mUseDefaultState = false; } LLStateDiagram::~LLStateDiagram() @@ -58,14 +58,14 @@ LLStateDiagram::~LLStateDiagram() } // add a state to the state graph -BOOL LLStateDiagram::addState(LLFSMState *state) +bool LLStateDiagram::addState(LLFSMState *state) { mStates[state] = Transitions(); return true; } // add a directed transition between 2 states -BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition) +bool LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition) { StateMap::iterator state_it; state_it = mStates.find(&start_state); @@ -97,9 +97,9 @@ BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_stat } // add an undirected transition between 2 states -BOOL LLStateDiagram::addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition) +bool LLStateDiagram::addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition) { - BOOL result; + bool result; result = addTransition(start_state, end_state, transition); if (result) { @@ -162,7 +162,7 @@ LLFSMState* LLStateDiagram::processTransition(LLFSMState& start_state, LLFSMTran void LLStateDiagram::setDefaultState(LLFSMState& default_state) { - mUseDefaultState = TRUE; + mUseDefaultState = true; mDefaultState = &default_state; } @@ -179,7 +179,7 @@ S32 LLStateDiagram::numDeadendStates() return numDeadends; } -BOOL LLStateDiagram::stateIsValid(LLFSMState& state) +bool LLStateDiagram::stateIsValid(LLFSMState& state) { if (mStates.find(&state) != mStates.end()) { @@ -200,7 +200,7 @@ LLFSMState* LLStateDiagram::getState(U32 state_id) return NULL; } -BOOL LLStateDiagram::saveDotFile(const std::string& filename) +bool LLStateDiagram::saveDotFile(const std::string& filename) { LLAPRFile outfile ; outfile.open(filename, LL_APR_W); @@ -308,7 +308,7 @@ void LLStateMachine::runCurrentState(void *data) } // set current state -BOOL LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, BOOL skip_entry) +bool LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, bool skip_entry) { llassert(mStateDiagram); @@ -325,7 +325,7 @@ BOOL LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, return false; } -BOOL LLStateMachine::setCurrentState(U32 state_id, void* user_data, BOOL skip_entry) +bool LLStateMachine::setCurrentState(U32 state_id, void* user_data, bool skip_entry) { llassert(mStateDiagram); -- cgit v1.2.3