Daniel Carvalho has submitted this change. (
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]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43245
Tested-by: kokoro <[email protected]>
Reviewed-by: Giacomo Travaglini <[email protected]>
Maintainer: Giacomo Travaglini <[email protected]>
---
M src/base/named.hh
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
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__
9 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
--
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: 11
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s