forked from premiere/premiere-libtorrent
removed unused code
This commit is contained in:
parent
5e32484194
commit
a4ccee15df
|
@ -411,15 +411,6 @@ namespace libtorrent
|
||||||
void received_redundant_data(int num_bytes)
|
void received_redundant_data(int num_bytes)
|
||||||
{ assert(num_bytes > 0); m_total_redundant_bytes += num_bytes; }
|
{ assert(num_bytes > 0); m_total_redundant_bytes += num_bytes; }
|
||||||
|
|
||||||
float priority() const
|
|
||||||
{ return m_priority; }
|
|
||||||
|
|
||||||
void set_priority(float p)
|
|
||||||
{
|
|
||||||
assert(p >= 0.f && p <= 1.f);
|
|
||||||
m_priority = p;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool is_seed() const
|
bool is_seed() const
|
||||||
{
|
{
|
||||||
return valid_metadata()
|
return valid_metadata()
|
||||||
|
@ -626,11 +617,6 @@ namespace libtorrent
|
||||||
// is called and the time scaler is reset to 0.
|
// is called and the time scaler is reset to 0.
|
||||||
int m_time_scaler;
|
int m_time_scaler;
|
||||||
|
|
||||||
// this is the priority of this torrent. It is used
|
|
||||||
// to weight the assigned upload bandwidth between peers
|
|
||||||
// it should be within the range [0, 1]
|
|
||||||
float m_priority;
|
|
||||||
|
|
||||||
// the bitmask that says which pieces we have
|
// the bitmask that says which pieces we have
|
||||||
std::vector<bool> m_have_pieces;
|
std::vector<bool> m_have_pieces;
|
||||||
|
|
||||||
|
|
|
@ -255,7 +255,6 @@ namespace libtorrent
|
||||||
, m_currently_trying_tracker(0)
|
, m_currently_trying_tracker(0)
|
||||||
, m_failed_trackers(0)
|
, m_failed_trackers(0)
|
||||||
, m_time_scaler(0)
|
, m_time_scaler(0)
|
||||||
, m_priority(.5)
|
|
||||||
, m_num_pieces(0)
|
, m_num_pieces(0)
|
||||||
, m_sequenced_download_threshold(0)
|
, m_sequenced_download_threshold(0)
|
||||||
, m_got_tracker_response(false)
|
, m_got_tracker_response(false)
|
||||||
|
@ -339,7 +338,6 @@ namespace libtorrent
|
||||||
, m_currently_trying_tracker(0)
|
, m_currently_trying_tracker(0)
|
||||||
, m_failed_trackers(0)
|
, m_failed_trackers(0)
|
||||||
, m_time_scaler(0)
|
, m_time_scaler(0)
|
||||||
, m_priority(.5)
|
|
||||||
, m_num_pieces(0)
|
, m_num_pieces(0)
|
||||||
, m_sequenced_download_threshold(0)
|
, m_sequenced_download_threshold(0)
|
||||||
, m_got_tracker_response(false)
|
, m_got_tracker_response(false)
|
||||||
|
@ -2400,7 +2398,6 @@ namespace libtorrent
|
||||||
// This check is very expensive.
|
// This check is very expensive.
|
||||||
assert(m_num_pieces
|
assert(m_num_pieces
|
||||||
== std::count(m_have_pieces.begin(), m_have_pieces.end(), true));
|
== std::count(m_have_pieces.begin(), m_have_pieces.end(), true));
|
||||||
assert(m_priority >= 0.f && m_priority < 1.f);
|
|
||||||
assert(!valid_metadata() || m_block_size > 0);
|
assert(!valid_metadata() || m_block_size > 0);
|
||||||
assert(!valid_metadata() || (m_torrent_file.piece_length() % m_block_size) == 0);
|
assert(!valid_metadata() || (m_torrent_file.piece_length() % m_block_size) == 0);
|
||||||
// if (is_seed()) assert(m_picker.get() == 0);
|
// if (is_seed()) assert(m_picker.get() == 0);
|
||||||
|
|
Loading…
Reference in New Issue