From 3c40cacd5b9361007e7dc512456e645179be617f Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Thu, 21 Apr 2016 15:39:53 -0400 Subject: [PATCH] Documentation typos and minor include cleanup (#635) --- include/libtorrent/create_torrent.hpp | 14 ++++++-------- include/libtorrent/extensions.hpp | 6 +++--- include/libtorrent/file_storage.hpp | 4 ++-- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/include/libtorrent/create_torrent.hpp b/include/libtorrent/create_torrent.hpp index ed9d4008d..94dc7823b 100644 --- a/include/libtorrent/create_torrent.hpp +++ b/include/libtorrent/create_torrent.hpp @@ -40,7 +40,6 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/storage.hpp" #include "libtorrent/hasher.hpp" #include "libtorrent/utf8.hpp" -#include "libtorrent/allocator.hpp" #include "libtorrent/file.hpp" // for combine_path etc. #include "libtorrent/aux_/disable_warnings_push.hpp" @@ -49,7 +48,6 @@ POSSIBILITY OF SUCH DAMAGE. #include #include -#include #include #include "libtorrent/aux_/disable_warnings_pop.hpp" @@ -68,7 +66,7 @@ POSSIBILITY OF SUCH DAMAGE. // and set the piece hashes. // 4. The torrent is bencoded into a file or buffer. // -// If there are a lot of files and or deep directoy hierarchies to +// If there are a lot of files and or deep directory hierarchies to // traverse, step one can be time consuming. // // Typically step 3 is by far the most time consuming step, since it @@ -156,7 +154,7 @@ namespace libtorrent // piece_size will be calculated such that the torrent file is roughly 40 kB. // // If a ``pad_size_limit`` is specified (other than -1), any file larger than - // the specified number of bytes will be preceeded by a pad file to align it + // the specified number of bytes will be preceded by a pad file to align it // with the start of a piece. The pad_file_limit is ignored unless the // ``optimize_alignment`` flag is passed. Typically it doesn't make sense // to set this any lower than 4kiB. @@ -267,7 +265,7 @@ namespace libtorrent // Sets and queries the private flag of the torrent. // Torrents with the private flag set ask clients to not use any other - // sources than the tracker for peers, and to not advertize itself publicly, + // sources than the tracker for peers, and to not advertise itself publicly, // apart from the tracker. void set_priv(bool p) { m_private = p; } bool priv() const { return m_private; } @@ -382,17 +380,17 @@ namespace libtorrent } // Adds the file specified by ``path`` to the file_storage object. In case ``path`` - // refers to a diretory, files will be added recursively from the directory. + // refers to a directory, files will be added recursively from the directory. // // If specified, the predicate ``p`` is called once for every file and directory that - // is encountered. files for which ``p`` returns true are added, and directories for + // is encountered. Files for which ``p`` returns true are added, and directories for // which ``p`` returns true are traversed. ``p`` must have the following signature:: // // bool Pred(std::string const& p); // // The path that is passed in to the predicate is the full path of the file or // directory. If no predicate is specified, all files are added, and all directories - // are traveresed. + // are traversed. // // The ".." directory is never traversed. // diff --git a/include/libtorrent/extensions.hpp b/include/libtorrent/extensions.hpp index 911af0c1c..92e4686b1 100644 --- a/include/libtorrent/extensions.hpp +++ b/include/libtorrent/extensions.hpp @@ -63,7 +63,7 @@ POSSIBILITY OF SUCH DAMAGE. // mutex locked. And they are always called from the libtorrent network thread. In // case portions of your plugin are called from other threads, typically the main // thread, you cannot use any of the member functions on the internal structures -// in libtorrent, since those require the mutex to be locked. Futhermore, you would +// in libtorrent, since those require the mutex to be locked. Furthermore, you would // also need to have a mutex on your own shared data within the plugin, to make // sure it is not accessed at the same time from the libtorrent thread (through a // callback). See `boost thread's mutex`_. If you need to send out a message from @@ -71,7 +71,7 @@ POSSIBILITY OF SUCH DAMAGE. // sending in ``tick()``. // // Since the plugin interface gives you easy access to internal structures, it -// is not supported as a stable API. Plugins should be considered spcific to a +// is not supported as a stable API. Plugins should be considered specific to a // specific version of libtorrent. Although, in practice the internals mostly // don't change that dramatically. // @@ -150,7 +150,7 @@ POSSIBILITY OF SUCH DAMAGE. // of simply allocating a new instance as a copy of ``*this`` is all that's // expected. // -// The static category is required for checking wether or not the category +// The static category is required for checking whether or not the category // for a specific alert is enabled or not, without instantiating the alert. // The ``category`` virtual function is the run-time equivalence. // diff --git a/include/libtorrent/file_storage.hpp b/include/libtorrent/file_storage.hpp index 820d962d1..86c860a0a 100644 --- a/include/libtorrent/file_storage.hpp +++ b/include/libtorrent/file_storage.hpp @@ -253,7 +253,7 @@ namespace libtorrent // this file has the executable attribute set. attribute_executable = 4, - // this file is a symbilic link. It should have a link + // this file is a symbolic link. It should have a link // target string associated with it. attribute_symlink = 8 }; @@ -269,7 +269,7 @@ namespace libtorrent // being added. This memory is *borrowed*, i.e. it is the caller's // responsibility to make sure it stays valid throughout the lifetime // of this file_storage object or any copy of it. The same thing applies - // to ``filehash``, wich is an optional pointer to a 20 byte binary + // to ``filehash``, which is an optional pointer to a 20 byte binary // SHA-1 hash of the file. // // if ``filename`` is NULL, the filename from ``path`` is used and not