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() {