changeset 5:7661c1604e49

Add additional operator delete calls gcc 10 asked for.
author David A. Holland
date Mon, 30 May 2022 23:32:56 -0400
parents bebb2ba69e1d
children 607e3be6bad8
files anagram/ag1/cppalloc.cpp
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/anagram/ag1/cppalloc.cpp	Sat Apr 18 17:12:17 2020 -0400
+++ b/anagram/ag1/cppalloc.cpp	Mon May 30 23:32:56 2022 -0400
@@ -18,6 +18,11 @@
   DEALLOCATE(p);
 }
 
+void operator delete(void *p, size_t) {
+  //deleteCalls++;
+  DEALLOCATE(p);
+}
+
 void *operator new[](size_t size) {
   //newArrayCalls++;
   void *pointer = myalloc(size);
@@ -28,3 +33,8 @@
   //deleteArrayCalls++;
   DEALLOCATE(p);
 }
+
+void operator delete[](void *p, size_t) {
+  //deleteArrayCalls++;
+  DEALLOCATE(p);
+}