deprecate partial_piece_info::piece_state
This commit is contained in:
parent
ff63557f58
commit
9333c51da6
|
@ -1,3 +1,4 @@
|
|||
* deprecate partial_piece_info::piece_state
|
||||
* bind upnp requests to correct local address
|
||||
* save resume data when removing web seeds
|
||||
* fix proxying of https connections
|
||||
|
|
|
@ -188,6 +188,7 @@ namespace libtorrent
|
|||
// get_download_queue() is called, it will be invalidated.
|
||||
block_info* blocks;
|
||||
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
// the speed classes. These may be used by the piece picker to
|
||||
// coalesce requests of similar download rates
|
||||
enum state_t { none, slow, medium, fast };
|
||||
|
@ -204,7 +205,12 @@ namespace libtorrent
|
|||
// downloaded pieces down. Pieces set to ``none`` can be converted into
|
||||
// any of ``fast``, ``medium`` or ``slow`` as soon as a peer want to
|
||||
// download from it.
|
||||
state_t piece_state;
|
||||
state_t TORRENT_DEPRECATED_MEMBER piece_state;
|
||||
#else
|
||||
// hidden
|
||||
enum deprecated_state_t { none, slow, medium, fast };
|
||||
deprecated_state_t deprecated_piece_state;
|
||||
#endif
|
||||
};
|
||||
|
||||
// for boost::hash (and to support using this type in unordered_map etc.)
|
||||
|
|
|
@ -7617,6 +7617,11 @@ namespace libtorrent
|
|||
pi.finished = int(i->finished);
|
||||
pi.writing = int(i->writing);
|
||||
pi.requested = int(i->requested);
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
pi.piece_state = partial_piece_info::none;
|
||||
#else
|
||||
pi.deprecated_piece_state = partial_piece_info::none;
|
||||
#endif
|
||||
TORRENT_ASSERT(counter * blocks_per_piece + pi.blocks_in_piece <= int(blk.size()));
|
||||
pi.blocks = &blk[counter * blocks_per_piece];
|
||||
int piece_size = int(torrent_file().piece_size(i->index));
|
||||
|
|
Loading…
Reference in New Issue