diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index 94782d5bc..c218fb57f 100755 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -154,7 +154,7 @@ namespace libtorrent stat statistics() const { return m_stat; } size_type bytes_left() const; - boost::tuple bytes_done() const; + boost::tuples::tuple bytes_done() const; void pause(); void resume(); diff --git a/src/torrent.cpp b/src/torrent.cpp index c70dca163..993e2c5e0 100755 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -66,6 +66,9 @@ POSSIBILITY OF SUCH DAMAGE. using namespace libtorrent; using namespace boost::posix_time; +using boost::tuples::tuple; +using boost::tuples::get; +using boost::tuples::make_tuple; // PROFILING CODE @@ -479,20 +482,20 @@ namespace libtorrent // if we don't have the metadata yet, we // cannot tell how big the torrent is. if (!valid_metadata()) return -1; - return m_torrent_file.total_size() - boost::get<0>(bytes_done()); + return m_torrent_file.total_size() - get<0>(bytes_done()); } // the first value is the total number of bytes downloaded // the second value is the number of bytes of those that haven't // been filtered as not wanted we have downloaded - boost::tuple torrent::bytes_done() const + tuple torrent::bytes_done() const { - if (!valid_metadata()) return 0; + if (!valid_metadata()) return tuple(0,0); assert(m_picker.get()); if (m_torrent_file.num_pieces() == 0) - return boost::tuple(0,0); + return tuple(0,0); const int last_piece = m_torrent_file.num_pieces() - 1; size_type wanted_done = (m_num_pieces - m_picker->num_have_filtered()) @@ -578,7 +581,7 @@ namespace libtorrent if (!m_picker->is_filtered(i->first.piece_index)) wanted_done += i->second; } - return boost::make_tuple(total_done, wanted_done); + return make_tuple(total_done, wanted_done); } void torrent::piece_failed(int index) diff --git a/src/tracker_manager.cpp b/src/tracker_manager.cpp index ecaa4409b..f83e2517d 100755 --- a/src/tracker_manager.cpp +++ b/src/tracker_manager.cpp @@ -47,6 +47,8 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/torrent.hpp" using namespace libtorrent; +using boost::tuples::make_tuple; +using boost::tuples::tuple; namespace { @@ -366,7 +368,7 @@ namespace libtorrent namespace { - boost::tuple + tuple parse_url_components(std::string url) { std::string hostname; // hostname only @@ -413,7 +415,7 @@ namespace libtorrent } start = end; - return boost::make_tuple(protocol, hostname, port + return make_tuple(protocol, hostname, port , std::string(start, url.end())); } }