| 215 | //----------------------------------------------------------------------------- |
| 216 | |
| 217 | S32 ArrayObject::getIndexFromKeyValue( const String &key, const String &value ) const |
| 218 | { |
| 219 | S32 currentIndex = mMax(mCurrentIndex, 0); |
| 220 | S32 foundIndex = -1; |
| 221 | for ( S32 i = currentIndex; i < mArray.size(); i++ ) |
| 222 | { |
| 223 | if ( isEqual( mArray[i].key, key ) && isEqual( mArray[i].value, value ) ) |
| 224 | { |
| 225 | foundIndex = i; |
| 226 | break; |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | if ( foundIndex < 0 ) |
| 231 | { |
| 232 | for ( S32 i = 0; i < currentIndex; i++ ) |
| 233 | { |
| 234 | if ( isEqual( mArray[i].key, key ) && isEqual( mArray[i].value, value ) ) |
| 235 | { |
| 236 | foundIndex = i; |
| 237 | break; |
| 238 | } |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | return foundIndex; |
| 243 | } |
| 244 | |
| 245 | //----------------------------------------------------------------------------- |
| 246 | |