headers cleanup (#1054)

headers cleanup
This commit is contained in:
Alden Torres 2016-09-01 15:04:58 -04:00 committed by Arvid Norberg
parent 3faa771843
commit 585a760588
10 changed files with 28 additions and 69 deletions

View File

@ -42,16 +42,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/torrent_peer_allocator.hpp"
#include "libtorrent/performance_counters.hpp" // for counters
#include <algorithm>
#include <vector>
#include <set>
#include <list>
#include <deque>
#include <condition_variable>
#include <mutex>
#include <cstdarg> // for va_start, va_end
#include <unordered_map>
#ifdef TORRENT_USE_OPENSSL
#include "libtorrent/ssl_stream.hpp"
#endif
@ -93,6 +83,20 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/peer_connection.hpp"
#endif
#include <algorithm>
#include <vector>
#include <set>
#include <list>
#include <deque>
#include <condition_variable>
#include <mutex>
#include <cstdarg> // for va_start, va_end
#include <unordered_map>
#include "libtorrent/aux_/disable_warnings_push.hpp"
#include <boost/optional.hpp>
#include "libtorrent/aux_/disable_warnings_pop.hpp"
namespace libtorrent
{

View File

@ -47,30 +47,18 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/performance_counters.hpp"
#include "libtorrent/aux_/session_settings.hpp"
#include "libtorrent/aux_/disable_warnings_push.hpp"
#include <boost/function/function0.hpp>
#include <boost/noncopyable.hpp>
#include <boost/shared_array.hpp>
#include <boost/optional.hpp>
#include <thread>
#include <mutex>
#include <condition_variable>
#ifndef TORRENT_DISABLE_POOL_ALLOCATOR
#include <boost/pool/pool.hpp>
#endif
#include <atomic>
#include "libtorrent/aux_/disable_warnings_pop.hpp"
#include <memory>
#include <vector>
namespace libtorrent
{
class alert;
struct add_torrent_params;
struct counters;
class alert_manager;
class alert_manager;
struct cached_piece_info
{
@ -647,4 +635,3 @@ namespace libtorrent
}
#endif

View File

@ -38,14 +38,8 @@ POSSIBILITY OF SUCH DAMAGE.
#include <libtorrent/kademlia/observer.hpp>
#include <libtorrent/kademlia/item.hpp>
#include "libtorrent/aux_/disable_warnings_push.hpp"
#include <boost/function/function1.hpp>
#include <boost/function/function2.hpp>
#include <vector>
#include "libtorrent/aux_/disable_warnings_pop.hpp"
namespace libtorrent { namespace dht
{
struct msg;
@ -92,4 +86,3 @@ struct put_data_observer : traversal_observer
} } // namespace libtorrent::dht
#endif // TORRENT_PUT_DATA_HPP

View File

@ -43,18 +43,10 @@ POSSIBILITY OF SUCH DAMAGE.
#include <functional>
#include "libtorrent/aux_/disable_warnings_push.hpp"
#include <boost/function/function1.hpp>
#include <boost/asio/ssl.hpp>
// openssl seems to believe it owns
// this name in every single scope
#undef set_key
#if defined TORRENT_BUILD_SIMULATOR
#include "simulator/simulator.hpp"
#endif
#include "libtorrent/aux_/disable_warnings_pop.hpp"
namespace libtorrent {

View File

@ -67,4 +67,3 @@ namespace libtorrent {
}
#endif

View File

@ -42,12 +42,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/file_pool.hpp"
#include "libtorrent/torrent_info.hpp"
#include "libtorrent/platform_util.hpp"
#include <functional>
#include <tuple>
#include <set>
#include <vector>
#include "libtorrent/time.hpp"
#include "libtorrent/disk_buffer_pool.hpp"
#include "libtorrent/disk_io_job.hpp"
@ -55,9 +49,10 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/uncork_interface.hpp"
#include "libtorrent/performance_counters.hpp"
#include "libtorrent/alert_manager.hpp"
#include "libtorrent/debug.hpp"
#include <functional>
#if TORRENT_USE_RLIMIT
#include <sys/resource.h>
#endif

View File

@ -35,13 +35,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include <utility>
#include <cinttypes> // for PRId64 et.al.
#include <functional>
#include "libtorrent/aux_/disable_warnings_push.hpp"
#include <tuple>
#include <boost/function/function1.hpp>
#include "libtorrent/aux_/disable_warnings_pop.hpp"
#ifndef TORRENT_DISABLE_LOGGING
#include "libtorrent/hex.hpp" // to_hex

View File

@ -119,4 +119,3 @@ bool put_data::invoke(observer_ptr o)
}
} } // namespace libtorrent::dht

View File

@ -46,7 +46,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/aux_/disable_warnings_push.hpp"
#include <boost/function_equal.hpp>
#include <boost/asio/ip/v6_only.hpp>
#if TORRENT_USE_RLIMIT
@ -4209,11 +4208,9 @@ namespace aux {
torrent_map::const_iterator i = m_torrents.find(info_hash);
#if TORRENT_USE_INVARIANT_CHECKS
for (torrent_map::const_iterator j
= m_torrents.begin(); j != m_torrents.end(); ++j)
for (auto const& te : m_torrents)
{
torrent* p = boost::get_pointer(j->second);
TORRENT_ASSERT(p);
TORRENT_ASSERT(te.second);
}
#endif
if (i != m_torrents.end()) return i->second;
@ -6833,10 +6830,9 @@ namespace aux {
TORRENT_ASSERT_VAL(unchoked_counter == unchokes, unchokes);
TORRENT_ASSERT_VAL(unchoked_counter_optimistic == num_optimistic, num_optimistic);
for (torrent_map::const_iterator j
= m_torrents.begin(); j != m_torrents.end(); ++j)
for (auto const& te : m_torrents)
{
TORRENT_ASSERT(boost::get_pointer(j->second));
TORRENT_ASSERT(te.second);
}
}
#endif // TORRENT_USE_INVARIANT_CHECKS

View File

@ -6205,7 +6205,7 @@ namespace libtorrent
#endif
#ifndef TORRENT_DISABLE_EXTENSIONS
for (auto& ext : m_extensions)
for (auto const& ext : m_extensions)
{
std::shared_ptr<peer_plugin>
pp(ext->new_connection(peer_connection_handle(c->self())));
@ -6217,7 +6217,7 @@ namespace libtorrent
{
TORRENT_ASSERT(!c->m_in_constructor);
// add the newly connected peer to this torrent's peer list
sorted_insert(m_connections, boost::get_pointer(c));
sorted_insert(m_connections, c.get());
update_want_peers();
update_want_tick();
m_ses.insert_peer(c);
@ -6903,7 +6903,7 @@ namespace libtorrent
peerinfo->prev_amount_upload = 0;
#ifndef TORRENT_DISABLE_EXTENSIONS
for (auto& ext : m_extensions)
for (auto const& ext : m_extensions)
{
TORRENT_TRY {
std::shared_ptr<peer_plugin> pp(ext->new_connection(
@ -6914,7 +6914,7 @@ namespace libtorrent
#endif
// add the newly connected peer to this torrent's peer list
sorted_insert(m_connections, boost::get_pointer(c));
sorted_insert(m_connections, c.get());
m_ses.insert_peer(c);
need_peer_list();
m_peer_list->set_connection(peerinfo, c.get());
@ -6931,7 +6931,7 @@ namespace libtorrent
}
TORRENT_CATCH (std::exception&)
{
peer_iterator i = sorted_find(m_connections, boost::get_pointer(c));
peer_iterator i = sorted_find(m_connections, c.get());
if (i != m_connections.end())
{
m_connections.erase(i);
@ -7036,7 +7036,7 @@ namespace libtorrent
return lhs->connected_time() > rhs->connected_time();
}
} // anonymous namespaec
} // anonymous namespace
bool torrent::attach_peer(peer_connection* p)
{