summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/penum.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/plib/penum.h')
-rw-r--r--src/lib/netlist/plib/penum.h5
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() {\