summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2004-02-09 00:30:16 -0800
committerSteve Reinhardt <stever@eecs.umich.edu>2004-02-09 00:30:16 -0800
commit730296f7f9a0b6ffdfdf0b349fb1f255c987c0ac (patch)
treed1d6a8bd38e86bf2eb328f57a0163d36efa90a6e /sim
parent88c5bd695f1716dc9bab58e678c92ffddc306b13 (diff)
parentd7b7363444614a4e07676151604ce9600bad1169 (diff)
downloadgem5-730296f7f9a0b6ffdfdf0b349fb1f255c987c0ac.tar.xz
Results of automatic (yet incomplete) merge.
--HG-- extra : convert_revision : 3ad9a929051bfe111a1e10618c8595acbbade542
Diffstat (limited to 'sim')
-rw-r--r--sim/eventq.hh4
-rw-r--r--sim/serialize.cc4
-rw-r--r--sim/serialize.hh2
-rw-r--r--sim/sim_object.hh2
4 files changed, 6 insertions, 6 deletions
diff --git a/sim/eventq.hh b/sim/eventq.hh
index 36cb402a8..31bf9d652 100644
--- a/sim/eventq.hh
+++ b/sim/eventq.hh
@@ -153,7 +153,7 @@ class Event : public Serializable, public FastAlloc
~Event() {}
- virtual std::string name() const {
+ virtual const std::string name() const {
return csprintf("Event_%x", (uintptr_t)this);
}
@@ -257,7 +257,7 @@ class EventQueue : public Serializable
: objName(n), head(NULL)
{}
- virtual std::string name() const { return objName; }
+ virtual const std::string name() const { return objName; }
// schedule the given event on this queue
void schedule(Event *ev);
diff --git a/sim/serialize.cc b/sim/serialize.cc
index ba5a99afd..f8d6b46bf 100644
--- a/sim/serialize.cc
+++ b/sim/serialize.cc
@@ -186,7 +186,7 @@ INSTANTIATE_PARAM_TEMPLATES(string)
class Globals : public Serializable
{
public:
- string name() const;
+ const string name() const;
void serialize(ostream &os);
void unserialize(Checkpoint *cp);
};
@@ -194,7 +194,7 @@ class Globals : public Serializable
/// The one and only instance of the Globals class.
Globals globals;
-string
+const string
Globals::name() const
{
return "Globals";
diff --git a/sim/serialize.hh b/sim/serialize.hh
index e561604bf..36622b7fe 100644
--- a/sim/serialize.hh
+++ b/sim/serialize.hh
@@ -111,7 +111,7 @@ class Serializable
virtual ~Serializable() {}
// manditory virtual function, so objects must provide names
- virtual std::string name() const = 0;
+ virtual const std::string name() const = 0;
virtual void serialize(std::ostream &os) {}
virtual void unserialize(Checkpoint *cp, const std::string &section) {}
diff --git a/sim/sim_object.hh b/sim/sim_object.hh
index 165931b2b..aaaafc04b 100644
--- a/sim/sim_object.hh
+++ b/sim/sim_object.hh
@@ -63,7 +63,7 @@ class SimObject : public Serializable
virtual ~SimObject() {}
- virtual std::string name() const { return objName; }
+ virtual const std::string name() const { return objName; }
// initialization pass of all objects. Gets invoked by SimInit()
virtual void init();