From 3ba7f05bb9f1d66b0625c1c8d117381d5a44b08f Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 30 May 2005 22:50:54 +0000 Subject: [PATCH] *** empty log message *** --- examples/client_test.cpp | 2 +- src/policy.cpp | 1 + src/torrent_handle.cpp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index e6859b1da..ae06de735 100755 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -208,7 +208,7 @@ std::string progress_bar(float progress, int width) std::vector bar; bar.reserve(width); - int progress_chars = progress * width + .5f; + int progress_chars = static_cast(progress * width + .5f); std::fill_n(std::back_inserter(bar), progress_chars, '#'); std::fill_n(std::back_inserter(bar), width - progress_chars, '-'); return std::string(bar.begin(), bar.end()); diff --git a/src/policy.cpp b/src/policy.cpp index 6b19bcd83..8b89797a9 100755 --- a/src/policy.cpp +++ b/src/policy.cpp @@ -641,6 +641,7 @@ namespace libtorrent while (num_connected_peers > max_connections) { bool ret = disconnect_one_peer(); + (void)ret; assert(ret); --num_connected_peers; } diff --git a/src/torrent_handle.cpp b/src/torrent_handle.cpp index 43191399a..ef5dc5ef3 100755 --- a/src/torrent_handle.cpp +++ b/src/torrent_handle.cpp @@ -93,7 +93,6 @@ namespace libtorrent if (chk) { boost::mutex::scoped_lock l(chk->m_mutex); - detail::piece_checker_data* d = chk->find_torrent(hash); if (d != 0) return f(*d->torrent_ptr); } @@ -104,7 +103,7 @@ namespace libtorrent if (t != 0) return f(*t); } - throw_invalid_handle(); + throw invalid_handle(); } } @@ -254,6 +253,7 @@ namespace libtorrent } throw_invalid_handle(); + return torrent_status(); } void torrent_handle::filter_piece(int index, bool filter)