diff options
author | 2019-02-06 10:24:34 +0100 | |
---|---|---|
committer | 2019-02-07 21:54:11 +0100 | |
commit | 3b899b86e67e3a5cc093d2dd9c0dcaeed197c806 (patch) | |
tree | 5efe135d75b1fd837549719bfa6572802870be1b /src/lib/netlist/plib/pstream.cpp | |
parent | c8d0db0c83d4b72e86f6255b95ff45ccc475d85d (diff) |
netlist: Refactoring after adding clang-tidy support to netlist makefile
- convert macros to c++ code.
- order of device creation should not depend on std lib.
- some state saving cleanup.
- added support for clang-tidy to makefile.
- modifications triggered by clang-tidy-9.
Diffstat (limited to 'src/lib/netlist/plib/pstream.cpp')
-rw-r--r-- | src/lib/netlist/plib/pstream.cpp | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/src/lib/netlist/plib/pstream.cpp b/src/lib/netlist/plib/pstream.cpp index a204bdcfe33..f9dd224e92f 100644 --- a/src/lib/netlist/plib/pstream.cpp +++ b/src/lib/netlist/plib/pstream.cpp @@ -8,9 +8,9 @@ #include "pstream.h" #include "palloc.h" +#include <algorithm> #include <cstdio> #include <cstdlib> -#include <algorithm> // VS2015 prefers _dup #ifdef _WIN32 @@ -21,10 +21,6 @@ namespace plib { -pstream::~pstream() -{ -} - // ----------------------------------------------------------------------------- // pistream: input stream // ----------------------------------------------------------------------------- @@ -124,10 +120,6 @@ pstdin::pstdin() /* nothing to do */ } -pstdin::~pstdin() -{ -} - // ----------------------------------------------------------------------------- // Output file stream // ----------------------------------------------------------------------------- @@ -198,11 +190,6 @@ pstream::pos_type pofilestream::vtell() const return static_cast<pos_type>(ret); } -postringstream::~postringstream() -{ -} - - // ----------------------------------------------------------------------------- // pstderr: write to stderr // ----------------------------------------------------------------------------- @@ -216,10 +203,6 @@ pstderr::pstderr() { } -pstderr::~pstderr() -{ -} - // ----------------------------------------------------------------------------- // pstdout: write to stdout // ----------------------------------------------------------------------------- @@ -233,10 +216,6 @@ pstdout::pstdout() { } -pstdout::~pstdout() -{ -} - // ----------------------------------------------------------------------------- // Memory stream // ----------------------------------------------------------------------------- @@ -256,10 +235,6 @@ pimemstream::pimemstream(const pomemstream &ostrm) { } -pimemstream::~pimemstream() -{ -} - pimemstream::pos_type pimemstream::vread(value_type *buf, const pos_type n) { pos_type ret = (m_pos + n <= m_len) ? n : m_len - m_pos; @@ -288,10 +263,6 @@ pimemstream::pos_type pimemstream::vtell() const return m_pos; } -pistringstream::~pistringstream() -{ -} - // ----------------------------------------------------------------------------- // Output memory stream // ----------------------------------------------------------------------------- @@ -376,10 +347,6 @@ bool putf8_reader::readline(pstring &line) } -putf8_fmt_writer::~putf8_fmt_writer() -{ -} - void putf8_fmt_writer::vdowrite(const pstring &ls) const { write(ls); @@ -387,4 +354,4 @@ void putf8_fmt_writer::vdowrite(const pstring &ls) const -} +} // namespace plib |