Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Move crtdbg.h include outside namespace

Commit
c411c131cb60a94b05147c3c55e8d22ca3d3d3b1
Author
Phil Nash ·
Parents
091595780e4f

Files · Download .tar.gz

Changes

 include/internal/catch_leak_detector.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/include/internal/catch_leak_detector.cpp b/include/internal/catch_leak_detector.cpp
index 32109310..36aba6ab 100644
--- a/include/internal/catch_leak_detector.cpp
+++ b/include/internal/catch_leak_detector.cpp
@@ -8,11 +8,11 @@
  #include "catch_leak_detector.h"
 
 
-namespace Catch {
-
 #ifdef CATCH_CONFIG_WINDOWS_CRTDBG
 #include <crtdbg.h>
 
+namespace Catch {
+
 	LeakDetector::LeakDetector() {
 		int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
 		flag |= _CRTDBG_LEAK_CHECK_DF;
@@ -23,11 +23,10 @@ namespace Catch {
 		// Change this to leaking allocation's number to break there
 		_CrtSetBreakAlloc(-1);
 	}
+}
 
 #else
 
-    LeakDetector::LeakDetector(){}
+    Catch::LeakDetector::LeakDetector() {}
 
 #endif
-
-}