forked from premiere/premiere-libtorrent
fixup
This commit is contained in:
parent
2df81d0927
commit
76bb6db1ab
|
@ -48,14 +48,6 @@ using namespace libtorrent;
|
|||
|
||||
namespace lt = libtorrent;
|
||||
|
||||
std::unique_ptr<sim::asio::io_service> make_io_service(sim::simulation& sim, int i)
|
||||
{
|
||||
char ep[30];
|
||||
snprintf(ep, sizeof(ep), "50.0.%d.%d", (i + 1) >> 8, (i + 1) & 0xff);
|
||||
return std::unique_ptr<sim::asio::io_service>(new sim::asio::io_service(
|
||||
sim, address_v4::from_string(ep)));
|
||||
}
|
||||
|
||||
boost::shared_ptr<torrent_info> create_torrent(file_storage& fs)
|
||||
{
|
||||
int const piece_size = 0x4000;
|
||||
|
|
|
@ -5790,17 +5790,6 @@ namespace libtorrent
|
|||
setup_send();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
struct set_to_zero
|
||||
{
|
||||
set_to_zero(T& v, bool cond): m_val(v), m_cond(cond) {}
|
||||
void fire() { if (!m_cond) return; m_cond = false; m_val = 0; }
|
||||
~set_to_zero() { if (m_cond) m_val = 0; }
|
||||
private:
|
||||
T& m_val;
|
||||
bool m_cond;
|
||||
};
|
||||
|
||||
// --------------------------
|
||||
// RECEIVE DATA
|
||||
// --------------------------
|
||||
|
|
Loading…
Reference in New Issue