MCPcopy Create free account
hub / github.com/dengwirda/jigsaw / push_upper

Method push_upper

src/libcpp/containers/priorityset.hpp:109–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 */
108
109 __normal_call _write_it push_upper (
110 _write_it _head,
111 _write_it _ipos,
112 data_type const&_data
113 )
114 {
115 for ( ; _ipos != _head ; )
116 {
117 /*----------------------- find position of parent */
118 _write_it _ppos =
119 _head+(_ipos-_head-1) / _nfan ;
120
121 /*----------------------- swap parent with "hole" */
122 if (this->_pred(_data, *_ppos))
123 {
124 *_ipos = std::move( *_ppos);
125 _ipos = _ppos ;
126 }
127 else break;
128 }
129
130 /*---------------------------- return sorted position */
131 return (_ipos);
132 }
133
134 /*
135 --------------------------------------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected