Move crtdbg.h include outside namespace

This commit is contained in:
Phil Nash 2017-11-24 10:36:54 +00:00
parent 091595780e
commit c411c131cb
1 changed files with 4 additions and 5 deletions

View File

@ -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
}