MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / getIndexFromValue

Method getIndexFromValue

Engine/source/console/arrayObject.cpp:154–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152//-----------------------------------------------------------------------------
153
154S32 ArrayObject::getIndexFromValue( const String &value ) const
155{
156 S32 foundIndex = -1;
157 for ( S32 i = mCurrentIndex; i < mArray.size(); i++ )
158 {
159 if ( isEqual( mArray[i].value, value ) )
160 {
161 foundIndex = i;
162 break;
163 }
164 }
165
166 if( foundIndex < 0 )
167 {
168 for ( S32 i = 0; i < mCurrentIndex; i++ )
169 {
170 if ( isEqual( mArray[i].value, value ) )
171 {
172 foundIndex = i;
173 break;
174 }
175 }
176 }
177
178 return foundIndex;
179}
180
181//-----------------------------------------------------------------------------
182

Callers 5

ActionCreateNewMaterialFunction · 0.80
ActionDeleteMaterialFunction · 0.80
ActionCreateNewMaterialFunction · 0.80
ActionDeleteMaterialFunction · 0.80
arrayObject.cppFile · 0.80

Calls 2

isEqualFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected