mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-04 05:09:53 +01:00
Move crtdbg.h include outside namespace
This commit is contained in:
parent
091595780e
commit
c411c131cb
@ -8,11 +8,11 @@
|
|||||||
#include "catch_leak_detector.h"
|
#include "catch_leak_detector.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Catch {
|
|
||||||
|
|
||||||
#ifdef CATCH_CONFIG_WINDOWS_CRTDBG
|
#ifdef CATCH_CONFIG_WINDOWS_CRTDBG
|
||||||
#include <crtdbg.h>
|
#include <crtdbg.h>
|
||||||
|
|
||||||
|
namespace Catch {
|
||||||
|
|
||||||
LeakDetector::LeakDetector() {
|
LeakDetector::LeakDetector() {
|
||||||
int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
|
int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
|
||||||
flag |= _CRTDBG_LEAK_CHECK_DF;
|
flag |= _CRTDBG_LEAK_CHECK_DF;
|
||||||
@ -23,11 +23,10 @@ namespace Catch {
|
|||||||
// Change this to leaking allocation's number to break there
|
// Change this to leaking allocation's number to break there
|
||||||
_CrtSetBreakAlloc(-1);
|
_CrtSetBreakAlloc(-1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
LeakDetector::LeakDetector(){}
|
Catch::LeakDetector::LeakDetector() {}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user