[Bf-blender-cvs] [02cd1595390] master: Cleanup: add comment explaining operator delete

Jacques Lucke noreply at git.blender.org
Tue Jul 7 12:31:31 CEST 2020


Commit: 02cd1595390e44106299701b3449e62c98c69d78
Author: Jacques Lucke
Date:   Tue Jul 7 12:31:10 2020 +0200
Branches: master
https://developer.blender.org/rB02cd1595390e44106299701b3449e62c98c69d78

Cleanup: add comment explaining operator delete

===================================================================

M	intern/guardedalloc/MEM_guardedalloc.h

===================================================================

diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h
index e775d1c1b9a..1318aa10697 100644
--- a/intern/guardedalloc/MEM_guardedalloc.h
+++ b/intern/guardedalloc/MEM_guardedalloc.h
@@ -244,7 +244,9 @@ void MEM_use_guarded_allocator(void);
     { \
       return ptr; \
     } \
-    void operator delete(void *, void *) \
+    /* This is the matching delete operator to the placement-new operator above. Both parameters \
+     * will have the same value. Without this, we get the warning C4291 on windows. */ \
+    void operator delete(void * /*ptr_to_free*/, void * /*ptr*/) \
     { \
     }



More information about the Bf-blender-cvs mailing list