From c406a6b5a143b6209530b4dfdc214ce01d53c284 Mon Sep 17 00:00:00 2001 From: Harry Wong Date: Sat, 23 Mar 2019 00:26:17 +0800 Subject: [PATCH 1/2] Removed const fields in copyable classes This fixes the error in Clang-8: error: explicitly defaulted copy assignment operator is implicitly deleted [-Werror,-Wdefaulted-function-deleted] --- utilities/persistent_cache/block_cache_tier.h | 2 +- utilities/persistent_cache/block_cache_tier_file.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utilities/persistent_cache/block_cache_tier.h b/utilities/persistent_cache/block_cache_tier.h index 2b2c0ef4f1f..35975aea4f2 100644 --- a/utilities/persistent_cache/block_cache_tier.h +++ b/utilities/persistent_cache/block_cache_tier.h @@ -100,7 +100,7 @@ class BlockCacheTier : public PersistentCacheTier { std::string key_; std::string data_; - const bool signal_ = false; // signal to request processing thread to exit + bool signal_ = false; // signal to request processing thread to exit }; // entry point for insert thread diff --git a/utilities/persistent_cache/block_cache_tier_file.h b/utilities/persistent_cache/block_cache_tier_file.h index e38b6c9a1d3..9971a30a876 100644 --- a/utilities/persistent_cache/block_cache_tier_file.h +++ b/utilities/persistent_cache/block_cache_tier_file.h @@ -266,7 +266,7 @@ class ThreadedWriter : public Writer { size_t Size() const { return sizeof(IO); } WritableFile* file_ = nullptr; // File to write to - CacheWriteBuffer* const buf_ = nullptr; // buffer to write + CacheWriteBuffer* buf_ = nullptr; // buffer to write uint64_t file_off_ = 0; // file offset bool signal_ = false; // signal to exit thread loop std::function callback_; // Callback on completion From 5f5d56203d322bcb3e55c55322f47df8e37d97d8 Mon Sep 17 00:00:00 2001 From: Harry Wong Date: Sat, 23 Mar 2019 00:48:55 +0800 Subject: [PATCH 2/2] Align comments --- utilities/persistent_cache/block_cache_tier_file.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utilities/persistent_cache/block_cache_tier_file.h b/utilities/persistent_cache/block_cache_tier_file.h index 9971a30a876..b7f820b0681 100644 --- a/utilities/persistent_cache/block_cache_tier_file.h +++ b/utilities/persistent_cache/block_cache_tier_file.h @@ -265,11 +265,11 @@ class ThreadedWriter : public Writer { IO& operator=(const IO&) = default; size_t Size() const { return sizeof(IO); } - WritableFile* file_ = nullptr; // File to write to + WritableFile* file_ = nullptr; // File to write to CacheWriteBuffer* buf_ = nullptr; // buffer to write - uint64_t file_off_ = 0; // file offset - bool signal_ = false; // signal to exit thread loop - std::function callback_; // Callback on completion + uint64_t file_off_ = 0; // file offset + bool signal_ = false; // signal to exit thread loop + std::function callback_; // Callback on completion }; explicit ThreadedWriter(PersistentCacheTier* const cache, const size_t qdepth,