From: Yu-hsin Wang Date: Fri, 3 Jan 2020 05:32:33 +0000 (+0800) Subject: sim: Move destructor of Port to public X-Git-Tag: v19.0.0.0~150 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f405040cda3ac2466c871d82b68f8d1d77fbf76;p=gem5.git 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 Maintainer: Gabe Black Tested-by: kokoro --- 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; }