Loads the Fleece Values of all items into _array. Called by insert() and remove() before they perturb the array indexing. */
| 156 | /** Loads the Fleece Values of all items into _array. |
| 157 | Called by insert() and remove() before they perturb the array indexing. */ |
| 158 | void populateVec() { |
| 159 | uint32_t i = 0; |
| 160 | for (auto &v : _vec) { |
| 161 | if (_usuallyTrue(v.isEmpty())) |
| 162 | v = _array[i++]; |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | Array _array; // Base Fleece Array (if any) |
| 167 | std::vector<MValue> _vec; // Current array; empty MValues are unmodified |