From f1d07fb647a9a27c4e2f6b93d6a60717e1b54911 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 29 Oct 2016 10:53:18 +0200 Subject: [PATCH] I no longer use CRTDBG to find bugs. Valgrind rules. --- src/main.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/main.c b/src/main.c index 58a15edc0..5fd154b23 100644 --- a/src/main.c +++ b/src/main.c @@ -262,27 +262,6 @@ static int setup_signal_handler(void) } #endif -#undef CRTDBG -#ifdef CRTDBG -#include -void init_crtdbg(void) -{ -#if (defined(_MSC_VER)) - int flags = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); - if (memdebug == 1) { - flags |= _CRTDBG_CHECK_ALWAYS_DF; /* expensive */ - } else if (memdebug == 2) { - flags = (flags & 0x0000FFFF) | _CRTDBG_CHECK_EVERY_16_DF; - } else if (memdebug == 3) { - flags = (flags & 0x0000FFFF) | _CRTDBG_CHECK_EVERY_128_DF; - } else if (memdebug == 4) { - flags = (flags & 0x0000FFFF) | _CRTDBG_CHECK_EVERY_1024_DF; - } - _CrtSetDbgFlag(flags); -#endif -} -#endif - void locale_init(void) { setlocale(LC_CTYPE, ""); @@ -310,10 +289,6 @@ int main(int argc, char **argv) locale_init(); -#ifdef CRTDBG - init_crtdbg(); -#endif - L = lua_init(); game_init(); bind_monsters(L);