diff options
author | Gabe Black <gabeblack@google.com> | 2019-09-20 17:43:06 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-10-23 22:37:18 +0000 |
commit | ca1d09608e52f6ca8db8c2288b292731c4cee739 (patch) | |
tree | 6212e76059f2f0922e88f4ad0073127d42a327c5 /src/arch/arm/fastmodel | |
parent | cc614875540016b53f0bb4d5c119c7e1af159e6e (diff) | |
download | gem5-ca1d09608e52f6ca8db8c2288b292731c4cee739.tar.xz |
fastmodel: Add string constructors which delegate to const char * ones.
Change-Id: I22d88111409fc477c135b15c8f898adad4f6d4ab
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21502
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Diffstat (limited to 'src/arch/arm/fastmodel')
-rw-r--r-- | src/arch/arm/fastmodel/common/signal_receiver.hh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/arch/arm/fastmodel/common/signal_receiver.hh b/src/arch/arm/fastmodel/common/signal_receiver.hh index b45598239..ac4aa98c6 100644 --- a/src/arch/arm/fastmodel/common/signal_receiver.hh +++ b/src/arch/arm/fastmodel/common/signal_receiver.hh @@ -49,9 +49,11 @@ class SignalReceiver : public amba_pv::signal_slave_base<bool> public: amba_pv::signal_slave_export<bool> signal_in; - SignalReceiver(const char *name) : SignalReceiver(name, nullptr) {} + SignalReceiver(const std::string &name, OnChangeFunc on_change=nullptr) : + SignalReceiver(name.c_str(), on_change) + {} - SignalReceiver(const char *name, OnChangeFunc on_change) : + SignalReceiver(const char *name, OnChangeFunc on_change=nullptr) : amba_pv::signal_slave_base<bool>(name), _state(false), _onChange(on_change) { |