X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..ef7823016897c0c04c88019e14f48837764e50be:/include/wx/memory.h?ds=sidebyside diff --git a/include/wx/memory.h b/include/wx/memory.h index 3b58cb55d9..41ef650f98 100644 --- a/include/wx/memory.h +++ b/include/wx/memory.h @@ -31,8 +31,8 @@ #ifdef __WXDEBUG__ -WXDLLIMPEXP_BASE void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool isVect = FALSE); -WXDLLIMPEXP_BASE void wxDebugFree(void * buf, bool isVect = FALSE); +WXDLLIMPEXP_BASE void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool isVect = false); +WXDLLIMPEXP_BASE void wxDebugFree(void * buf, bool isVect = false); //********************************************************************************** /* @@ -70,47 +70,29 @@ WXDLLIMPEXP_BASE void wxDebugFree(void * buf, bool isVect = FALSE); #define wxUSE_ARRAY_MEMORY_OPERATORS 0 #endif -inline void * operator new (size_t size, wxChar * fileName, int lineNum) -{ - return wxDebugAlloc(size, fileName, lineNum, FALSE, FALSE); -} +void * operator new (size_t size, wxChar * fileName, int lineNum); -inline void * operator new (size_t size) -{ - return wxDebugAlloc(size, NULL, 0, FALSE); -} +void * operator new (size_t size); -inline void operator delete (void * buf) -{ - wxDebugFree(buf, FALSE); -} +void operator delete (void * buf); #if wxUSE_ARRAY_MEMORY_OPERATORS -inline void * operator new[] (size_t size) -{ - return wxDebugAlloc(size, NULL, 0, FALSE, TRUE); -} +void * operator new[] (size_t size); -inline void * operator new[] (size_t size, wxChar * fileName, int lineNum) -{ - return wxDebugAlloc(size, fileName, lineNum, FALSE, TRUE); -} +void * operator new[] (size_t size, wxChar * fileName, int lineNum); -inline void operator delete[] (void * buf) -{ - wxDebugFree(buf, TRUE); -} +void operator delete[] (void * buf); #endif // VC++ 6.0 and MWERKS #if ( defined(__VISUALC__) && (__VISUALC__ >= 1200) ) || defined(__MWERKS__) inline void operator delete(void* pData, wxChar* /* fileName */, int /* lineNum */) { - wxDebugFree(pData, FALSE); + wxDebugFree(pData, false); } inline void operator delete[](void* pData, wxChar* /* fileName */, int /* lineNum */) { - wxDebugFree(pData, TRUE); + wxDebugFree(pData, true); } #endif // __VISUALC__>=1200 #endif // wxUSE_GLOBAL_MEMORY_OPERATORS @@ -236,7 +218,7 @@ public: static bool GetDebugMode(void) { return debugOn; } static void SetDebugMode(bool flag) { debugOn = flag; } - static void SetCheckpoint(bool all = FALSE); + static void SetCheckpoint(bool all = false); static wxMemStruct *GetCheckpoint(void) { return checkPoint; } // Calculated from the request size and any padding needed @@ -270,8 +252,8 @@ public: static bool GetCheckPrevious () { return m_checkPrevious; } static void SetCheckPrevious (bool value) { m_checkPrevious = value; } - // Checks all nodes, or all nodes if checkAll is TRUE - static int Check(bool checkAll = FALSE); + // Checks all nodes, or all nodes if checkAll is true + static int Check(bool checkAll = false); // Print out the list of wxMemStruct nodes. static bool PrintList(void); @@ -280,14 +262,14 @@ public: static bool Dump(void); // Print statistics - static bool PrintStatistics(bool detailed = TRUE); + static bool PrintStatistics(bool detailed = true); // Print out the classes in the application. static bool PrintClasses(void); // Count the number of non-wxDebugContext-related objects // that are outstanding - static int CountObjectsLeft(bool sinceCheckpoint = FALSE); + static int CountObjectsLeft(bool sinceCheckpoint = false); // This function is used to output the dump static void OutputDumpLine(const wxChar *szFormat, ...); @@ -298,8 +280,8 @@ private: static wxMemStruct* m_head; static wxMemStruct* m_tail; - // Set to FALSE if we're not checking all previous nodes when - // we do a new. Set to TRUE when we are. + // Set to false if we're not checking all previous nodes when + // we do a new. Set to true when we are. static bool m_checkPrevious; }; @@ -349,8 +331,8 @@ void WXDLLIMPEXP_BASE wxTraceLevel(int level, const wxChar *fmt ...) ATTRIBUTE_P #define wxTraceLevel(l, fmt) #endif -#define WXTRACE TRUE ? (void)0 : wxTrace -#define WXTRACELEVEL TRUE ? (void)0 : wxTraceLevel +#define WXTRACE true ? (void)0 : wxTrace +#define WXTRACELEVEL true ? (void)0 : wxTraceLevel #endif // (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT