Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal/catch_assertion_handler.hpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2026-04-13 22:56:55 +0200
committerMartin Hořeňovský2026-04-13 22:56:55 +0200
commit10f62484bff73e3a58a411e2e10b4e1c13cfba9f (patch)
treeeeefa83a25c3b4eef6c4e5f0ccb27ba510d7b2da /src/catch2/internal/catch_assertion_handler.hpp
parentbe2dfb45cc7862ef08f46b967bcda72c9b7a9c59 (diff)
downloadcatch3-10f62484bff73e3a58a411e2e10b4e1c13cfba9f.tar.gz
AssertionHandler uses RunContext directly to avoid virtual dispatch
Diffstat (limited to 'src/catch2/internal/catch_assertion_handler.hpp')
-rw-r--r--src/catch2/internal/catch_assertion_handler.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/catch2/internal/catch_assertion_handler.hpp b/src/catch2/internal/catch_assertion_handler.hpp
index bc37469d..93a70b1a 100644
--- a/src/catch2/internal/catch_assertion_handler.hpp
+++ b/src/catch2/internal/catch_assertion_handler.hpp
@@ -15,7 +15,7 @@
namespace Catch {
- class IResultCapture;
+ class RunContext;
struct AssertionReaction {
bool shouldDebugBreak = false;
@@ -27,7 +27,10 @@ namespace Catch {
AssertionInfo m_assertionInfo;
AssertionReaction m_reaction;
bool m_completed = false;
- IResultCapture& m_resultCapture;
+ // Since all uses are hidden in the .cpp file, we can directly use
+ // the final type and avoid going through virtual dispatch, without
+ // massive compilation time overhead.
+ RunContext& m_resultCapture;
void finishIncomplete();