Use insert to extend circular_buffer

master
michal.szwaj 2018-03-27 22:46:22 +02:00
parent ffb2a52b71
commit ae4289f8b5
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ DataSink::DataSink()
common::DataBuffer DataSink::fill() common::DataBuffer DataSink::fill()
{ {
const auto offset = data_.size(); const auto offset = data_.size();
data_.resize(data_.size() + cChunkSize); data_.insert(data_.end(), cChunkSize, 0);
return common::DataBuffer(&data_[offset], cChunkSize); return common::DataBuffer(&data_[offset], cChunkSize);
} }