aboutsummaryrefslogtreecommitdiff
path: root/src/streams.h
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-07-16 02:07:52 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2017-08-14 17:46:15 +0200
commit99ba0c30087dc45a3805f0cac6d2e534ec52f039 (patch)
tree6234617a7c0277a431a07b7ab5b432793bdefaf4 /src/streams.h
parent140de14a12228cf7af44f59f40a937c2910a0158 (diff)
Don't use pass by reference to const for cheaply-copied types (bool, char, etc.).
Diffstat (limited to 'src/streams.h')
-rw-r--r--src/streams.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/streams.h b/src/streams.h
index a9668b68bc..ed52c5d52d 100644
--- a/src/streams.h
+++ b/src/streams.h
@@ -241,8 +241,8 @@ public:
const_reference operator[](size_type pos) const { return vch[pos + nReadPos]; }
reference operator[](size_type pos) { return vch[pos + nReadPos]; }
void clear() { vch.clear(); nReadPos = 0; }
- iterator insert(iterator it, const char& x=char()) { return vch.insert(it, x); }
- void insert(iterator it, size_type n, const char& x) { vch.insert(it, n, x); }
+ iterator insert(iterator it, const char x=char()) { return vch.insert(it, x); }
+ void insert(iterator it, size_type n, const char x) { vch.insert(it, n, x); }
value_type* data() { return vch.data() + nReadPos; }
const value_type* data() const { return vch.data() + nReadPos; }