From d6edf26e119b6ae0532e202a8c667f0fd3298d1e Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Thu, 5 Apr 2018 10:20:54 -0400 Subject: [PATCH] minor code tidy --- include/libtorrent/aux_/session_impl.hpp | 1 - src/disk_io_thread.cpp | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index e78a1d355..50cac2702 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -108,7 +108,6 @@ namespace libtorrent { class lsd; class torrent; class alert; - struct cache_info; struct torrent_handle; namespace dht { diff --git a/src/disk_io_thread.cpp b/src/disk_io_thread.cpp index 7b9bbceed..2878dd0e9 100644 --- a/src/disk_io_thread.cpp +++ b/src/disk_io_thread.cpp @@ -1830,14 +1830,16 @@ constexpr disk_job_flags_t disk_interface::cache_hit; add_fence_job(j); } - void disk_io_thread::abort_hash_jobs(storage_index_t const storage) { + void disk_io_thread::abort_hash_jobs(storage_index_t const storage) + { // abort outstanding hash jobs belonging to this torrent std::unique_lock l(m_job_mutex); std::shared_ptr st - = m_torrents[storage]->shared_from_this(); + = m_torrents[storage]->shared_from_this(); // hash jobs - for (auto i = m_hash_io_jobs.m_queued_jobs.iterate(); i.get(); i.next()) { + for (auto i = m_hash_io_jobs.m_queued_jobs.iterate(); i.get(); i.next()) + { disk_io_job *j = i.get(); if (j->storage != st) continue; j->flags |= disk_io_job::aborted;