mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-19 01:07:00 -04:00
chore(block_cache): add clang-tidy annotations for not moving rvalues
This commit is contained in:
parent
b901d17960
commit
a2fb7a9993
@ -91,7 +91,9 @@ class lru_sequential_access_detector : public sequential_access_detector {
|
|||||||
|
|
||||||
void touch(size_t block_no) override {
|
void touch(size_t block_no) override {
|
||||||
std::lock_guard lock(mx_);
|
std::lock_guard lock(mx_);
|
||||||
lru_.set(block_no, block_no, true,
|
lru_.set(
|
||||||
|
block_no, block_no, true,
|
||||||
|
// NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved)
|
||||||
[this](size_t, size_t&&) { is_sequential_.reset(); });
|
[this](size_t, size_t&&) { is_sequential_.reset(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -330,6 +332,7 @@ class block_cache_ final : public block_cache::impl {
|
|||||||
cache_.~lru_type();
|
cache_.~lru_type();
|
||||||
new (&cache_) lru_type(max_blocks);
|
new (&cache_) lru_type(max_blocks);
|
||||||
cache_.setPruneHook(
|
cache_.setPruneHook(
|
||||||
|
// NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved)
|
||||||
[this](size_t block_no, std::shared_ptr<cached_block>&& block) {
|
[this](size_t block_no, std::shared_ptr<cached_block>&& block) {
|
||||||
LOG_DEBUG << "evicting block " << block_no
|
LOG_DEBUG << "evicting block " << block_no
|
||||||
<< " from cache, decompression ratio = "
|
<< " from cache, decompression ratio = "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user