From ffef1396eb56f938d45ae9f4be7b6d88ea7adca1 Mon Sep 17 00:00:00 2001 From: SiKu Date: Fri, 17 Feb 2023 11:33:00 +0800 Subject: [PATCH] Update curvefs/src/client/warmup/warmup_manager.h fix Co-authored-by: Hanqing Wu <10327590+wu-hanqing@users.noreply.github.com> Signed-off-by: SiKu --- curvefs/src/client/warmup/warmup_manager.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/curvefs/src/client/warmup/warmup_manager.h b/curvefs/src/client/warmup/warmup_manager.h index 10cfdc60e0..7f68686a08 100644 --- a/curvefs/src/client/warmup/warmup_manager.h +++ b/curvefs/src/client/warmup/warmup_manager.h @@ -112,11 +112,10 @@ class WarmupProgress { total_ += add; } - WarmupProgress &&operator=(const WarmupProgress &wp) { - WarmupProgress ret; - ret.total_ = wp.total_; - ret.finished_ = wp.finished_; - return std::move(ret); + WarmupProgress& operator=(const WarmupProgress &wp) { + total_ = wp.total_; + finished_ = wp.finished_; + return this; } void FinishedPlusOne() {