summaryrefslogtreecommitdiffstats
path: root/src/lib/netlist/plib/pfmtlog.h
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2016-07-21 11:05:55 +0200
committer couriersud <couriersud@arcor.de>2016-07-21 11:05:55 +0200
commit1e40d95e8b47d834d1ede706921dc19850aaaff2 (patch)
treef2e74d4451a527313fdc52f49b10955153f1dbd5 /src/lib/netlist/plib/pfmtlog.h
parent7a69d48edd6e1f59c92271eb7fa217eaf0a714c7 (diff)
Netlist updates:
- Removed trampolines (OUTLOGIC, INPLOGIC and friends). - Started using doxygen comment and documentation style. Added doxygen files to documentation folder. - Refactored code triggered by doxygen output. - Moved internal and support classes into namespace detail. - Use an anordered map in parser. - -Wconversion fixes - All done now. - Fixed -Wold-style-cast warnings in netlist code. - Added iterators to pstring. - Moved two macros, added more RAII and improved exceptions. Fixed some bugs in parser code. - Fixed a number of bugs in parser code and exception handling. [Couriersud]
Diffstat (limited to 'src/lib/netlist/plib/pfmtlog.h')
-rw-r--r--src/lib/netlist/plib/pfmtlog.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/netlist/plib/pfmtlog.h b/src/lib/netlist/plib/pfmtlog.h
index 6fa7ac55776..44397da115a 100644
--- a/src/lib/netlist/plib/pfmtlog.h
+++ b/src/lib/netlist/plib/pfmtlog.h
@@ -21,6 +21,14 @@ struct ptype_treats
};
template<>
+struct ptype_treats<bool>
+{
+ static unsigned int cast(bool x) { return static_cast<unsigned int>(x); }
+ static const bool is_signed = false;
+ static const char *size_specifier() { return ""; }
+};
+
+template<>
struct ptype_treats<char>
{
static short cast(char x) { return x; }
@@ -119,6 +127,7 @@ public:
P &operator ()(char *x, const char *f = "") { format_element(f, "", "s", x); return static_cast<P &>(*this); }
P &operator ()(const void *x, const char *f = "") { format_element(f, "", "p", x); return static_cast<P &>(*this); }
P &operator ()(const pstring &x, const char *f = "") { format_element(f, "", "s", x.cstr() ); return static_cast<P &>(*this); }
+ P &operator ()(const pstring_t<putf8_traits> &x, const char *f = "") { format_element(f, "", "s", x.cstr() ); return static_cast<P &>(*this); }
template<typename T>
P &operator ()(const T x, const char *f = "")
@@ -169,7 +178,7 @@ private:
char *m_str;
char m_str_buf[256];
- unsigned m_allocated;
+ std::size_t m_allocated;
unsigned m_arg;
};