diff --git a/common/workunit/workunit.cpp b/common/workunit/workunit.cpp index 8e42207db59..112caeb9a7e 100644 --- a/common/workunit/workunit.cpp +++ b/common/workunit/workunit.cpp @@ -2708,7 +2708,7 @@ void StatisticsAggregator::recordStats(IStatisticCollection * sourceStats, unsig verifyex(graphScopeId.setScopeText(graphName)); StatsScopeId wfScopeId(SSTworkflow, wfid); StatsScopeId sgScopeId(SSTsubgraph, sgId); - statsCollection->recordStats(mapping, sourceStats, {wfScopeId, graphScopeId, sgScopeId}); + statsCollection->recordStats(mapping, sourceStats, {std::move(wfScopeId), std::move(graphScopeId), std::move(sgScopeId)}); } // Recalculate aggregates and then write the aggregates to global stats (dali) diff --git a/system/jlib/jstats.cpp b/system/jlib/jstats.cpp index bba06151c6f..9daa4b671cc 100644 --- a/system/jlib/jstats.cpp +++ b/system/jlib/jstats.cpp @@ -2242,7 +2242,7 @@ class CStatisticCollection : public CInterfaceOf ++scopeItem; } - CStatisticCollection * tgtScopeCollection = ensureSubScopePath(path); + CStatisticCollection * tgtScopeCollection = ensureSubScopePath(std::move(path)); bool wasUpdated = false; // More efficient to iterate over stats rather than mapping... ForEachItemIn(i, curSrcCollection->stats)