From 15453b3284af6796c39edcc70a748de8a8ace388 Mon Sep 17 00:00:00 2001 From: Jonathan Lifflander Date: Wed, 14 Sep 2022 11:22:04 -0700 Subject: [PATCH] #1899: td: take message by const& --- src/vt/context/runnable_context/td.h | 2 +- src/vt/context/runnable_context/td.impl.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vt/context/runnable_context/td.h b/src/vt/context/runnable_context/td.h index bd3c4ab494..8a0cf0f913 100644 --- a/src/vt/context/runnable_context/td.h +++ b/src/vt/context/runnable_context/td.h @@ -78,7 +78,7 @@ struct TD { * \param[in] msg the message to extract the epoch from */ template - explicit TD(MsgPtrT msg); + explicit TD(MsgPtrT const& msg); /** * \brief During begin \c TD will capture the epoch stack size and push \c ep_ diff --git a/src/vt/context/runnable_context/td.impl.h b/src/vt/context/runnable_context/td.impl.h index e456ffd713..0992a18b54 100644 --- a/src/vt/context/runnable_context/td.impl.h +++ b/src/vt/context/runnable_context/td.impl.h @@ -60,7 +60,7 @@ namespace { * \return the associated epoch */ template -static EpochType extractEpochMsg(MsgPtrT msg) { +static EpochType extractEpochMsg(MsgPtrT const& msg) { auto const is_term = envelopeIsTerm(msg->env); if (not is_term) { auto ep_ = envelopeIsEpochType(msg->env) ? @@ -77,7 +77,7 @@ static EpochType extractEpochMsg(MsgPtrT msg) { } /* end anon namespace */ template -/*explicit*/ TD::TD(MsgPtrT msg) +/*explicit*/ TD::TD(MsgPtrT const& msg) : TD(extractEpochMsg(msg)) { }