diff --git a/include/libtorrent/bdecode.hpp b/include/libtorrent/bdecode.hpp index 35d3c2bea..791479cd6 100644 --- a/include/libtorrent/bdecode.hpp +++ b/include/libtorrent/bdecode.hpp @@ -104,7 +104,7 @@ namespace bdecode_errors { // libtorrent uses boost.system's ``error_code`` class to represent // errors. libtorrent has its own error category get_bdecode_category() - // whith the error codes defined by error_code_enum. + // with the error codes defined by error_code_enum. enum error_code_enum { // Not an error @@ -233,7 +233,7 @@ struct bdecode_token // Sometimes it's important to get a non-owning reference to the root node ( // to be able to copy it as a reference for instance). For that, use the -// non_owninig() member function. +// non_owning() member function. // // There are 5 different types of nodes, see type_t. struct TORRENT_EXPORT bdecode_node @@ -250,7 +250,7 @@ struct TORRENT_EXPORT bdecode_node bdecode_node(bdecode_node const&); bdecode_node& operator=(bdecode_node const&); - // the dypes of bdecoded nodes + // the types of bdecoded nodes enum type_t { // uninitialized or default constructed. This is also used diff --git a/include/libtorrent/kademlia/direct_request.hpp b/include/libtorrent/kademlia/direct_request.hpp index b145193e8..7c5945d86 100644 --- a/include/libtorrent/kademlia/direct_request.hpp +++ b/include/libtorrent/kademlia/direct_request.hpp @@ -30,8 +30,8 @@ POSSIBILITY OF SUCH DAMAGE. */ -#ifndef LIBTORRENT_DIRECT_REQUEST_HPP -#define LIBTORRENT_DIRECT_REQUEST_HPP +#ifndef TORRENT_DIRECT_REQUEST_HPP +#define TORRENT_DIRECT_REQUEST_HPP #include #include @@ -42,9 +42,11 @@ namespace libtorrent { namespace dht struct direct_traversal : traversal_algorithm { + typedef boost::function message_callback; + direct_traversal(node& node , node_id target - , boost::function cb) + , message_callback cb) : traversal_algorithm(node, target) , m_cb(cb) {} @@ -62,7 +64,7 @@ struct direct_traversal : traversal_algorithm } protected: - boost::function m_cb; + message_callback m_cb; }; struct direct_observer : observer @@ -88,6 +90,6 @@ struct direct_observer : observer } }; -} } // namespace libtorrent::dht +}} // namespace libtorrent::dht -#endif +#endif //TORRENT_DIRECT_REQUEST_HPP