Daniel Carvalho has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/43245 )
Change subject: base: Make Named::name() virtual
......................................................................
base: Make Named::name() virtual
Allow inherited classes to modify the defaul behavior
of name(). This can be useful, for example, when the
class names relies on sub-modules' names.
Change-Id: I6a4bc0cd13ca05e75557ed90b12a6bd6708925ec
Signed-off-by: Daniel R. Carvalho <[email protected]>
---
M src/base/named.hh
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/base/named.hh b/src/base/named.hh
index 7e73310..b8c001d 100644
--- a/src/base/named.hh
+++ b/src/base/named.hh
@@ -41,7 +41,7 @@
Named(const std::string &name_) : _name(name_) { }
virtual ~Named() = default;
- const std::string &name() const { return _name; }
+ virtual const std::string &name() const { return _name; }
};
#endif // __BASE_NAMED_HH__
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/43245
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I6a4bc0cd13ca05e75557ed90b12a6bd6708925ec
Gerrit-Change-Number: 43245
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s