|
|
@ -809,7 +809,8 @@ public: |
|
|
|
|
|
|
|
|
|
|
|
void insert(iterator it, const_iterator first, const_iterator last) |
|
|
|
void insert(iterator it, const_iterator first, const_iterator last) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (it == vch.begin() + nReadPos && last - first <= nReadPos) |
|
|
|
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
|
|
|
|
// special case for inserting at the front when there's room
|
|
|
|
nReadPos -= (last - first); |
|
|
|
nReadPos -= (last - first); |
|
|
@ -821,7 +822,8 @@ public: |
|
|
|
|
|
|
|
|
|
|
|
void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last) |
|
|
|
void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (it == vch.begin() + nReadPos && last - first <= nReadPos) |
|
|
|
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
|
|
|
|
// special case for inserting at the front when there's room
|
|
|
|
nReadPos -= (last - first); |
|
|
|
nReadPos -= (last - first); |
|
|
@ -834,7 +836,8 @@ public: |
|
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1300 |
|
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1300 |
|
|
|
void insert(iterator it, const char* first, const char* last) |
|
|
|
void insert(iterator it, const char* first, const char* last) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (it == vch.begin() + nReadPos && last - first <= nReadPos) |
|
|
|
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
|
|
|
|
// special case for inserting at the front when there's room
|
|
|
|
nReadPos -= (last - first); |
|
|
|
nReadPos -= (last - first); |
|
|
|