minor lint oriented cleanup and refactor in headers

This commit is contained in:
Alden Torres 2018-02-15 09:22:52 -05:00 committed by Arvid Norberg
parent 670c8a82ad
commit f0cd6492bd
6 changed files with 5 additions and 7 deletions

View File

@ -188,7 +188,7 @@ namespace aux {
return refcount == 0 return refcount == 0
&& piece_refcount == 0 && piece_refcount == 0
&& !hashing && !hashing
&& read_jobs.size() == 0 && read_jobs.empty()
&& outstanding_read == 0 && outstanding_read == 0
&& (ignore_hash || !hash || hash->offset == 0); && (ignore_hash || !hash || hash->offset == 0);
} }

View File

@ -105,7 +105,7 @@ namespace libtorrent {
} }
// this contains information about a file that's currently open by the // this contains information about a file that's currently open by the
// libtorrent disk I/O subsystem. It's associated with a single torent. // libtorrent disk I/O subsystem. It's associated with a single torrent.
struct TORRENT_EXPORT open_file_state struct TORRENT_EXPORT open_file_state
{ {
// the index of the file this entry refers to into the ``file_storage`` // the index of the file this entry refers to into the ``file_storage``

View File

@ -376,7 +376,6 @@ namespace aux {
status_t do_check_fastresume(disk_io_job* j, jobqueue_t& completed_jobs); status_t do_check_fastresume(disk_io_job* j, jobqueue_t& completed_jobs);
status_t do_rename_file(disk_io_job* j, jobqueue_t& completed_jobs); status_t do_rename_file(disk_io_job* j, jobqueue_t& completed_jobs);
status_t do_stop_torrent(disk_io_job* j, jobqueue_t& completed_jobs); status_t do_stop_torrent(disk_io_job* j, jobqueue_t& completed_jobs);
status_t do_read_and_hash(disk_io_job* j, jobqueue_t& completed_jobs);
status_t do_flush_piece(disk_io_job* j, jobqueue_t& completed_jobs); status_t do_flush_piece(disk_io_job* j, jobqueue_t& completed_jobs);
status_t do_flush_hashed(disk_io_job* j, jobqueue_t& completed_jobs); status_t do_flush_hashed(disk_io_job* j, jobqueue_t& completed_jobs);
status_t do_flush_storage(disk_io_job* j, jobqueue_t& completed_jobs); status_t do_flush_storage(disk_io_job* j, jobqueue_t& completed_jobs);

View File

@ -69,7 +69,7 @@ namespace libtorrent {
// set the maximum number of I/O threads which may be running // set the maximum number of I/O threads which may be running
// the actual number of threads will be <= this number // the actual number of threads will be <= this number
void set_max_threads(int const i); void set_max_threads(int i);
void abort(bool wait); void abort(bool wait);
int max_threads() const { return m_max_threads; } int max_threads() const { return m_max_threads; }

View File

@ -73,4 +73,3 @@ namespace libtorrent {
} }
#endif // TORRENT_DISK_JOB_POOL #endif // TORRENT_DISK_JOB_POOL

View File

@ -168,7 +168,7 @@ namespace libtorrent {
, m_mtu_floor_slab(mtu_floor_size) , m_mtu_floor_slab(mtu_floor_size)
, m_mtu_ceiling_slab(mtu_ceiling_size) , m_mtu_ceiling_slab(mtu_ceiling_size)
{} {}
packet_pool(packet_pool&&) = default; packet_pool(packet_pool&&) = delete;
packet_ptr acquire(int const allocate) packet_ptr acquire(int const allocate)
{ {
@ -183,7 +183,7 @@ namespace libtorrent {
{ {
TORRENT_ASSERT(is_single_thread()); TORRENT_ASSERT(is_single_thread());
if (p.get() == nullptr) return; if (!p) return;
int const allocated = p->allocated; int const allocated = p->allocated;