2
0
mirror of synced 2025-02-23 22:28:11 +00:00

Changes to Bitmap referencing

This commit is contained in:
Matt Joiner 2017-09-23 15:27:10 +10:00
parent 6aad8041ab
commit 2c91d1e3fb

View File

@ -950,7 +950,7 @@ func (t *Torrent) pendPiece(piece int) {
t.updatePiecePriority(piece)
}
func (t *Torrent) unpendPieces(unpend *bitmap.Bitmap) {
func (t *Torrent) unpendPieces(unpend bitmap.Bitmap) {
t.pendingPieces.Sub(unpend)
unpend.IterTyped(func(piece int) (again bool) {
t.updatePiecePriority(piece)
@ -967,7 +967,7 @@ func (t *Torrent) pendPieceRange(begin, end int) {
func (t *Torrent) unpendPieceRange(begin, end int) {
var bm bitmap.Bitmap
bm.AddRange(begin, end)
t.unpendPieces(&bm)
t.unpendPieces(bm)
}
func (t *Torrent) pendRequest(req request) {