diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index 6e2efadca..496a1b5d1 100644 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -727,7 +727,7 @@ namespace libtorrent torrent_info const& torrent_file() const { return *m_torrent_file; } - boost::intrusive_ptr get_torrent_copy(); + boost::intrusive_ptr get_torrent_copy(); std::string const& uuid() const { return m_uuid; } void set_uuid(std::string const& s) { m_uuid = s; } diff --git a/include/libtorrent/torrent_handle.hpp b/include/libtorrent/torrent_handle.hpp index 615016abf..db7eba465 100644 --- a/include/libtorrent/torrent_handle.hpp +++ b/include/libtorrent/torrent_handle.hpp @@ -698,13 +698,14 @@ namespace libtorrent // storage contructor function that was passed to add_torrent. storage_interface* get_storage_impl() const; - // Returns a pointer to the torrent_info object associated with this torrent. The - // torrent_info object is a copy of the internal object. If the torrent doesn't - // have metadata, the object being returned will not be fully filled in. - // The torrent may be in a state without metadata only if - // it was started without a .torrent file, e.g. by using the libtorrent extension of - // just supplying a tracker and info-hash. - boost::intrusive_ptr torrent_file() const; + // Returns a pointer to the torrent_info object associated with this + // torrent. The torrent_info object may be a copy of the internal object. + // If the torrent doesn't have metadata, the pointer will not be + // initialized (i.e. a NULL pointer). The torrent may be in a state + // without metadata only if it was started without a .torrent file, e.g. + // by using the libtorrent extension of just supplying a tracker and + // info-hash. + boost::intrusive_ptr torrent_file() const; #ifndef TORRENT_NO_DEPRECATE diff --git a/src/torrent.cpp b/src/torrent.cpp index 411be0860..15b8da353 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -5208,7 +5208,7 @@ namespace libtorrent } } - boost::intrusive_ptr torrent::get_torrent_copy() + boost::intrusive_ptr torrent::get_torrent_copy() { if (!m_torrent_file->is_valid()) return boost::intrusive_ptr(); diff --git a/src/torrent_handle.cpp b/src/torrent_handle.cpp index 14c1a2509..aecef1d3c 100644 --- a/src/torrent_handle.cpp +++ b/src/torrent_handle.cpp @@ -739,9 +739,10 @@ namespace libtorrent return !m_torrent.expired(); } - boost::intrusive_ptr torrent_handle::torrent_file() const + boost::intrusive_ptr torrent_handle::torrent_file() const { - TORRENT_SYNC_CALL_RET(boost::intrusive_ptr, boost::intrusive_ptr(), get_torrent_copy); + TORRENT_SYNC_CALL_RET(boost::intrusive_ptr + , boost::intrusive_ptr(), get_torrent_copy); return r; }