diff options
author | 2017-01-19 18:05:19 +0100 | |
---|---|---|
committer | 2017-01-20 22:29:23 +0100 | |
commit | 4d15501a30d78eecc5011ebdd12a7568954129cb (patch) | |
tree | f3364bc26aae7719fb8fa3b153847188446844a7 /src/lib/netlist/plib/pfmtlog.cpp | |
parent | 1ae3e29ea3fd90e5df31d52c5d3860fde7f3cbac (diff) |
Netlist: code refactoring
Make streams provide binary access only. Use putf8_reader and
putf8_writer to actually access streams. Replace some char * parameters
with pstring where appropriate. Minor code refactoring and move
functionality were it belongs. (nw)
Diffstat (limited to 'src/lib/netlist/plib/pfmtlog.cpp')
-rw-r--r-- | src/lib/netlist/plib/pfmtlog.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/lib/netlist/plib/pfmtlog.cpp b/src/lib/netlist/plib/pfmtlog.cpp index 48b0f1544c1..4cd74837dbb 100644 --- a/src/lib/netlist/plib/pfmtlog.cpp +++ b/src/lib/netlist/plib/pfmtlog.cpp @@ -22,7 +22,7 @@ plog_dispatch_intf::~plog_dispatch_intf() { } -pfmt::pfmt(const pstring &fmt) +pfmt::pfmt(const pstring fmt) : m_str(m_str_buf), m_allocated(0), m_arg(0) { std::size_t l = fmt.blen() + 1; @@ -34,18 +34,6 @@ pfmt::pfmt(const pstring &fmt) memcpy(m_str, fmt.c_str(), l); } -pfmt::pfmt(const char *fmt) -: m_str(m_str_buf), m_allocated(0), m_arg(0) -{ - std::size_t l = strlen(fmt) + 1; - if (l>sizeof(m_str_buf)) - { - m_allocated = 2 * l; - m_str = palloc_array<char>(2 * l); - } - memcpy(m_str, fmt, l); -} - pfmt::~pfmt() { if (m_allocated > 0) |