summaryrefslogtreecommitdiff
path: root/src/mem/gems_common/PrioHeap.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2010-03-10 18:33:11 -0800
committerNathan Binkert <nate@binkert.org>2010-03-10 18:33:11 -0800
commit140785d24c27f3afddbe95c9e504e27bf8274290 (patch)
treecc4d27a7d4e417a6cd0f0364cff3db67ca1825b7 /src/mem/gems_common/PrioHeap.hh
parent1badec39a94397397a3c918bfcc75c71efc507ea (diff)
downloadgem5-140785d24c27f3afddbe95c9e504e27bf8274290.tar.xz
ruby: get rid of std-includes.hh
Do not use "using namespace std;" in headers Include header files as needed
Diffstat (limited to 'src/mem/gems_common/PrioHeap.hh')
-rw-r--r--src/mem/gems_common/PrioHeap.hh12
1 files changed, 7 insertions, 5 deletions
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 <iostream>
+
#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 <class TYPE>
-ostream& operator<<(ostream& out, const PrioHeap<TYPE>& obj);
+std::ostream& operator<<(std::ostream& out, const PrioHeap<TYPE>& obj);
// ******************* Helper Functions *******************
inline
@@ -210,7 +212,7 @@ void PrioHeap<TYPE>::heapify()
}
template <class TYPE>
-void PrioHeap<TYPE>::print(ostream& out) const
+void PrioHeap<TYPE>::print(std::ostream& out) const
{
Vector<TYPE> copyHeap(m_heap);
@@ -239,10 +241,10 @@ void PrioHeap<TYPE>::print(ostream& out) const
// Output operator definition
template <class TYPE>
-ostream& operator<<(ostream& out, const PrioHeap<TYPE>& obj)
+std::ostream& operator<<(std::ostream& out, const PrioHeap<TYPE>& obj)
{
obj.print(out);
- out << flush;
+ out << std::flush;
return out;
}