summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pstream.h
diff options
context:
space:
mode:
author Couriersud <couriersud@gmx.org>2017-02-27 23:47:48 +0100
committer Couriersud <couriersud@gmx.org>2017-03-05 16:19:59 +0100
commit3c49610274fa08a8fe008d0e8fd997f4c7470d5a (patch)
tree156d9dfbe1d101a08911f85b2956293968c7eea7 /src/lib/netlist/plib/pstream.h
parentc933d239f5e9239aee851f119f9b87abeae1b17d (diff)
More cppcheck fixes. (nw)
Diffstat (limited to 'src/lib/netlist/plib/pstream.h')
-rw-r--r--src/lib/netlist/plib/pstream.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/netlist/plib/pstream.h b/src/lib/netlist/plib/pstream.h
index 00fcfda5bd7..80f354fd868 100644
--- a/src/lib/netlist/plib/pstream.h
+++ b/src/lib/netlist/plib/pstream.h
@@ -175,7 +175,7 @@ public:
virtual ~pofilestream();
protected:
- pofilestream(void *file, const pstring name, const bool do_close);
+ pofilestream(void *file, const pstring &name, const bool do_close);
/* write n bytes to stream */
virtual void vwrite(const void *buf, const pos_type n) override;
virtual void vseek(const pos_type n) override;
@@ -224,7 +224,7 @@ public:
virtual ~pifilestream();
protected:
- pifilestream(void *file, const pstring name, const bool do_close);
+ pifilestream(void *file, const pstring &name, const bool do_close);
/* read up to n bytes from stream */
virtual pos_type vread(void *buf, const pos_type n) override;
@@ -284,7 +284,7 @@ private:
class pistringstream : public pimemstream
{
public:
- pistringstream(const pstring &str) : pimemstream(str.c_str(), str.len()), m_str(str) { }
+ explicit pistringstream(const pstring &str) : pimemstream(str.c_str(), str.len()), m_str(str) { }
virtual ~pistringstream();
private:
@@ -389,14 +389,14 @@ public:
m_strm.write(&val, sizeof(T));
}
- void write(const pstring s)
+ void write(const pstring &s)
{
write(s.blen());
m_strm.write(s.c_str(), s.blen());
}
template <typename T>
- void write(const std::vector<T> val)
+ void write(const std::vector<T> &val)
{
std::size_t sz = val.size();
write(sz);