Skip to content

Commit cde1060

Browse files
committed
Merge pull request #3162 from sipa/saninsert
Remove redundant insert method in serialize
2 parents 377cd74 + e975500 commit cde1060

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/serialize.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -901,19 +901,6 @@ class CDataStream
901901
iterator insert(iterator it, const char& x=char()) { return vch.insert(it, x); }
902902
void insert(iterator it, size_type n, const char& x) { vch.insert(it, n, x); }
903903

904-
void insert(iterator it, const_iterator first, const_iterator last)
905-
{
906-
assert(last - first >= 0);
907-
if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos)
908-
{
909-
// special case for inserting at the front when there's room
910-
nReadPos -= (last - first);
911-
memcpy(&vch[nReadPos], &first[0], last - first);
912-
}
913-
else
914-
vch.insert(it, first, last);
915-
}
916-
917904
void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
918905
{
919906
assert(last - first >= 0);

0 commit comments

Comments
 (0)