| 271 | } |
| 272 | |
| 273 | bool TextRanges::exists( const TextRange& range ) const { |
| 274 | if ( !mIsSorted ) |
| 275 | return std::find( begin(), end(), range ) != end(); |
| 276 | return std::binary_search( begin(), end(), range ); |
| 277 | } |
| 278 | |
| 279 | size_t TextRanges::findIndex( const TextRange& range ) const { |
| 280 | if ( !mIsSorted ) { |
no test coverage detected