From fcf49458e9f5ed5e58277545a90c42aa2004e3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sat, 27 Sep 2025 13:26:07 +0200 Subject: [PATCH] WIP: what if we don't check when getting capture --- src/catch2/interfaces/catch_interfaces_capture.hpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/catch2/interfaces/catch_interfaces_capture.hpp b/src/catch2/interfaces/catch_interfaces_capture.hpp index 4e27a985..ad584794 100644 --- a/src/catch2/interfaces/catch_interfaces_capture.hpp +++ b/src/catch2/interfaces/catch_interfaces_capture.hpp @@ -106,11 +106,7 @@ namespace Catch { void missingCaptureInstance(); } inline IResultCapture& getResultCapture() { - if (auto* capture = getCurrentContext().getResultCapture()) { - return *capture; - } else { - Detail::missingCaptureInstance(); - } + return *getCurrentContext().getResultCapture(); } }