diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/cprintf_formats.hh | 14 | ||||
-rw-r--r-- | base/range.hh | 2 | ||||
-rw-r--r-- | base/refcnt.hh | 4 | ||||
-rw-r--r-- | base/res_list.hh | 2 | ||||
-rw-r--r-- | base/statistics.hh | 22 | ||||
-rw-r--r-- | base/str.hh | 2 |
6 files changed, 23 insertions, 23 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; |