Changes in src/Helpers/MemDebug.hpp [6d6b54:097902]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Helpers/MemDebug.hpp
r6d6b54 r097902 21 21 * your sourcefiles. 22 22 */ 23 #ifndef NDEBUG24 #ifndef NO_MEMDEBUG25 23 26 #ifndef MEMDEBUG 27 #define MEMDEBUG 24 // Set all flags in a way that makes sense 25 26 // NDEBUG implies NO_MEMDEBUG 27 #ifdef NDEBUG 28 # ifndef NO_MEMDEBUG 29 # define NO_MEMDEBUG 30 # endif 28 31 #endif 32 33 // NO_MEMDEBUG and MEMDEBUG are mutually exclusive, but at least one must be set 34 #ifdef NO_MEMDEBUG 35 # ifdef MEMDEBUG 36 # undef MEMDEBUG 37 # endif 38 #else 39 # ifndef MEMDEBUG 40 # define MEMDEBUG 41 # endif 42 #endif 43 44 #ifdef MEMDEBUG 29 45 30 46 #include <new> … … 33 49 // to be loaded before the define 34 50 #include <string> 51 #include <boost/optional.hpp> 35 52 #include <boost/shared_ptr.hpp> 36 53 #include <boost/function.hpp> … … 44 61 */ 45 62 void getState(); 63 void dumpMemory(std::ostream&); 46 64 47 65 void _ignore(void*); … … 82 100 #endif 83 101 84 #endif 85 #endif 86 87 88 #ifdef NDEBUG 89 #undef MEMDEBUG 90 #endif 91 92 #ifndef MEMDEBUG 102 #else 93 103 // memory debugging was disabled 94 104 95 105 namespace Memory { 96 106 inline void getState(){} 107 108 inline void dumpMemory(std::ostream&){}; 97 109 98 110 template <typename T> … … 103 115 104 116 #endif 117 118 105 119 #endif /* MEMDEBUG_HPP_ */
Note:
See TracChangeset
for help on using the changeset viewer.