yapf/binaryheap.hpp
changeset 4434 4175805666a5
parent 3972 259fcd6cfd9c
child 4549 60410aa1aa88
equal deleted inserted replaced
4433:2ee8e92ef389 4434:4175805666a5
   140 		gap = child;
   140 		gap = child;
   141 		// where do we have our new children?
   141 		// where do we have our new children?
   142 		child = gap * 2;
   142 		child = gap * 2;
   143 	}
   143 	}
   144 	// move last item to the proper place
   144 	// move last item to the proper place
   145 	if (m_size > 0)	m_items[gap] = &new_item;
   145 	if (m_size > 0) m_items[gap] = &new_item;
   146 	CheckConsistency();
   146 	CheckConsistency();
   147 }
   147 }
   148 
   148 
   149 template <class Titem_>
   149 template <class Titem_>
   150 inline void CBinaryHeapT<Titem_>::RemoveByIdx(int idx)
   150 inline void CBinaryHeapT<Titem_>::RemoveByIdx(int idx)