Capturing with = is error prone and causes compile warning.
And it is wrong:
* cursor should be captured by reference
* mutable keyword is unnecessary
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
(cherry picked from commit
116c5b4894193124cde485091b9627ccf3cf73a0)
}
TRACE("reading record group header block {}~4096", start);
return read(start, block_size
- ).safe_then([=](bufferptr bptr) mutable
+ ).safe_then([this, FNAME, nonce, block_size, &cursor](bufferptr bptr)
-> read_validate_record_metadata_ret {
bufferlist bl;
bl.append(bptr);