From 305d00b3ff2423896e10472b8ce07fa17c7a3206 Mon Sep 17 00:00:00 2001 From: Jonathan Lifflander Date: Wed, 28 Sep 2022 11:48:18 -0700 Subject: [PATCH] #1983: runnable: take action by && --- src/vt/runnable/runnable.cc | 2 +- src/vt/runnable/runnable.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vt/runnable/runnable.cc b/src/vt/runnable/runnable.cc index 10ac518088..415dc293a4 100644 --- a/src/vt/runnable/runnable.cc +++ b/src/vt/runnable/runnable.cc @@ -101,7 +101,7 @@ void RunnableNew::setupHandlerElement( obj_ = elm; } -void RunnableNew::runLambda(ActionType action) { +void RunnableNew::runLambda(ActionType&& action) { begin(); action(); end(); diff --git a/src/vt/runnable/runnable.h b/src/vt/runnable/runnable.h index c235b7909b..7d953a7170 100644 --- a/src/vt/runnable/runnable.h +++ b/src/vt/runnable/runnable.h @@ -231,7 +231,7 @@ struct RunnableNew { /** * \brief Run the task as a lambda! */ - void runLambda(ActionType action); + void runLambda(ActionType&& action); #if vt_check_enabled(fcontext) /**