summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/cprintf_formats.hh14
-rw-r--r--base/range.hh2
-rw-r--r--base/refcnt.hh4
-rw-r--r--base/res_list.hh2
-rw-r--r--base/statistics.hh22
-rw-r--r--base/str.hh2
-rw-r--r--cpu/exec_context.hh4
-rw-r--r--cpu/simple_cpu/simple_cpu.cc2
-rw-r--r--cpu/simple_cpu/simple_cpu.hh2
-rw-r--r--sim/serialize.cc4
-rw-r--r--sim/serialize.hh4
-rw-r--r--sim/syscall_emul.hh4
12 files changed, 33 insertions, 33 deletions
diff --git a/base/cprintf_formats.hh b/base/cprintf_formats.hh
index b921c0506..c3e01c935 100644
--- a/base/cprintf_formats.hh
+++ b/base/cprintf_formats.hh
@@ -62,7 +62,7 @@ struct Format
template <typename T>
inline void
-_format_char(std::ostream &out, const T& data, Format &fmt)
+_format_char(std::ostream &out, const T &data, Format &fmt)
{
using namespace std;
@@ -71,7 +71,7 @@ _format_char(std::ostream &out, const T& data, Format &fmt)
template <typename T>
inline void
-_format_integer(std::ostream &out, const T& data, Format &fmt)
+_format_integer(std::ostream &out, const T &data, Format &fmt)
{
using namespace std;
@@ -128,7 +128,7 @@ _format_integer(std::ostream &out, const T& data, Format &fmt)
template <typename T>
inline void
-_format_float(std::ostream &out, const T& data, Format &fmt)
+_format_float(std::ostream &out, const T &data, Format &fmt)
{
using namespace std;
@@ -180,7 +180,7 @@ _format_float(std::ostream &out, const T& data, Format &fmt)
template <typename T>
inline void
-_format_string(std::ostream &out, const T& data, Format &fmt)
+_format_string(std::ostream &out, const T &data, Format &fmt)
{
using namespace std;
@@ -225,7 +225,7 @@ _format_string(std::ostream &out, const T& data, Format &fmt)
//
template <typename T>
inline void
-format_char(std::ostream &out, const T& data, Format &fmt)
+format_char(std::ostream &out, const T &data, Format &fmt)
{ out << "<bad arg type for char format>"; }
inline void
@@ -321,7 +321,7 @@ format_integer(std::ostream &out, unsigned long long data, Format &fmt)
//
template <typename T>
inline void
-format_float(std::ostream &out, const T& data, Format &fmt)
+format_float(std::ostream &out, const T &data, Format &fmt)
{ out << "<bad arg type for float format>"; }
inline void
@@ -337,7 +337,7 @@ format_float(std::ostream &out, double data, Format &fmt)
//
template <typename T>
inline void
-format_string(std::ostream &out, const T& data, Format &fmt)
+format_string(std::ostream &out, const T &data, Format &fmt)
{ _format_string(out, data, fmt); }
inline void
diff --git a/base/range.hh b/base/range.hh
index 0d3383b01..3443bf246 100644
--- a/base/range.hh
+++ b/base/range.hh
@@ -49,7 +49,7 @@ class Range
Range(const Range &r) { operator=(r); }
- Range(const T& s, const T& e)
+ Range(const T &s, const T &e)
: start(s), end(e)
{
valid = (start <= end);
diff --git a/base/refcnt.hh b/base/refcnt.hh
index 5bc62ae23..f3e0e4114 100644
--- a/base/refcnt.hh
+++ b/base/refcnt.hh
@@ -64,7 +64,7 @@ class RefCountingPtr
public:
RefCountingPtr() : data(NULL) {}
RefCountingPtr(T *data) { copy(data); }
- RefCountingPtr(const RefCountingPtr& r) { copy(r.data); }
+ RefCountingPtr(const RefCountingPtr &r) { copy(r.data); }
~RefCountingPtr() { del(); }
T *operator->() { return data; }
@@ -83,7 +83,7 @@ class RefCountingPtr
return *this;
}
- RefCountingPtr &operator=(const RefCountingPtr& r) {
+ RefCountingPtr &operator=(const RefCountingPtr &r) {
if (data != r.data) {
del();
copy(r.data);
diff --git a/base/res_list.hh b/base/res_list.hh
index c856c1226..04c3b7cfa 100644
--- a/base/res_list.hh
+++ b/base/res_list.hh
@@ -103,7 +103,7 @@ class res_list : public res_list_base
iterator prev(void) { return iterator(p->prev); }
bool operator== (iterator x) { return (x.p == this->p); }
bool operator != (iterator x) { return (x.p != this->p); }
- T& operator * (void) { return *(p->data); }
+ T &operator * (void) { return *(p->data); }
T* operator -> (void) { return p->data; }
bool isnull(void) { return (p==0); }
bool notnull(void) { return (p!=0); }
diff --git a/base/statistics.hh b/base/statistics.hh
index cbc976053..d8b78fbff 100644
--- a/base/statistics.hh
+++ b/base/statistics.hh
@@ -838,7 +838,7 @@ class ScalarBase : public DataAccess
* @param v The new value.
*/
template <typename U>
- void operator=(const U& v) { data()->set(v, params); }
+ void operator=(const U &v) { data()->set(v, params); }
/**
* Increment the stat by the given value. This calls the associated
@@ -846,7 +846,7 @@ class ScalarBase : public DataAccess
* @param v The value to add.
*/
template <typename U>
- void operator+=(const U& v) { data()->inc(v, params); }
+ void operator+=(const U &v) { data()->inc(v, params); }
/**
* Decrement the stat by the given value. This calls the associated
@@ -854,7 +854,7 @@ class ScalarBase : public DataAccess
* @param v The value to substract.
*/
template <typename U>
- void operator-=(const U& v) { data()->dec(v, params); }
+ void operator-=(const U &v) { data()->dec(v, params); }
/**
* Return the number of elements, always 1 for a scalar.
@@ -1105,7 +1105,7 @@ class ScalarProxy
* @param v The new value.
*/
template <typename U>
- void operator=(const U& v) { data()->set(v, *params); }
+ void operator=(const U &v) { data()->set(v, *params); }
/**
* Increment the stat by the given value. This calls the associated
@@ -1113,7 +1113,7 @@ class ScalarProxy
* @param v The value to add.
*/
template <typename U>
- void operator+=(const U& v) { data()->inc(v, *params); }
+ void operator+=(const U &v) { data()->inc(v, *params); }
/**
* Decrement the stat by the given value. This calls the associated
@@ -1121,7 +1121,7 @@ class ScalarProxy
* @param v The value to substract.
*/
template <typename U>
- void operator-=(const U& v) { data()->dec(v, *params); }
+ void operator-=(const U &v) { data()->dec(v, *params); }
/**
* Return the number of elements, always 1 for a scalar.
@@ -1574,7 +1574,7 @@ struct AvgFancy
* @param number The number of times to add the value.
* @param p The paramters of the distribution.
*/
- void sample(T val, int number, const Params& p)
+ void sample(T val, int number, const Params &p)
{
T value = val * number;
sum += value;
@@ -1663,7 +1663,7 @@ class DistBase : public DataAccess
* @param n The number of times to add it, defaults to 1.
*/
template <typename U>
- void sample(const U& v, int n = 1) { data()->sample(v, n, params); }
+ void sample(const U &v, int n = 1) { data()->sample(v, n, params); }
/**
* Return the number of entries in this stat.
@@ -1787,7 +1787,7 @@ class DistProxy
public:
template <typename U>
- void sample(const U& v, int n = 1) { data()->sample(v, n, cstat->params); }
+ void sample(const U &v, int n = 1) { data()->sample(v, n, cstat->params); }
size_t size() const { return 1; }
bool zero() const { return data()->zero(cstat->params); }
@@ -2534,7 +2534,7 @@ class Scalar
* @param v The new value.
*/
template <typename U>
- void operator=(const U& v) { Base::operator=(v); }
+ void operator=(const U &v) { Base::operator=(v); }
};
/**
@@ -2562,7 +2562,7 @@ class Average
* @param v The new value.
*/
template <typename U>
- void operator=(const U& v) { Base::operator=(v); }
+ void operator=(const U &v) { Base::operator=(v); }
};
/**
diff --git a/base/str.hh b/base/str.hh
index 6c3453b8b..8fee21a10 100644
--- a/base/str.hh
+++ b/base/str.hh
@@ -99,7 +99,7 @@ to_number(const std::string &value, T &retval);
template <class T>
inline std::string
-to_string(const T& value)
+to_string(const T &value)
{
std::stringstream str;
str << value;
diff --git a/cpu/exec_context.hh b/cpu/exec_context.hh
index b49db9720..768f2e7d4 100644
--- a/cpu/exec_context.hh
+++ b/cpu/exec_context.hh
@@ -241,7 +241,7 @@ class ExecContext
#endif
template <class T>
- Fault read(MemReqPtr &req, T& data)
+ Fault read(MemReqPtr &req, T &data)
{
#if defined(TARGET_ALPHA) && defined(FULL_SYSTEM)
if (req->flags & LOCKED) {
@@ -254,7 +254,7 @@ class ExecContext
}
template <class T>
- Fault write(MemReqPtr &req, T& data)
+ Fault write(MemReqPtr &req, T &data)
{
#if defined(TARGET_ALPHA) && defined(FULL_SYSTEM)
diff --git a/cpu/simple_cpu/simple_cpu.cc b/cpu/simple_cpu/simple_cpu.cc
index 0d5fc4077..e9284ad31 100644
--- a/cpu/simple_cpu/simple_cpu.cc
+++ b/cpu/simple_cpu/simple_cpu.cc
@@ -321,7 +321,7 @@ change_thread_state(int thread_number, int activate, int priority)
// precise architected memory state accessor macros
template <class T>
Fault
-SimpleCPU::read(Addr addr, T& data, unsigned flags)
+SimpleCPU::read(Addr addr, T &data, unsigned flags)
{
memReq->reset(addr, sizeof(T), flags);
diff --git a/cpu/simple_cpu/simple_cpu.hh b/cpu/simple_cpu/simple_cpu.hh
index 7c9d4ea75..16753fa4f 100644
--- a/cpu/simple_cpu/simple_cpu.hh
+++ b/cpu/simple_cpu/simple_cpu.hh
@@ -227,7 +227,7 @@ class SimpleCPU : public BaseCPU
virtual void unserialize(Checkpoint *cp, const std::string &section);
template <class T>
- Fault read(Addr addr, T& data, unsigned flags);
+ Fault read(Addr addr, T &data, unsigned flags);
template <class T>
Fault write(T data, Addr addr, unsigned flags,
diff --git a/sim/serialize.cc b/sim/serialize.cc
index 281e7cfc8..180cc38a0 100644
--- a/sim/serialize.cc
+++ b/sim/serialize.cc
@@ -62,7 +62,7 @@ Serializable::nameOut(ostream &os, const string &_name)
template <class T>
void
-paramOut(ostream &os, const std::string &name, const T& param)
+paramOut(ostream &os, const std::string &name, const T &param)
{
os << name << "=";
showParam(os, param);
@@ -73,7 +73,7 @@ paramOut(ostream &os, const std::string &name, const T& param)
template <class T>
void
paramIn(Checkpoint *cp, const std::string &section,
- const std::string &name, T& param)
+ const std::string &name, T &param)
{
std::string str;
if (!cp->find(section, name, str) || !parseParam(str, param)) {
diff --git a/sim/serialize.hh b/sim/serialize.hh
index 32802409d..9ab2fa833 100644
--- a/sim/serialize.hh
+++ b/sim/serialize.hh
@@ -45,11 +45,11 @@ class Serializable;
class Checkpoint;
template <class T>
-void paramOut(std::ostream &os, const std::string &name, const T& param);
+void paramOut(std::ostream &os, const std::string &name, const T &param);
template <class T>
void paramIn(Checkpoint *cp, const std::string &section,
- const std::string &name, T& param);
+ const std::string &name, T &param);
template <class T>
void arrayParamOut(std::ostream &os, const std::string &name,
diff --git a/sim/syscall_emul.hh b/sim/syscall_emul.hh
index 1031b0823..df4038f71 100644
--- a/sim/syscall_emul.hh
+++ b/sim/syscall_emul.hh
@@ -141,9 +141,9 @@ class TypedBufferArg : public BaseBufferArg
operator T*() { return (T *)bufPtr; }
// dereference operators
- T& operator*() { return *((T *)bufPtr); }
+ T &operator*() { return *((T *)bufPtr); }
T* operator->() { return (T *)bufPtr; }
- T& operator[](int i) { return ((T *)bufPtr)[i]; }
+ T &operator[](int i) { return ((T *)bufPtr)[i]; }
};
//////////////////////////////////////////////////////////////////////