From 140785d24c27f3afddbe95c9e504e27bf8274290 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Wed, 10 Mar 2010 18:33:11 -0800 Subject: ruby: get rid of std-includes.hh Do not use "using namespace std;" in headers Include header files as needed --- src/mem/gems_common/PrioHeap.hh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/mem/gems_common/PrioHeap.hh') diff --git a/src/mem/gems_common/PrioHeap.hh b/src/mem/gems_common/PrioHeap.hh index acdcc0eba..d6183cf40 100644 --- a/src/mem/gems_common/PrioHeap.hh +++ b/src/mem/gems_common/PrioHeap.hh @@ -29,6 +29,8 @@ #ifndef PRIOHEAP_H #define PRIOHEAP_H +#include + #include "mem/gems_common/Vector.hh" typedef unsigned int HeapIndex; @@ -49,7 +51,7 @@ public: const TYPE& peekMin() const; const TYPE& peekElement(int index) const; TYPE extractMin(); - void print(ostream& out) const; + void print(std::ostream& out) const; private: // Private Methods bool verifyHeap() const; @@ -67,7 +69,7 @@ private: // Output operator declaration template -ostream& operator<<(ostream& out, const PrioHeap& obj); +std::ostream& operator<<(std::ostream& out, const PrioHeap& obj); // ******************* Helper Functions ******************* inline @@ -210,7 +212,7 @@ void PrioHeap::heapify() } template -void PrioHeap::print(ostream& out) const +void PrioHeap::print(std::ostream& out) const { Vector copyHeap(m_heap); @@ -239,10 +241,10 @@ void PrioHeap::print(ostream& out) const // Output operator definition template -ostream& operator<<(ostream& out, const PrioHeap& obj) +std::ostream& operator<<(std::ostream& out, const PrioHeap& obj) { obj.print(out); - out << flush; + out << std::flush; return out; } -- cgit v1.2.3