diff --git a/src/catch2/reporters/catch_reporter_cumulative_base.cpp b/src/catch2/reporters/catch_reporter_cumulative_base.cpp index 740b1a32..67154d95 100644 --- a/src/catch2/reporters/catch_reporter_cumulative_base.cpp +++ b/src/catch2/reporters/catch_reporter_cumulative_base.cpp @@ -103,9 +103,8 @@ namespace Catch { } void CumulativeReporterBase::testRunEnded( TestRunStats const& testRunStats ) { - auto node = Detail::make_unique( testRunStats ); - node->children.swap( m_testGroups ); - m_testRuns.push_back( std::move(node) ); + m_testRuns.emplace_back( testRunStats ); + m_testRuns.back().children.swap( m_testGroups ); testRunEndedCumulative(); } diff --git a/src/catch2/reporters/catch_reporter_cumulative_base.hpp b/src/catch2/reporters/catch_reporter_cumulative_base.hpp index 0df65aea..26c62ef5 100644 --- a/src/catch2/reporters/catch_reporter_cumulative_base.hpp +++ b/src/catch2/reporters/catch_reporter_cumulative_base.hpp @@ -73,7 +73,7 @@ namespace Catch { std::vector> m_testCases; std::vector> m_testGroups; - std::vector> m_testRuns; + std::vector m_testRuns; std::shared_ptr m_rootSection; SectionNode* m_deepestSection = nullptr;