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.