From 34a9b8628f2a0b001a57deed73f887c92d5ffef6 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 27 Sep 2018 01:20:28 -0700 Subject: systemc: Add a non-standard sc_time constructor and from_string. The sc_time constructor was being called, but because of implicit type conversions, a const char * was being treated as a bool and totally unrelated constructor was being called. This change adds and implements the missing but non-standard constructor. It also implements the from_string function which uses that constructor. Change-Id: I21e7e40fd1a8d1c579b1abdc2036d016501f510c Reviewed-on: https://gem5-review.googlesource.com/c/13191 Reviewed-by: Gabe Black Maintainer: Gabe Black --- src/systemc/ext/core/sc_time.hh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/systemc/ext') diff --git a/src/systemc/ext/core/sc_time.hh b/src/systemc/ext/core/sc_time.hh index 0a31a655a..d2b1e985d 100644 --- a/src/systemc/ext/core/sc_time.hh +++ b/src/systemc/ext/core/sc_time.hh @@ -55,6 +55,9 @@ class sc_time sc_time(double, sc_time_unit); sc_time(const sc_time &); + // Nonstandard + sc_time(double, const char *); + // Deprecated sc_time(double, bool); sc_time(sc_dt::uint64, bool); -- cgit v1.2.3