From ca1d09608e52f6ca8db8c2288b292731c4cee739 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 20 Sep 2019 17:43:06 -0700 Subject: [PATCH] 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 --- src/arch/arm/fastmodel/common/signal_receiver.hh | 6 ++++-- 1 file 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 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) { -- 2.30.2