From 3598e1a9a9cde8ea073c68ab297fb231506eceda Mon Sep 17 00:00:00 2001 From: Harry Wong Date: Fri, 5 Apr 2019 15:16:15 -0700 Subject: [PATCH] Removed const fields in copyable classes (#5095) Summary: This fixed the compile error in Clang-8: ``` error: explicitly defaulted copy assignment operator is implicitly deleted [-Werror,-Wdefaulted-function-deleted] ``` Pull Request resolved: https://github.com/facebook/rocksdb/pull/5095 Differential Revision: D14811961 Pulled By: riversand963 fbshipit-source-id: d935d1f85a4e8694dca10033fb5af92d8777eca0 --- utilities/persistent_cache/block_cache_tier.h | 2 +- utilities/persistent_cache/block_cache_tier_file.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/utilities/persistent_cache/block_cache_tier.h b/utilities/persistent_cache/block_cache_tier.h index 2b2c0ef4f..35975aea4 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 e38b6c9a1..b7f820b06 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 - CacheWriteBuffer* const 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 + 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 }; explicit ThreadedWriter(PersistentCacheTier* const cache, const size_t qdepth,