| 177 | } // namespace |
| 178 | |
| 179 | Iterator* NewMergingIterator(const Comparator* comparator, Iterator** children, |
| 180 | int n) { |
| 181 | assert(n >= 0); |
| 182 | if (n == 0) { |
| 183 | return NewEmptyIterator(); |
| 184 | } else if (n == 1) { |
| 185 | return children[0]; |
| 186 | } else { |
| 187 | return new MergingIterator(comparator, children, n); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | } // namespace leveldb |
no test coverage detected