From 548b4a1cb045c6675692e8ed7c6375ebb808c803 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Mon, 2 Feb 2004 15:55:35 -0800 Subject: Change "Foo& foo" declarations to "Foo &foo". This primarily to be internally consistent (sometimes we used one, sometimes the other, even within the same line of code!). I picked the latter to be symmetric with "Foo *foo". base/cprintf_formats.hh: base/range.hh: base/refcnt.hh: base/res_list.hh: base/statistics.hh: base/str.hh: cpu/exec_context.hh: cpu/simple_cpu/simple_cpu.cc: cpu/simple_cpu/simple_cpu.hh: sim/serialize.cc: sim/serialize.hh: sim/syscall_emul.hh: Change "Foo& foo" declarations to "Foo &foo". --HG-- extra : convert_revision : ca1b0e85a578b539214bda3b8d61ac23792f2e87 --- sim/serialize.cc | 4 ++-- sim/serialize.hh | 4 ++-- sim/syscall_emul.hh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sim') 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 void -paramOut(ostream &os, const std::string &name, const T& param) +paramOut(ostream &os, const std::string &name, const T ¶m) { os << name << "="; showParam(os, param); @@ -73,7 +73,7 @@ paramOut(ostream &os, const std::string &name, const T& param) template void paramIn(Checkpoint *cp, const std::string §ion, - const std::string &name, T& param) + const std::string &name, T ¶m) { 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 -void paramOut(std::ostream &os, const std::string &name, const T& param); +void paramOut(std::ostream &os, const std::string &name, const T ¶m); template void paramIn(Checkpoint *cp, const std::string §ion, - const std::string &name, T& param); + const std::string &name, T ¶m); template 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]; } }; ////////////////////////////////////////////////////////////////////// -- cgit v1.2.3