From 2f5e7f8464050d04e96a5b24f29ed0b6c19edab1 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Fri, 23 Mar 2012 09:30:35 +0000 Subject: [PATCH] + use in-place ::new/::delete --- deps/agg/include/agg_basics.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deps/agg/include/agg_basics.h b/deps/agg/include/agg_basics.h index b48976e3e..eb141c47b 100644 --- a/deps/agg/include/agg_basics.h +++ b/deps/agg/include/agg_basics.h @@ -35,10 +35,10 @@ namespace agg //------------------------------------------------------------pod_allocator template struct pod_allocator { - static T* allocate(unsigned num) { return new T [num]; } - static void deallocate(T* ptr, unsigned) { delete [] ptr; } + static T* allocate(unsigned num) { return static_cast(::operator new(sizeof(T)*num));} + static void deallocate(T* ptr, unsigned) { ::operator delete(ptr) ;} }; - + // Single object allocator. It's also can be replaced with your custom // allocator. The difference is that it can only allocate a single // object and the constructor and destructor must be called.