]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Removed const fields in copyable classes (#5095)
authorHarry Wong <harrywong@live.com>
Fri, 5 Apr 2019 22:16:15 +0000 (15:16 -0700)
committerAdam Retter <adam.retter@googlemail.com>
Fri, 6 Mar 2020 21:22:59 +0000 (22:22 +0100)
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
utilities/persistent_cache/block_cache_tier_file.h

index 2b2c0ef4f1f4a3dae43978dd6e63cd6e0e61ef4a..35975aea4f2964c023acd04c04079955ee63b488 100644 (file)
@@ -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
index e38b6c9a1d3ebb01445f670e5e4b4ef030b1c83d..b7f820b06817c3c8366db7cc878539c8dd022fe5 100644 (file)
@@ -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<void()> 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<void()> callback_;   // Callback on completion
   };
 
   explicit ThreadedWriter(PersistentCacheTier* const cache, const size_t qdepth,