diff options
| author | Martin Hořeňovský | 2021-06-09 22:01:49 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-06-18 10:34:55 +0200 |
| commit | a14d67cacede08349036cc13691861569a27d979 (patch) | |
| tree | 104e54ef4cfb2e2c58e43d63392f0d9644daeb85 /src/catch2/internal/catch_run_context.cpp | |
| parent | 4ce8a23edd40b77c5cff86265d03e286a988b35b (diff) | |
| download | catch3-a14d67cacede08349036cc13691861569a27d979.tar.gz | |
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.
Diffstat (limited to 'src/catch2/internal/catch_run_context.cpp')
| -rw-r--r-- | src/catch2/internal/catch_run_context.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/catch2/internal/catch_run_context.cpp b/src/catch2/internal/catch_run_context.cpp index 927a27f8..e3a4bd1e 100644 --- a/src/catch2/internal/catch_run_context.cpp +++ b/src/catch2/internal/catch_run_context.cpp @@ -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" ); |