kernel/util: Make MinMaxHeap::Peek*() const
This commit is contained in:
@@ -73,8 +73,8 @@ public:
|
|||||||
MinMaxHeap(int initialSize);
|
MinMaxHeap(int initialSize);
|
||||||
~MinMaxHeap();
|
~MinMaxHeap();
|
||||||
|
|
||||||
inline Element* PeekMinimum();
|
inline Element* PeekMinimum() const;
|
||||||
inline Element* PeekMaximum();
|
inline Element* PeekMaximum() const;
|
||||||
|
|
||||||
static const Key& GetKey(Element* element);
|
static const Key& GetKey(Element* element);
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ MIN_MAX_HEAP_CLASS_NAME::~MinMaxHeap()
|
|||||||
|
|
||||||
MIN_MAX_HEAP_TEMPLATE_LIST
|
MIN_MAX_HEAP_TEMPLATE_LIST
|
||||||
Element*
|
Element*
|
||||||
MIN_MAX_HEAP_CLASS_NAME::PeekMinimum()
|
MIN_MAX_HEAP_CLASS_NAME::PeekMinimum() const
|
||||||
{
|
{
|
||||||
if (fMinLastElement > 0)
|
if (fMinLastElement > 0)
|
||||||
return fMinElements[0];
|
return fMinElements[0];
|
||||||
@@ -205,7 +205,7 @@ MIN_MAX_HEAP_CLASS_NAME::PeekMinimum()
|
|||||||
|
|
||||||
MIN_MAX_HEAP_TEMPLATE_LIST
|
MIN_MAX_HEAP_TEMPLATE_LIST
|
||||||
Element*
|
Element*
|
||||||
MIN_MAX_HEAP_CLASS_NAME::PeekMaximum()
|
MIN_MAX_HEAP_CLASS_NAME::PeekMaximum() const
|
||||||
{
|
{
|
||||||
if (fMaxLastElement > 0)
|
if (fMaxLastElement > 0)
|
||||||
return fMaxElements[0];
|
return fMaxElements[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user