cleanup of special code for valgrind

This commit is contained in:
Alden Torres 2018-09-11 12:19:47 -04:00 committed by Arvid Norberg
parent 16249b8135
commit e2a8fbf020
1 changed files with 0 additions and 5 deletions

View File

@ -6264,11 +6264,6 @@ bool is_downloading_state(int const st)
const int blocks_per_piece = m_picker->blocks_in_piece(piece_index_t(0));
blk.resize(q.size() * aux::numeric_cast<std::size_t>(blocks_per_piece));
// for some weird reason valgrind claims these are uninitialized
// unless it's zeroed out here (block_info has a construct that's
// supposed to initialize it)
if (!blk.empty())
std::memset(blk.data(), 0, sizeof(blk[0]) * blk.size());
int counter = 0;
for (auto i = q.begin(); i != q.end(); ++i, ++counter)