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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal/catch_assertion_handler.cpp
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.cpp
parentbe2dfb45cc7862ef08f46b967bcda72c9b7a9c59 (diff)
downloadcatch3-10f62484bff73e3a58a411e2e10b4e1c13cfba9f.tar.gz
AssertionHandler uses RunContext directly to avoid virtual dispatch
Diffstat (limited to 'src/catch2/internal/catch_assertion_handler.cpp')
-rw-r--r--src/catch2/internal/catch_assertion_handler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/catch2/internal/catch_assertion_handler.cpp b/src/catch2/internal/catch_assertion_handler.cpp
index 5a4806e9..79d5dcd8 100644
--- a/src/catch2/internal/catch_assertion_handler.cpp
+++ b/src/catch2/internal/catch_assertion_handler.cpp
@@ -11,6 +11,7 @@
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
#include <catch2/internal/catch_context.hpp>
#include <catch2/internal/catch_debugger.hpp>
+#include <catch2/internal/catch_run_context.hpp>
#include <catch2/internal/catch_test_failure_exception.hpp>
#include <catch2/matchers/catch_matchers_string.hpp>
@@ -26,7 +27,7 @@ namespace Catch {
StringRef capturedExpression,
ResultDisposition::Flags resultDisposition )
: m_assertionInfo{ macroName, lineInfo, capturedExpression, resultDisposition },
- m_resultCapture( getResultCapture() )
+ m_resultCapture( static_cast<RunContext&>(getResultCapture()) )
{
m_resultCapture.notifyAssertionStarted( m_assertionInfo );
}