summaryrefslogtreecommitdiff
path: root/src/mem/ruby/common/Histogram.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/ruby/common/Histogram.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/ruby/common/Histogram.hh')
-rw-r--r--src/mem/ruby/common/Histogram.hh14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mem/ruby/common/Histogram.hh b/src/mem/ruby/common/Histogram.hh
index 59afde867..64247d64a 100644
--- a/src/mem/ruby/common/Histogram.hh
+++ b/src/mem/ruby/common/Histogram.hh
@@ -37,6 +37,8 @@
#ifndef HISTOGRAM_H
#define HISTOGRAM_H
+#include <iostream>
+
#include "mem/ruby/common/Global.hh"
#include "mem/gems_common/Vector.hh"
@@ -61,9 +63,9 @@ public:
int64 getTotal() const { return m_sumSamples; }
int64 getData(int index) const { return m_data[index]; }
- void printWithMultiplier(ostream& out, double multiplier) const;
- void printPercent(ostream& out) const;
- void print(ostream& out) const;
+ void printWithMultiplier(std::ostream& out, double multiplier) const;
+ void printPercent(std::ostream& out) const;
+ void print(std::ostream& out) const;
private:
// Private Methods
@@ -88,16 +90,16 @@ private:
bool node_less_then_eq(const Histogram* n1, const Histogram* n2);
// Output operator declaration
-ostream& operator<<(ostream& out, const Histogram& obj);
+std::ostream& operator<<(std::ostream& out, const Histogram& obj);
// ******************* Definitions *******************
// Output operator definition
extern inline
-ostream& operator<<(ostream& out, const Histogram& obj)
+std::ostream& operator<<(std::ostream& out, const Histogram& obj)
{
obj.print(out);
- out << flush;
+ out << std::flush;
return out;
}