ITracker::parent returns pointer not reference

We were already using it mostly to get pointers rather than
references, so this makes it make more sense.
This commit is contained in:
Martin Hořeňovský
2021-06-18 10:34:55 +02:00
parent 4ce8a23edd
commit a14d67cace
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ namespace Catch {
// without it, the code above creates 5 nested generators.
if ( currentTracker.nameAndLocation() == nameAndLocation ) {
auto thisTracker =
currentTracker.parent().findChild( nameAndLocation );
currentTracker.parent()->findChild( nameAndLocation );
assert( thisTracker );
assert( thisTracker->isGeneratorTracker() );
tracker = static_cast<GeneratorTracker*>( thisTracker );
@@ -110,7 +110,7 @@ namespace Catch {
// This is safe: there is always at least one section
// tracker in a test case tracking tree
while ( !parent->isSectionTracker() ) {
parent = &( parent->parent() );
parent = parent->parent();
}
assert( parent &&
"Missing root (test case) level section" );