]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Changes to Bitmap referencing
authorMatt Joiner <anacrolix@gmail.com>
Sat, 23 Sep 2017 05:27:10 +0000 (15:27 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 23 Sep 2017 05:27:10 +0000 (15:27 +1000)
torrent.go

index c09a4d0b3eb8016c052941039712eb936f6732e4..84691af65ca0a8ee10699981269841566cc53427 100644 (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) {