diff options
Diffstat (limited to 'src/core/alloc_type.hpp')
-rw-r--r-- | src/core/alloc_type.hpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/core/alloc_type.hpp b/src/core/alloc_type.hpp index fe9c3b81d..cc549658f 100644 --- a/src/core/alloc_type.hpp +++ b/src/core/alloc_type.hpp @@ -29,28 +29,39 @@ struct SmallStackSafeStackAlloc { /** Allocating the memory */ SmallStackSafeStackAlloc() : data(MallocT<T>(length)), len(length) {} + /** And freeing when it goes out of scope */ - ~SmallStackSafeStackAlloc() { free(data); } + ~SmallStackSafeStackAlloc() + { + free(data); + } #endif /** * Gets a pointer to the data stored in this wrapper. * @return the pointer. */ - FORCEINLINE operator T* () { return data; } + FORCEINLINE operator T* () + { + return data; + } /** * Gets a pointer to the data stored in this wrapper. * @return the pointer. */ - FORCEINLINE T* operator -> () { return data; } + FORCEINLINE T* operator -> () + { + return data; + } /** * Gets a pointer to the last data element stored in this wrapper. * @note needed because endof does not work properly for pointers. * @return the 'endof' pointer. */ - FORCEINLINE T* EndOf() { + FORCEINLINE T* EndOf() + { #if !defined(__NDS__) return endof(data); #else |