diff --git a/algparam.h b/algparam.h index f5a79c5e1..635aaafbc 100644 --- a/algparam.h +++ b/algparam.h @@ -459,7 +459,7 @@ class AlgorithmParametersTemplate : public AlgorithmParametersBase } } -#if defined(_MSC_VER) && (_MSC_VER >= 1300) +#if defined(DEBUG_NEW) && (_MSC_VER >= 1300) # pragma push_macro("new") # undef new #endif @@ -470,7 +470,7 @@ class AlgorithmParametersTemplate : public AlgorithmParametersBase CRYPTOPP_UNUSED(p); // silence warning } -#if defined(_MSC_VER) && (_MSC_VER >= 1300) +#if defined(DEBUG_NEW) && (_MSC_VER >= 1300) # pragma pop_macro("new") #endif diff --git a/pch.h b/pch.h index 206d4c3bf..4be29001c 100644 --- a/pch.h +++ b/pch.h @@ -21,4 +21,10 @@ #endif # endif +// Enable file and line numbers, if available. +// #if defined(_MSC_VER) && defined(_DEBUG) && defined(USE_PRECOMPILED_HEADERS) +// # define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__) +// # define new DEBUG_NEW +// #endif + #endif // CRYPTOPP_PCH_H