| 38 | |
| 39 | |
| 40 | void HeapArray::populate(unsigned fromIndex) { |
| 41 | if (!_source) |
| 42 | return; |
| 43 | auto dst = _items.begin() + fromIndex; |
| 44 | Array::iterator src(_source); |
| 45 | for (src += fromIndex; src && dst != _items.end(); ++src, ++dst) { |
| 46 | if (!*dst) |
| 47 | dst->set(src.value()); |
| 48 | } |
| 49 | |
| 50 | } |
| 51 | |
| 52 | |
| 53 | const Value* HeapArray::get(uint32_t index) { |