From: Gabe Black Date: Sat, 21 Sep 2019 00:43:06 +0000 (-0700) Subject: fastmodel: Add string constructors which delegate to const char * ones. X-Git-Tag: v19.0.0.0~415 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ca1d09608e52f6ca8db8c2288b292731c4cee739;p=gem5.git 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 Reviewed-by: Giacomo Travaglini Maintainer: Giacomo Travaglini --- 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 public: amba_pv::signal_slave_export 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(name), _state(false), _onChange(on_change) {