------------- helper - push "hole" into sorted position */
| 138 | |
| 139 | /*------------- helper - push "hole" into sorted position */ |
| 140 | __normal_call _write_it push_upper ( |
| 141 | _write_it _head, |
| 142 | _write_it _ipos, |
| 143 | data_type const&_data |
| 144 | ) |
| 145 | { |
| 146 | for (; _ipos != _head ; ) |
| 147 | { |
| 148 | /*----------------------- find position of parent */ |
| 149 | _write_it _ppos = |
| 150 | _head + (_ipos-_head-1) / _nfan; |
| 151 | /*----------------------- swap parent with "hole" */ |
| 152 | if (this->_pred(_data,_ppos->_data)) |
| 153 | { |
| 154 | /*------------------ update heap-keys mapping */ |
| 155 | _ipos->_data = |
| 156 | std::move(_ppos->_data); |
| 157 | _ipos->_kptr = |
| 158 | std::move(_ppos->_kptr); |
| 159 | /*------------------ update keys-heap mapping */ |
| 160 | this->_keys[_ipos->_kptr] = |
| 161 | _ipos- _head; |
| 162 | /*------------------ traverse to upper levels */ |
| 163 | _ipos =_ppos ; |
| 164 | } |
| 165 | else break ; |
| 166 | } |
| 167 | |
| 168 | return (_ipos) ; |
| 169 | } |
| 170 | |
| 171 | /*------------- helper - push "hole" into sorted position */ |
| 172 | __normal_call _write_it push_lower ( |
nothing calls this directly
no outgoing calls
no test coverage detected