mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-09 04:02:25 +01:00
Don't use pass by reference to const for cheaply-copied types (bool, char, etc.).
This commit is contained in:
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user