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