From: Matt Joiner Date: Sat, 23 Sep 2017 05:27:10 +0000 (+1000) Subject: Changes to Bitmap referencing X-Git-Tag: v1.0.0~372 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=2c91d1e3fbd2b8e9dc1f42d2a3f8398081c2c60b;p=btrtrc.git Changes to Bitmap referencing --- diff --git a/torrent.go b/torrent.go index c09a4d0b..84691af6 100644 --- a/torrent.go +++ b/torrent.go @@ -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) {