https://git.reactos.org/?p=reactos.git;a=commitdiff;h=49d8c1af21c06f6e38b3d9034f52820656362ff1

commit 49d8c1af21c06f6e38b3d9034f52820656362ff1
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Tue Mar 21 07:26:04 2023 +0900
Commit:     Katayama Hirofumi MZ <[email protected]>
CommitDate: Tue Mar 21 07:26:04 2023 +0900

    [REGEDIT] Move '#include <crtdbg.h>' and add _CRTDBG_MAP_ALLOC
    
    - Add #include <stdlib.h>.
    - Move #include <crtdbg.h> to "regedit.h".
    - Add #define _CRTDBG_MAP_ALLOC before #include <crtdbg.h>.
    CORE-18876
---
 base/applications/regedit/main.c    | 4 ----
 base/applications/regedit/regedit.h | 5 +++++
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/base/applications/regedit/main.c b/base/applications/regedit/main.c
index 5ec8ddca2cc..3f58f0162e9 100644
--- a/base/applications/regedit/main.c
+++ b/base/applications/regedit/main.c
@@ -20,10 +20,6 @@
 
 #include "regedit.h"
 
-#ifdef _DEBUG
-#include <crtdbg.h>
-#endif
-
 BOOL ProcessCmdLine(WCHAR *cmdline);
 
 const WCHAR *reg_class_namesW[] = {L"HKEY_LOCAL_MACHINE", L"HKEY_USERS",
diff --git a/base/applications/regedit/regedit.h 
b/base/applications/regedit/regedit.h
index d1decef5893..102f3480524 100644
--- a/base/applications/regedit/regedit.h
+++ b/base/applications/regedit/regedit.h
@@ -10,6 +10,11 @@
 #include <aclapi.h>
 #include <shellapi.h>
 #include <strsafe.h>
+#include <stdlib.h>
+#ifdef _DEBUG
+    #define _CRTDBG_MAP_ALLOC
+    #include <crtdbg.h>
+#endif
 
 #include "main.h"
 #include "hexedit.h"

Reply via email to