Changeset c01bf3c in tol
- Timestamp:
- May 20, 2013, 10:52:26 AM (13 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- d4dce8a
- Parents:
- 51b552f
- File:
-
- 1 edited
-
tol/bbasic/tol_bfsmem.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/bbasic/tol_bfsmem.h
r51b552f rc01bf3c 92 92 #define RedeclareClassNewDelete(ANY_) \ 93 93 public: \ 94 static char* BFSMEM_ClassName( ) { return(#ANY_); } \95 static int BFSMEM_ClassSize( ) { return(sizeof(ANY_)); } \94 static char* BFSMEM_ClassName(const ANY_& unused) { return(#ANY_); } \ 95 static int BFSMEM_ClassSize(const ANY_& unused) { return(sizeof(ANY_)); } \ 96 96 BFixedSizeMemoryBase* GetMemHandler() const \ 97 97 { \ … … 139 139 static void* operator new(size_t size) \ 140 140 { \ 141 BFSMEM_ADD_INSTANCES(BFSMEM_ClassName(),1,size); \ 141 static ANY_ unused_; \ 142 BFSMEM_ADD_INSTANCES(BFSMEM_ClassName(unused_),1,size); \ 142 143 return(malloc(size)); \ 143 144 } \ 144 145 static void operator delete(void* ptr) \ 145 146 { \ 146 BFSMEM_REMOVE_INSTANCES(BFSMEM_ClassName(),1,BFSMEM_ClassSize()); \ 147 static ANY_ unused_; \ 148 BFSMEM_REMOVE_INSTANCES(BFSMEM_ClassName(unused_),1,BFSMEM_ClassSize(unused_)); \ 147 149 free(ptr); \ 148 150 }
Note: See TracChangeset
for help on using the changeset viewer.
