fastmodel: Add string constructors which delegate to const char * ones.
authorGabe Black <gabeblack@google.com>
Sat, 21 Sep 2019 00:43:06 +0000 (17:43 -0700)
committerGabe Black <gabeblack@google.com>
Wed, 23 Oct 2019 22:37:18 +0000 (22:37 +0000)
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>

src/arch/arm/fastmodel/common/signal_receiver.hh

index b4559823928cfbef4ea5c7b9ee8fd082d8726624..ac4aa98c6b0552331d926aa9dbcaac4550163c4e 100644 (file)
@@ -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)
     {