diff --git a/src/disk_io_thread.cpp b/src/disk_io_thread.cpp index f01ac4628..1da911bc5 100644 --- a/src/disk_io_thread.cpp +++ b/src/disk_io_thread.cpp @@ -663,14 +663,14 @@ namespace libtorrent { DLOG("]\n"); #endif - open_mode_t const file_flags = m_settings.get_bool(settings_pack::coalesce_writes) + open_mode_t const file_flags = m_settings.get_bool(settings_pack::coalesce_writes) ? open_mode_t::coalesce_buffers : open_mode_t::none; // issue the actual write operation auto iov_start = iov; std::size_t flushing_start = 0; piece_index_t const piece = pe->piece; - int const blocks_in_piece = pe->blocks_in_piece; + int const blocks_in_piece = int(pe->blocks_in_piece); bool failed = false; std::size_t const n_blocks = aux::numeric_cast(num_blocks); for (std::size_t i = 1; i <= n_blocks; ++i) diff --git a/src/part_file.cpp b/src/part_file.cpp index 1d5f9c7f6..43eddef2f 100644 --- a/src/part_file.cpp +++ b/src/part_file.cpp @@ -173,7 +173,7 @@ namespace libtorrent { } int part_file::writev(span bufs, piece_index_t const piece - , int offset, error_code& ec) + , int const offset, error_code& ec) { TORRENT_ASSERT(offset >= 0); std::unique_lock l(m_mutex); @@ -236,7 +236,7 @@ namespace libtorrent { } } - void part_file::free_piece(piece_index_t piece) + void part_file::free_piece(piece_index_t const piece) { std::lock_guard l(m_mutex);