MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetVariableByName

Method GetVariableByName

trinity/Controllers/Tr2Controller.cpp:302–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302Tr2ControllerFloatVariable* Tr2Controller::GetVariableByName( const char* name ) const
303{
304 for( auto it = begin( m_variables ); it != end( m_variables ); ++it )
305 {
306 if( ( *it )->GetName() == name )
307 {
308 return *it;
309 }
310 }
311 return nullptr;
312}
313
314std::optional<float> Tr2Controller::GetFloatVariableByName( const char* name ) const
315{

Callers

nothing calls this directly

Calls 3

beginFunction · 0.50
endFunction · 0.50
GetNameMethod · 0.45

Tested by

no test coverage detected