Merge pull request #579 from arvidn/fix-warnings-1.1
fix some clang build warnings
This commit is contained in:
commit
0020900a58
|
@ -299,62 +299,62 @@ namespace libtorrent
|
|||
|
||||
void async_read(piece_manager* storage, peer_request const& r
|
||||
, boost::function<void(disk_io_job const*)> const& handler, void* requester
|
||||
, int flags = 0);
|
||||
, int flags = 0) TORRENT_OVERRIDE;
|
||||
void async_write(piece_manager* storage, peer_request const& r
|
||||
, disk_buffer_holder& buffer
|
||||
, boost::function<void(disk_io_job const*)> const& handler
|
||||
, int flags = 0);
|
||||
, int flags = 0) TORRENT_OVERRIDE;
|
||||
void async_hash(piece_manager* storage, int piece, int flags
|
||||
, boost::function<void(disk_io_job const*)> const& handler, void* requester);
|
||||
, boost::function<void(disk_io_job const*)> const& handler, void* requester) TORRENT_OVERRIDE;
|
||||
void async_move_storage(piece_manager* storage, std::string const& p, int flags
|
||||
, boost::function<void(disk_io_job const*)> const& handler);
|
||||
, boost::function<void(disk_io_job const*)> const& handler) TORRENT_OVERRIDE;
|
||||
void async_release_files(piece_manager* storage
|
||||
, boost::function<void(disk_io_job const*)> const& handler
|
||||
= boost::function<void(disk_io_job const*)>());
|
||||
= boost::function<void(disk_io_job const*)>()) TORRENT_OVERRIDE;
|
||||
void async_delete_files(piece_manager* storage, int options
|
||||
, boost::function<void(disk_io_job const*)> const& handler);
|
||||
, boost::function<void(disk_io_job const*)> const& handler) TORRENT_OVERRIDE;
|
||||
void async_check_fastresume(piece_manager* storage
|
||||
, bdecode_node const* resume_data
|
||||
, std::vector<std::string>& links
|
||||
, boost::function<void(disk_io_job const*)> const& handler);
|
||||
, boost::function<void(disk_io_job const*)> const& handler) TORRENT_OVERRIDE;
|
||||
void async_save_resume_data(piece_manager* storage
|
||||
, boost::function<void(disk_io_job const*)> const& handler);
|
||||
, boost::function<void(disk_io_job const*)> const& handler) TORRENT_OVERRIDE;
|
||||
void async_rename_file(piece_manager* storage, int index, std::string const& name
|
||||
, boost::function<void(disk_io_job const*)> const& handler);
|
||||
, boost::function<void(disk_io_job const*)> const& handler) TORRENT_OVERRIDE;
|
||||
void async_stop_torrent(piece_manager* storage
|
||||
, boost::function<void(disk_io_job const*)> const& handler);
|
||||
, boost::function<void(disk_io_job const*)> const& handler) TORRENT_OVERRIDE;
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
void async_cache_piece(piece_manager* storage, int piece
|
||||
, boost::function<void(disk_io_job const*)> const& handler);
|
||||
, boost::function<void(disk_io_job const*)> const& handler) TORRENT_OVERRIDE;
|
||||
void async_finalize_file(piece_manager* storage, int file
|
||||
, boost::function<void(disk_io_job const*)> const& handler
|
||||
= boost::function<void(disk_io_job const*)>());
|
||||
= boost::function<void(disk_io_job const*)>()) TORRENT_OVERRIDE;
|
||||
#endif
|
||||
void async_flush_piece(piece_manager* storage, int piece
|
||||
, boost::function<void(disk_io_job const*)> const& handler
|
||||
= boost::function<void(disk_io_job const*)>());
|
||||
= boost::function<void(disk_io_job const*)>()) TORRENT_OVERRIDE;
|
||||
void async_set_file_priority(piece_manager* storage
|
||||
, std::vector<boost::uint8_t> const& prio
|
||||
, boost::function<void(disk_io_job const*)> const& handler);
|
||||
, boost::function<void(disk_io_job const*)> const& handler) TORRENT_OVERRIDE;
|
||||
void async_load_torrent(add_torrent_params* params
|
||||
, boost::function<void(disk_io_job const*)> const& handler);
|
||||
, boost::function<void(disk_io_job const*)> const& handler) TORRENT_OVERRIDE;
|
||||
void async_tick_torrent(piece_manager* storage
|
||||
, boost::function<void(disk_io_job const*)> const& handler);
|
||||
, boost::function<void(disk_io_job const*)> const& handler) TORRENT_OVERRIDE;
|
||||
|
||||
void clear_read_cache(piece_manager* storage);
|
||||
void clear_read_cache(piece_manager* storage) TORRENT_OVERRIDE;
|
||||
void async_clear_piece(piece_manager* storage, int index
|
||||
, boost::function<void(disk_io_job const*)> const& handler);
|
||||
, boost::function<void(disk_io_job const*)> const& handler) TORRENT_OVERRIDE;
|
||||
// this is not asynchronous and requires that the piece does not
|
||||
// have any pending buffers. It's meant to be used for pieces that
|
||||
// were just read and hashed and failed the hash check.
|
||||
// there should be no read-operations left, and all buffers should
|
||||
// be discardable
|
||||
void clear_piece(piece_manager* storage, int index);
|
||||
void clear_piece(piece_manager* storage, int index) TORRENT_OVERRIDE;
|
||||
|
||||
// implements buffer_allocator_interface
|
||||
void reclaim_block(block_cache_reference ref);
|
||||
void free_disk_buffer(char* buf) { m_disk_cache.free_buffer(buf); }
|
||||
char* allocate_disk_buffer(char const* category)
|
||||
void reclaim_block(block_cache_reference ref) TORRENT_OVERRIDE;
|
||||
void free_disk_buffer(char* buf) TORRENT_OVERRIDE { m_disk_cache.free_buffer(buf); }
|
||||
char* allocate_disk_buffer(char const* category) TORRENT_OVERRIDE
|
||||
{
|
||||
bool exceed = false;
|
||||
return allocate_disk_buffer(exceed, boost::shared_ptr<disk_observer>(), category);
|
||||
|
@ -367,9 +367,9 @@ namespace libtorrent
|
|||
bool exceeded_cache_use() const
|
||||
{ return m_disk_cache.exceeded_max_size(); }
|
||||
|
||||
void update_stats_counters(counters& c) const;
|
||||
void update_stats_counters(counters& c) const TORRENT_OVERRIDE;
|
||||
void get_cache_info(cache_status* ret, bool no_pieces = true
|
||||
, piece_manager const* storage = 0) const;
|
||||
, piece_manager const* storage = 0) const TORRENT_OVERRIDE;
|
||||
|
||||
// this submits all queued up jobs to the thread
|
||||
void submit_jobs();
|
||||
|
@ -377,7 +377,8 @@ namespace libtorrent
|
|||
block_cache* cache() { return &m_disk_cache; }
|
||||
|
||||
#if TORRENT_USE_ASSERTS
|
||||
bool is_disk_buffer(char* buffer) const { return m_disk_cache.is_disk_buffer(buffer); }
|
||||
bool is_disk_buffer(char* buffer) const TORRENT_OVERRIDE
|
||||
{ return m_disk_cache.is_disk_buffer(buffer); }
|
||||
#endif
|
||||
|
||||
enum thread_type_t {
|
||||
|
@ -388,7 +389,7 @@ namespace libtorrent
|
|||
void thread_fun(int thread_id, thread_type_t type
|
||||
, boost::shared_ptr<io_service::work> w);
|
||||
|
||||
file_pool& files() { return m_file_pool; }
|
||||
virtual file_pool& files() TORRENT_OVERRIDE { return m_file_pool; }
|
||||
|
||||
io_service& get_io_service() { return m_ios; }
|
||||
|
||||
|
|
|
@ -55,8 +55,6 @@ static const UTF32 halfMask = 0x3FFUL;
|
|||
#define UNI_SUR_HIGH_END (UTF32)0xDBFF
|
||||
#define UNI_SUR_LOW_START (UTF32)0xDC00
|
||||
#define UNI_SUR_LOW_END (UTF32)0xDFFF
|
||||
#define false 0
|
||||
#define true 1
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -33,7 +33,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "libtorrent/resolve_links.hpp"
|
||||
|
||||
#include "libtorrent/torrent_info.hpp"
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||
|
||||
namespace libtorrent
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue