forked from premiere/premiere-libtorrent
*** empty log message ***
This commit is contained in:
parent
fbffae1981
commit
3ba7f05bb9
|
@ -208,7 +208,7 @@ std::string progress_bar(float progress, int width)
|
||||||
std::vector<char> bar;
|
std::vector<char> bar;
|
||||||
bar.reserve(width);
|
bar.reserve(width);
|
||||||
|
|
||||||
int progress_chars = progress * width + .5f;
|
int progress_chars = static_cast<int>(progress * width + .5f);
|
||||||
std::fill_n(std::back_inserter(bar), progress_chars, '#');
|
std::fill_n(std::back_inserter(bar), progress_chars, '#');
|
||||||
std::fill_n(std::back_inserter(bar), width - progress_chars, '-');
|
std::fill_n(std::back_inserter(bar), width - progress_chars, '-');
|
||||||
return std::string(bar.begin(), bar.end());
|
return std::string(bar.begin(), bar.end());
|
||||||
|
|
|
@ -641,6 +641,7 @@ namespace libtorrent
|
||||||
while (num_connected_peers > max_connections)
|
while (num_connected_peers > max_connections)
|
||||||
{
|
{
|
||||||
bool ret = disconnect_one_peer();
|
bool ret = disconnect_one_peer();
|
||||||
|
(void)ret;
|
||||||
assert(ret);
|
assert(ret);
|
||||||
--num_connected_peers;
|
--num_connected_peers;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,6 @@ namespace libtorrent
|
||||||
if (chk)
|
if (chk)
|
||||||
{
|
{
|
||||||
boost::mutex::scoped_lock l(chk->m_mutex);
|
boost::mutex::scoped_lock l(chk->m_mutex);
|
||||||
|
|
||||||
detail::piece_checker_data* d = chk->find_torrent(hash);
|
detail::piece_checker_data* d = chk->find_torrent(hash);
|
||||||
if (d != 0) return f(*d->torrent_ptr);
|
if (d != 0) return f(*d->torrent_ptr);
|
||||||
}
|
}
|
||||||
|
@ -104,7 +103,7 @@ namespace libtorrent
|
||||||
if (t != 0) return f(*t);
|
if (t != 0) return f(*t);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw_invalid_handle();
|
throw invalid_handle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,6 +253,7 @@ namespace libtorrent
|
||||||
}
|
}
|
||||||
|
|
||||||
throw_invalid_handle();
|
throw_invalid_handle();
|
||||||
|
return torrent_status();
|
||||||
}
|
}
|
||||||
|
|
||||||
void torrent_handle::filter_piece(int index, bool filter)
|
void torrent_handle::filter_piece(int index, bool filter)
|
||||||
|
|
Loading…
Reference in New Issue