summaryrefslogtreecommitdiff
path: root/src/core/alloc_type.hpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2019-03-04 19:33:59 +0100
committerPatric Stout <truebrain@openttd.org>2019-03-05 22:03:00 +0100
commitad30d04b5eddccea1c547a050b1afc225d277af4 (patch)
tree1b6b3c6d46d67abe8f83193d3beec8fb7f7aefc4 /src/core/alloc_type.hpp
parent7784d7771362f98145f17c469430e0f3e3b207b5 (diff)
downloadopenttd-ad30d04b5eddccea1c547a050b1afc225d277af4.tar.xz
Codechange: removed some left-behind __NDS__ references
Diffstat (limited to 'src/core/alloc_type.hpp')
-rw-r--r--src/core/alloc_type.hpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/core/alloc_type.hpp b/src/core/alloc_type.hpp
index 9c25cc9e3..5ea812b0e 100644
--- a/src/core/alloc_type.hpp
+++ b/src/core/alloc_type.hpp
@@ -25,24 +25,8 @@
*/
template <typename T, size_t length>
struct SmallStackSafeStackAlloc {
-#if !defined(__NDS__)
/** Storing the data on the stack */
T data[length];
-#else
- /** Storing it on the heap */
- T *data;
- /** The length (in elements) of data in this allocator. */
- size_t len;
-
- /** Allocating the memory */
- SmallStackSafeStackAlloc() : data(MallocT<T>(length)), len(length) {}
-
- /** And freeing when it goes out of scope */
- ~SmallStackSafeStackAlloc()
- {
- free(data);
- }
-#endif
/**
* Gets a pointer to the data stored in this wrapper.
@@ -69,11 +53,7 @@ struct SmallStackSafeStackAlloc {
*/
inline T *EndOf()
{
-#if !defined(__NDS__)
return endof(data);
-#else
- return &data[len];
-#endif
}
};