From 6309d7ad56357e3aecbfeb7096b434a03bdc70a8 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Mon, 15 Jun 2009 06:45:44 +0000 Subject: continued with localization --- src/base/tl/allocator.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/base/tl/allocator.hpp (limited to 'src/base/tl/allocator.hpp') diff --git a/src/base/tl/allocator.hpp b/src/base/tl/allocator.hpp new file mode 100644 index 00000000..3baa1c19 --- /dev/null +++ b/src/base/tl/allocator.hpp @@ -0,0 +1,15 @@ +#ifndef TL_FILE_ALLOCATOR_HPP +#define TL_FILE_ALLOCATOR_HPP + +template +class allocator_default +{ +public: + static T *alloc() { return new T; } + static void free(T *p) { delete p; } + + static T *alloc_array(int size) { return new T [size]; } + static void free_array(T *p) { delete [] p; } +}; + +#endif // TL_FILE_ALLOCATOR_HPP -- cgit 1.4.1