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.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/netlist/plib/penum.h b/src/lib/netlist/plib/penum.h
index a0c5e0ee307..5a1db765ba0 100644
--- a/src/lib/netlist/plib/penum.h
+++ b/src/lib/netlist/plib/penum.h
@@ -13,9 +13,10 @@
namespace plib
{
- //============================================================
- // penum - strongly typed enumeration
- //============================================================
+ ///
+ /// \brief strongly typed enumeration
+ ///
+ ///
struct penum_base
{
protected:
@@ -31,7 +32,7 @@ namespace plib
struct ename : public plib::penum_base { \
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(const 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; } \
@@ -46,8 +47,8 @@ namespace plib
template <typename S> void save_state(S &saver) { saver.save_item(m_v, "m_v"); } \
private: E m_v; \
static pstring strings() {\
- static const char * lstrings = # __VA_ARGS__; \
- return pstring(lstrings); \
+ static const char * static_strings = # __VA_ARGS__; \
+ return pstring(static_strings); \
} \
};