From 218d33c545ed5e4e6e7c88821e805030e6ca0b09 Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Wed, 20 Jan 2016 20:48:23 -0500 Subject: [PATCH] Documentation typos and minor cleanup --- include/libtorrent/settings_pack.hpp | 2 +- include/libtorrent/sha1_hash.hpp | 2 +- src/block_cache.cpp | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/libtorrent/settings_pack.hpp b/include/libtorrent/settings_pack.hpp index 9531ecb9c..e10c779d2 100644 --- a/include/libtorrent/settings_pack.hpp +++ b/include/libtorrent/settings_pack.hpp @@ -451,7 +451,7 @@ namespace libtorrent // ``no_recheck_incomplete_resume`` determines if the storage should // check the whole files when resume data is incomplete or missing or // whether it should simply assume we don't have any of the data. By - // default, this is determined by the existance of any of the files. + // default, this is determined by the existence of any of the files. // By setting this setting to true, the files won't be checked, but // will go straight to download mode. no_recheck_incomplete_resume, diff --git a/include/libtorrent/sha1_hash.hpp b/include/libtorrent/sha1_hash.hpp index b1d53b7a5..57e7d4140 100644 --- a/include/libtorrent/sha1_hash.hpp +++ b/include/libtorrent/sha1_hash.hpp @@ -73,7 +73,7 @@ namespace libtorrent // the number of bytes of the number static const int size = number_size * sizeof(boost::uint32_t); - // constructs an all-sero sha1-hash + // constructs an all-zero sha1-hash sha1_hash() { clear(); } // returns an all-F sha1-hash. i.e. the maximum value diff --git a/src/block_cache.cpp b/src/block_cache.cpp index d68964a10..b51f9a923 100644 --- a/src/block_cache.cpp +++ b/src/block_cache.cpp @@ -70,7 +70,7 @@ const vm_purgable_t vm_purgable_nonvolatile = VM_PURGABLE_NONVOLATILE; See slides: http://www-vlsi.stanford.edu/smart_memories/protected/meetings/spring2004/arc-fast.pdf This cache has a few modifications to make it fit the bittorrent use - case better. It has a few more lists and it deferres the eviction + case better. It has a few more lists and it defers the eviction of pieces. read_lru1 @@ -437,7 +437,7 @@ void block_cache::cache_hit(cached_piece_entry* p, void* requester, bool volatil TORRENT_ASSERT(p); TORRENT_ASSERT(p->in_use); - // move the piece into this queue. Whenever we have a cahe + // move the piece into this queue. Whenever we have a cache // hit, we move the piece into the lru2 queue (i.e. the most // frequently used piece). However, we only do that if the // requester is different than the last one. This is to @@ -1837,8 +1837,6 @@ bool block_cache::maybe_free_piece(cached_piece_entry* pe) || !pe->jobs.empty()) return false; - boost::shared_ptr s = pe->storage; - DLOG(stderr, "[%p] block_cache maybe_free_piece " "piece: %d refcount: %d marked_for_deletion: %d\n" , static_cast(this)