Skip to content

Commit

Permalink
#1899: td: take message by const&
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Sep 20, 2022
1 parent a3417ab commit 15453b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/vt/context/runnable_context/td.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct TD {
* \param[in] msg the message to extract the epoch from
*/
template <typename MsgPtrT>
explicit TD(MsgPtrT msg);
explicit TD(MsgPtrT const& msg);

/**
* \brief During begin \c TD will capture the epoch stack size and push \c ep_
Expand Down
4 changes: 2 additions & 2 deletions src/vt/context/runnable_context/td.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace {
* \return the associated epoch
*/
template <typename MsgPtrT>
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) ?
Expand All @@ -77,7 +77,7 @@ static EpochType extractEpochMsg(MsgPtrT msg) {
} /* end anon namespace */

template <typename MsgPtrT>
/*explicit*/ TD::TD(MsgPtrT msg)
/*explicit*/ TD::TD(MsgPtrT const& msg)
: TD(extractEpochMsg(msg))
{ }

Expand Down

0 comments on commit 15453b3

Please sign in to comment.