From 76bb6db1ab15d2e1a2b6a9f05a235f39ed3319d9 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sat, 9 Jul 2016 02:34:50 -0400 Subject: [PATCH] fixup --- simulation/test_web_seed.cpp | 8 -------- src/peer_connection.cpp | 11 ----------- 2 files changed, 19 deletions(-) diff --git a/simulation/test_web_seed.cpp b/simulation/test_web_seed.cpp index 1468f7db6..c1b935ef8 100644 --- a/simulation/test_web_seed.cpp +++ b/simulation/test_web_seed.cpp @@ -48,14 +48,6 @@ using namespace libtorrent; namespace lt = libtorrent; -std::unique_ptr 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(new sim::asio::io_service( - sim, address_v4::from_string(ep))); -} - boost::shared_ptr create_torrent(file_storage& fs) { int const piece_size = 0x4000; diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 99621c60f..092b8facd 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -5790,17 +5790,6 @@ namespace libtorrent setup_send(); } - template - 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 // --------------------------