summaryrefslogtreecommitdiff
path: root/src/core/alloc_type.hpp
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2008-06-22 15:41:38 +0000
committerskidd13 <skidd13@openttd.org>2008-06-22 15:41:38 +0000
commitb4ef380c49c2dfc78c7bd25a8ebc15d7a27b7243 (patch)
tree5108d49e47c818fec8c5b29f346e207dde9f22a7 /src/core/alloc_type.hpp
parent640e5478862e3b83d85db6332e0d82a45a95e4ed (diff)
downloadopenttd-b4ef380c49c2dfc78c7bd25a8ebc15d7a27b7243.tar.xz
(svn r13607) -Fix (r13606): some coding style issues got fixed but some got/stayed broken
Diffstat (limited to 'src/core/alloc_type.hpp')
-rw-r--r--src/core/alloc_type.hpp19
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