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..810879112c5 100644 --- a/system/jlib/jstats.cpp +++ b/system/jlib/jstats.cpp @@ -1908,7 +1908,7 @@ class CStatisticCollection : public CInterfaceOf { friend class CollectionHashTable; - CStatisticCollection * ensureSubScopePath(std::initializer_list path) + CStatisticCollection * ensureSubScopePath(std::initializer_list & path) { CStatisticCollection * curScope = this; for (const auto & scopeItem: path)