aboutsummaryrefslogtreecommitdiff
path: root/src/streams.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-12-14 17:43:59 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-12-14 18:28:01 +0100
commitc66adb286a89738a6a5218be2ecfea8e398878dd (patch)
tree7468f59743bcf4957ec38f4b44322a5d97a5a389 /src/streams.h
parent3c8f0a3b8e670f1410a642b31274e6ceeb9344da (diff)
parent99ba0c30087dc45a3805f0cac6d2e534ec52f039 (diff)
downloadbitcoin-c66adb286a89738a6a5218be2ecfea8e398878dd.tar.xz
Merge #10839: Don't use pass by reference to const for cheaply-copied types (bool, char, etc.)
99ba0c3 Don't use pass by reference to const for cheaply-copied types (bool, char, etc.). (practicalswift) Pull request description: Don't use pass by reference to const for cheaply-copied types (`bool`, `char`, etc.). Tree-SHA512: ccad5e2695dff0b3d6de3e713ff3448f2981168cdac72d73bee10ad346b9919d8d4d588933369e54657a244b8b222fa0bef919bc56d983e1fa64b2004e51b225
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 a212691f6d..c26b1f618c 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; }