From ad30d04b5eddccea1c547a050b1afc225d277af4 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Mon, 4 Mar 2019 19:33:59 +0100 Subject: Codechange: removed some left-behind __NDS__ references --- src/core/alloc_type.hpp | 20 -------------------- src/stdafx.h | 5 +---- 2 files changed, 1 insertion(+), 24 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 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(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 } }; diff --git a/src/stdafx.h b/src/stdafx.h index 80130ff4d..ac53b6c63 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -22,9 +22,6 @@ #define _GNU_SOURCE #define TROUBLED_INTS #include -#elif defined(__NDS__) - #include - #define TROUBLED_INTS #endif /* It seems that we need to include stdint.h before anything else @@ -433,7 +430,7 @@ void NORETURN CDECL error(const char *str, ...) WARN_FORMAT(1, 2); #define OTTD_ASSERT #endif -#if defined(__NDS__) || defined(__DJGPP__) +#if defined(__DJGPP__) /* DJGPP doesn't have C++ conformant _stricmp... */ #define _stricmp stricmp #elif defined(OPENBSD) -- cgit v1.2.3-54-g00ecf