+ restore allocator (as it used to store objects with
non-trivial ctor's - svg_converter) TODO: expose allocator
This commit is contained in:
parent
9c9753d2c8
commit
92c41e8626
1 changed files with 4 additions and 2 deletions
6
deps/agg/include/agg_basics.h
vendored
6
deps/agg/include/agg_basics.h
vendored
|
@ -35,8 +35,10 @@ namespace agg
|
|||
//------------------------------------------------------------pod_allocator
|
||||
template<class T> struct pod_allocator
|
||||
{
|
||||
static T* allocate(unsigned num) { return static_cast<T*>(::operator new(sizeof(T)*num));}
|
||||
static void deallocate(T* ptr, unsigned) { ::operator delete(ptr) ;}
|
||||
//static T* allocate(unsigned num) { return static_cast<T*>(::operator new(sizeof(T)*num));}
|
||||
//static void deallocate(T* ptr, unsigned) { ::operator delete(ptr) ;}
|
||||
static T* allocate(unsigned num) { return new T [num]; }
|
||||
static void deallocate(T* ptr, unsigned) { delete [] ptr; }
|
||||
};
|
||||
|
||||
// Single object allocator. It's also can be replaced with your custom
|
||||
|
|
Loading…
Reference in a new issue