mirror of
https://github.com/mapnik/mapnik.git
synced 2026-02-01 17:36:36 +00:00
+ 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
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…
x
Reference in New Issue
Block a user