diff options
Diffstat (limited to 'src/serialize.h')
-rw-r--r-- | src/serialize.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/serialize.h b/src/serialize.h index b001ee1324..1dc27d84eb 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -670,7 +670,7 @@ void Unserialize_impl(Stream& is, prevector<N, T>& v, const unsigned char&) while (i < nSize) { unsigned int blk = std::min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T))); - v.resize(i + blk); + v.resize_uninitialized(i + blk); is.read((char*)&v[i], blk * sizeof(T)); i += blk; } @@ -688,8 +688,8 @@ void Unserialize_impl(Stream& is, prevector<N, T>& v, const V&) nMid += 5000000 / sizeof(T); if (nMid > nSize) nMid = nSize; - v.resize(nMid); - for (; i < nMid; i++) + v.resize_uninitialized(nMid); + for (; i < nMid; ++i) Unserialize(is, v[i]); } } |