From 3efed509827bac2ec71733a0a7a8f57086d269a6 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 26 Oct 2013 20:34:48 +0200 Subject: [PATCH] Remove redundant insert method in serialize. This seems to cause problems on recent clang, and looks totally redundant and unused. The const_iterator version is identical to the vector::const_iterator one (which is a typedef thereof). Marking it private (instead of removing) compiles fine, so this version is effectively unused even. --- src/serialize.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/serialize.h b/src/serialize.h index e3d9939bc..eac4e06cb 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -895,19 +895,6 @@ public: 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); } - void insert(iterator it, const_iterator first, const_iterator last) - { - assert(last - first >= 0); - if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos) - { - // special case for inserting at the front when there's room - nReadPos -= (last - first); - memcpy(&vch[nReadPos], &first[0], last - first); - } - else - vch.insert(it, first, last); - } - void insert(iterator it, std::vector::const_iterator first, std::vector::const_iterator last) { assert(last - first >= 0);