Debian Codegraph @

Source/Core/Common/Common.h

raw symbols SCIP
1 // Copyright 2008 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #if defined _WIN32
7
8 // Memory leak checks
9 #define CHECK_HEAP_INTEGRITY()
10
11 // Debug definitions
12 #if defined(_DEBUG)
13 #include <crtdbg.h>
14 #undef CHECK_HEAP_INTEGRITY
15 #define CHECK_HEAP_INTEGRITY() \
16 { \
17 if (!_CrtCheckMemory()) \
18 PanicAlertFmt("memory corruption detected. see log."); \
19 }
20 // If you want to see how much a pain in the ass singletons are, for example:
21 // {614} normal block at 0x030C5310, 188 bytes long.
22 // Data: <Master Log > 4D 61 73 74 65 72 20 4C 6F 67 00 00 00 00 00 00
23 struct CrtDebugBreak
24 {
25 CrtDebugBreak(int spot) { _CrtSetBreakAlloc(spot); }
26 };
27 // CrtDebugBreak breakAt(614);
28 #endif // end DEBUG/FAST
29
30 #endif
31
32 #ifdef _MSC_VER
33 #define __getcwd _getcwd
34 #define __chdir _chdir
35 #else
36 #define __getcwd getcwd
37 #define __chdir chdir
38 #endif
39
40 // Dummy macro for marking translatable strings that can not be immediately translated.
41 #define _trans(a) a