Skip to content

Commit

Permalink
Removed const fields in copyable classes (facebook#5095)
Browse files Browse the repository at this point in the history
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: facebook#5095

Differential Revision: D14811961

Pulled By: riversand963

fbshipit-source-id: d935d1f85a4e8694dca10033fb5af92d8777eca0
  • Loading branch information
harrywong authored and adamretter committed Mar 6, 2020
1 parent d07167c commit 3598e1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion utilities/persistent_cache/block_cache_tier.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions utilities/persistent_cache/block_cache_tier_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3598e1a

Please sign in to comment.