From 467341b7df47d6bedba2f6c5ff098c5f6eae307f Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Sat, 14 Oct 2017 11:12:46 +0200 Subject: [PATCH] [DEV] add placement new if not define --- etk/Allocator.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/etk/Allocator.cpp b/etk/Allocator.cpp index 0d7fcd9..db194eb 100644 --- a/etk/Allocator.cpp +++ b/etk/Allocator.cpp @@ -23,4 +23,17 @@ void operator delete (void* ptr) { void operator delete[] (void* ptr) { free(ptr); } -*/ \ No newline at end of file +*/ + + +// it is define bu generic "include " ==> no double define of placement new +#ifndef _NEW + // Default placement versions of operator new (use char* instead of void* to permit no multiple definition). + inline void* operator new(size_t, char* _p) throw() { + ETK_VECTOR_DEBUG("plop\n"); + return _p; + } + inline void operator delete (void*, char*) throw() { + + } +#endif