Bit more universal code
authorsvost <ya.nowa@yandex.ru>
Fri, 6 May 2016 18:16:08 +0000 (21:16 +0300)
committersvost <ya.nowa@yandex.ru>
Fri, 6 May 2016 18:16:08 +0000 (21:16 +0300)
src/serialize.h

index e54d1aa..ddff706 100644 (file)
@@ -845,20 +845,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 -= (unsigned int)(last - first);
-            memcpy(&vch[nReadPos], &first[0], last - first);
-        }
-        else
-            vch.insert(it, first, last);
-    }
-
-#ifndef _MSC_VER
     void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
     {
         assert(last - first >= 0);
@@ -871,7 +857,6 @@ public:
         else
             vch.insert(it, first, last);
     }
-#endif
 
     void insert(iterator it, const char* first, const char* last)
     {