summaryrefslogtreecommitdiff
path: root/src/sim/port.hh
diff options
context:
space:
mode:
authorYu-hsin Wang <yuhsingw@google.com>2020-01-03 13:32:33 +0800
committerYu-hsin Wang <yuhsingw@google.com>2020-01-03 12:35:38 +0000
commit9f405040cda3ac2466c871d82b68f8d1d77fbf76 (patch)
tree1dfcd5aba3c353e9446f96ef0e007e09b7d71bab /src/sim/port.hh
parent68288f344bebff2e4fbfe63dcc84e166a423dd6c (diff)
downloadgem5-9f405040cda3ac2466c871d82b68f8d1d77fbf76.tar.xz
sim: Move destructor of Port to public
To preventing from instantiating an abstract class, hiding its constructor is enough. Moving destructor to public doesn't break this intention. This also makes us can use smart pointer to manage derived Port class. Change-Id: Ic9cf97e90a6c26108d359eb459df48cd23eaf15c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23925 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/sim/port.hh')
-rw-r--r--src/sim/port.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sim/port.hh b/src/sim/port.hh
index 2acdb7a78..9f3268890 100644
--- a/src/sim/port.hh
+++ b/src/sim/port.hh
@@ -92,13 +92,13 @@ class Port
*/
Port(const std::string& _name, PortID _id);
+ public:
+
/**
* Virtual destructor due to inheritance.
*/
virtual ~Port();
- public:
-
/** Return a reference to this port's peer. */
Port &getPeer() { return *_peer; }