avoid extra sha1_hash memory copy, minor formatting (#1968)

This commit is contained in:
Alden Torres 2017-05-04 17:35:40 -04:00 committed by Arvid Norberg
parent 11c75da314
commit 0b391d6351
2 changed files with 4 additions and 5 deletions

View File

@ -367,7 +367,6 @@ namespace libtorrent {
};
namespace detail {
inline void nop(piece_index_t) {}
}

View File

@ -179,7 +179,7 @@ namespace {
st->iothread.abort(true);
return;
}
st->ct.set_hash(piece, sha1_hash(piece_hash));
st->ct.set_hash(piece, piece_hash);
st->f(st->completed_piece);
++st->completed_piece;
if (st->piece_counter < st->ct.files().end_piece())