diff options
author | 2019-01-06 13:17:20 +0100 | |
---|---|---|
committer | 2019-01-06 13:17:20 +0100 | |
commit | 1415421fd707ad02e0cfddf20bf70bbd045a9203 (patch) | |
tree | a5df29611fa9a0e2670ab5f45b13b37aaf1c04d4 /src/lib/netlist/plib/pstream.cpp | |
parent | c5b3f76360813e6a8caa139c3d1c743ce31d9560 (diff) |
More c++ alignment. pstring now behaves like std::string. (nw)
This change removes all string extensions like trim, rpad, left, right,
... from pstring and replaces them by function templates.
This aligns a lot better with the intentions of the standard library.
Diffstat (limited to 'src/lib/netlist/plib/pstream.cpp')
-rw-r--r-- | src/lib/netlist/plib/pstream.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/netlist/plib/pstream.cpp b/src/lib/netlist/plib/pstream.cpp index 420f63c9e5e..50a39685f70 100644 --- a/src/lib/netlist/plib/pstream.cpp +++ b/src/lib/netlist/plib/pstream.cpp @@ -259,12 +259,12 @@ pstdout::~pstdout() // ----------------------------------------------------------------------------- pimemstream::pimemstream(const void *mem, const pos_type len) - : pistream(FLAG_SEEKABLE), m_pos(0), m_len(len), m_mem(static_cast<const pstring::mem_t *>(mem)) + : pistream(FLAG_SEEKABLE), m_pos(0), m_len(len), m_mem(static_cast<const char *>(mem)) { } pimemstream::pimemstream(const pomemstream &ostrm) -: pistream(FLAG_SEEKABLE), m_pos(0), m_len(ostrm.size()), m_mem(reinterpret_cast<pstring::mem_t *>(ostrm.memory())) +: pistream(FLAG_SEEKABLE), m_pos(0), m_len(ostrm.size()), m_mem(reinterpret_cast<const char *>(ostrm.memory())) { } @@ -366,7 +366,7 @@ pstream::pos_type pomemstream::vtell() bool putf8_reader::readline(pstring &line) { - pstring::code_t c = 0; + putf8string::code_t c = 0; m_linebuf = ""; if (!this->readcode(c)) { @@ -378,11 +378,11 @@ bool putf8_reader::readline(pstring &line) if (c == 10) break; else if (c != 13) /* ignore CR */ - m_linebuf += pstring(c); + m_linebuf += putf8string(c); if (!this->readcode(c)) break; } - line = m_linebuf; + line = m_linebuf.c_str(); return true; } |