Open gitbufenshuo opened 2 years ago
// ProtectedEventStream::process method if(limit >= _queue.size()) { processEvents.reserve(_queue.size()); std::swap(processEvents, _queue); } else { const auto countElements = std::min(limit, _queue.size()); processEvents.reserve(countElements); std::move(_queue.begin(), std::next(_queue.begin(), countElements), std::back_inserter(processEvents)); // _queue.size() remains unchanged }
Thank you, fixed.