Skip to content

Commit c9dd996

Browse files
committed
co/InvokeTask: pass std::exception_ptr as rvalue reference
1 parent c679cf0 commit c9dd996

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libcommon

src/cron/Workplace.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ class CronWorkplace::Running final
9393
std::string_view partition_name,
9494
const char *listener_tag);
9595

96-
void OnCompletion(std::exception_ptr error) noexcept {
96+
void OnCompletion(std::exception_ptr &&error) noexcept {
9797
if (error) {
9898
logger(1, error);
99-
SetResult(CronResult::Error(error));
99+
SetResult(CronResult::Error(std::move(error)));
100100
}
101101

102102
workplace.OnCompletion(*this);

0 commit comments

Comments
 (0)