avoid extra sha1_hash memory copy, minor formatting (#1968)
This commit is contained in:
parent
11c75da314
commit
0b391d6351
|
@ -367,7 +367,6 @@ namespace libtorrent {
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
inline void nop(piece_index_t) {}
|
inline void nop(piece_index_t) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -179,7 +179,7 @@ namespace {
|
||||||
st->iothread.abort(true);
|
st->iothread.abort(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
st->ct.set_hash(piece, sha1_hash(piece_hash));
|
st->ct.set_hash(piece, piece_hash);
|
||||||
st->f(st->completed_piece);
|
st->f(st->completed_piece);
|
||||||
++st->completed_piece;
|
++st->completed_piece;
|
||||||
if (st->piece_counter < st->ct.files().end_piece())
|
if (st->piece_counter < st->ct.files().end_piece())
|
||||||
|
|
Loading…
Reference in New Issue