| 185 | //----------------------------------------------------------------------------- |
| 186 | |
| 187 | S32 ArrayObject::getIndexFromKey( const String &key ) const |
| 188 | { |
| 189 | S32 currentIndex = mMax(mCurrentIndex, 0); |
| 190 | S32 foundIndex = -1; |
| 191 | for ( S32 i = currentIndex; i < mArray.size(); i++ ) |
| 192 | { |
| 193 | if ( isEqual( mArray[i].key, key ) ) |
| 194 | { |
| 195 | foundIndex = i; |
| 196 | break; |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | if( foundIndex < 0 ) |
| 201 | { |
| 202 | for ( S32 i = 0; i < currentIndex; i++ ) |
| 203 | { |
| 204 | if ( isEqual( mArray[i].key, key ) ) |
| 205 | { |
| 206 | foundIndex = i; |
| 207 | break; |
| 208 | } |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | return foundIndex; |
| 213 | } |
| 214 | |
| 215 | //----------------------------------------------------------------------------- |
| 216 |
no test coverage detected