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