diff options
author | 2020-06-13 15:58:27 +0200 | |
---|---|---|
committer | 2020-06-13 15:58:27 +0200 | |
commit | 284f196df1c65a91eb38a5a9f31a2da7fb86a1ac (patch) | |
tree | d29473e4024dce305d0ee3bb957a663420417312 /src/lib/netlist/plib/pchrono.h | |
parent | 52b8d5fd2b656c317e589da93467c33be74e76ea (diff) | |
parent | e949e9c29de82ee7c32692e7b65da05dd22bdc9d (diff) |
Merge branch 'master' of https://github.com/mamedev/mame
Diffstat (limited to 'src/lib/netlist/plib/pchrono.h')
-rw-r--r-- | src/lib/netlist/plib/pchrono.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/netlist/plib/pchrono.h b/src/lib/netlist/plib/pchrono.h index feee8a30c3e..4a5e77d9ca2 100644 --- a/src/lib/netlist/plib/pchrono.h +++ b/src/lib/netlist/plib/pchrono.h @@ -9,6 +9,7 @@ /// #include "pconfig.h" +#include "pgsl.h" #include "ptypes.h" #include <chrono> @@ -212,8 +213,8 @@ namespace plib { ctype count() const noexcept { return m_count; } template <typename S> - S as_seconds() const noexcept { return static_cast<S>(total()) - / static_cast<S>(T::per_second()); } + S as_seconds() const noexcept { return narrow_cast<S>(total()) + / narrow_cast<S>(T::per_second()); } guard_t guard() noexcept { return guard_t(*this); } private: @@ -244,7 +245,7 @@ namespace plib { constexpr type total() const noexcept { return 0; } constexpr ctype count() const noexcept { return 0; } template <typename S> - S as_seconds() const noexcept { return static_cast<S>(0.0); } + S as_seconds() const noexcept { return narrow_cast<S>(0); } constexpr static bool enabled = false; guard_t guard() { return guard_t(); } }; |