From d34973def96aacd03424e62cda52f3b0a98aebf8 Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Fri, 20 Apr 2018 09:17:21 -0400 Subject: [PATCH] minor code cleanup in disk buffer code --- include/libtorrent/disk_buffer_holder.hpp | 6 +----- include/libtorrent/disk_buffer_pool.hpp | 1 - src/disk_buffer_holder.cpp | 2 -- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include/libtorrent/disk_buffer_holder.hpp b/include/libtorrent/disk_buffer_holder.hpp index b03bbe16d..e133e514e 100644 --- a/include/libtorrent/disk_buffer_holder.hpp +++ b/include/libtorrent/disk_buffer_holder.hpp @@ -42,16 +42,12 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { - struct disk_io_thread; - struct disk_observer; - struct disk_buffer_holder; - struct TORRENT_EXTRA_EXPORT buffer_allocator_interface { virtual void free_disk_buffer(char* b) = 0; virtual void reclaim_blocks(span refs) = 0; protected: - ~buffer_allocator_interface() {} + ~buffer_allocator_interface() = default; }; // The disk buffer holder acts like a ``unique_ptr`` that frees a disk buffer diff --git a/include/libtorrent/disk_buffer_pool.hpp b/include/libtorrent/disk_buffer_pool.hpp index fda02a3a3..6209f621d 100644 --- a/include/libtorrent/disk_buffer_pool.hpp +++ b/include/libtorrent/disk_buffer_pool.hpp @@ -50,7 +50,6 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { namespace aux { struct session_settings; } - class alert; struct disk_observer; struct TORRENT_EXTRA_EXPORT disk_buffer_pool diff --git a/src/disk_buffer_holder.cpp b/src/disk_buffer_holder.cpp index bb95d7f79..501c525d0 100644 --- a/src/disk_buffer_holder.cpp +++ b/src/disk_buffer_holder.cpp @@ -32,7 +32,6 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/disk_buffer_holder.hpp" #include "libtorrent/storage.hpp" // for storage_interface -#include "libtorrent/aux_/block_cache_reference.hpp" namespace libtorrent { @@ -92,4 +91,3 @@ namespace libtorrent { disk_buffer_holder::~disk_buffer_holder() { reset(); } } -