Use plain pointer to point to deepest section in CumulativeReporterBase

Part of #2089
This commit is contained in:
Martin Hořeňovský 2020-11-11 21:25:16 +01:00
parent 4f14922aa3
commit 79c1bf9301
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
2 changed files with 4 additions and 3 deletions

View File

@ -58,8 +58,9 @@ namespace Catch {
node = *it;
}
}
m_sectionStack.push_back( node );
m_deepestSection = std::move( node );
m_deepestSection = node.get();
m_sectionStack.push_back( std::move(node) );
}
bool CumulativeReporterBase::assertionEnded(

View File

@ -81,7 +81,7 @@ namespace Catch {
std::vector<Detail::unique_ptr<TestRunNode>> m_testRuns;
std::shared_ptr<SectionNode> m_rootSection;
std::shared_ptr<SectionNode> m_deepestSection;
SectionNode* m_deepestSection = nullptr;
std::vector<std::shared_ptr<SectionNode>> m_sectionStack;
};