Lines Matching refs:ranges
64 void CharacterClassConstructor::addSortedRange(Vector<CharacterRange>& ranges, UChar lo, UChar hi)
66 unsigned end = ranges.size();
68 // Simple linear scan - I doubt there are that many ranges anyway...
72 if (hi < ranges[i].begin) {
73 // optional optimization: concatenate appending ranges? - may not be worthwhile.
74 if (hi == (ranges[i].begin - 1)) {
75 ranges[i].begin = lo;
79 ranges.insert(i, r);
85 if (lo <= (ranges[i].end + 1)) {
87 ranges[i].begin = std::min(ranges[i].begin, lo);
88 ranges[i].end = std::max(ranges[i].end, hi);
90 // now check if the new range can subsume any subsequent ranges.
93 while (next < ranges.size()) {
94 if (ranges[next].begin <= (ranges[i].end + 1)) {
96 ranges[i].end = std::max(ranges[i].end, ranges[next].end);
97 ranges.remove(next);
106 // CharacterRange comes after all existing ranges.
108 ranges.append(r);
243 addSortedRange(m_ranges, other.ranges[i].begin, other.ranges[i].end);