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/penum.h | |
parent | 52b8d5fd2b656c317e589da93467c33be74e76ea (diff) | |
parent | e949e9c29de82ee7c32692e7b65da05dd22bdc9d (diff) |
Merge branch 'master' of https://github.com/mamedev/mame
Diffstat (limited to 'src/lib/netlist/plib/penum.h')
-rw-r--r-- | src/lib/netlist/plib/penum.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/netlist/plib/penum.h b/src/lib/netlist/plib/penum.h index ff15c9252c0..f965411d546 100644 --- a/src/lib/netlist/plib/penum.h +++ b/src/lib/netlist/plib/penum.h @@ -24,7 +24,7 @@ namespace plib // Implementation in putil.cpp. // Putting the code here leads to a performance decrease. static int from_string_int(const pstring &str, const pstring &x); - static pstring nthstr(int n, const pstring &str); + static pstring nthstr(std::size_t n, const pstring &str); }; } // namespace plib @@ -34,7 +34,6 @@ namespace plib enum E { __VA_ARGS__ }; \ constexpr ename (const E &v) : m_v(v) { } \ template <typename T> explicit constexpr ename(const T &val) { m_v = static_cast<E>(val); } \ - template <typename T> explicit constexpr ename(T && val) { m_v = static_cast<E>(val); } \ bool set_from_string (const pstring &s) { \ int f = from_string_int(strings(), s); \ if (f>=0) { m_v = static_cast<E>(f); return true; } \ @@ -44,7 +43,7 @@ namespace plib constexpr bool operator==(const ename &rhs) const noexcept {return m_v == rhs.m_v;} \ constexpr bool operator==(const E &rhs) const noexcept {return m_v == rhs;} \ pstring name() const { \ - return nthstr(static_cast<int>(m_v), strings()); \ + return nthstr(m_v, strings()); \ } \ private: E m_v; \ static pstring strings() {\ |