aboutsummaryrefslogtreecommitdiff
path: root/include/irrTypes.h
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-02-18 13:41:10 +0100
committersfan5 <sfan5@live.de>2021-02-25 19:09:48 +0100
commit32a45f8239ed8d4e52be659b818739aaa73b2a9f (patch)
treef7b9b632fff9652ef7e51aea78afd9a400f92f5d /include/irrTypes.h
parentc4503eaf17664bdf501ee96ba86d3a24636b83bc (diff)
downloadirrlicht-32a45f8239ed8d4e52be659b818739aaa73b2a9f.tar.xz
irrTypes.h: use standard header for number types
Diffstat (limited to 'include/irrTypes.h')
-rw-r--r--include/irrTypes.h73
1 files changed, 9 insertions, 64 deletions
diff --git a/include/irrTypes.h b/include/irrTypes.h
index aa99b50..184870d 100644
--- a/include/irrTypes.h
+++ b/include/irrTypes.h
@@ -6,29 +6,16 @@
#define __IRR_TYPES_H_INCLUDED__
#include "IrrCompileConfig.h"
-
-#if defined(__GNUC__)
- #include <limits.h> // for __WORDSIZE
-#endif
+#include <stdint.h>
namespace irr
{
//! 8 bit unsigned variable.
-/** This is a typedef for unsigned char, it ensures portability of the engine. */
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
-typedef unsigned __int8 u8;
-#else
-typedef unsigned char u8;
-#endif
+typedef uint8_t u8;
//! 8 bit signed variable.
-/** This is a typedef for signed char, it ensures portability of the engine. */
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
-typedef __int8 s8;
-#else
-typedef signed char s8;
-#endif
+typedef int8_t s8;
//! 8 bit character variable.
/** This is a typedef for char, it ensures portability of the engine. */
@@ -37,68 +24,26 @@ typedef char c8;
//! 16 bit unsigned variable.
-/** This is a typedef for unsigned short, it ensures portability of the engine. */
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
-typedef unsigned __int16 u16;
-#else
-typedef unsigned short u16;
-#endif
+typedef uint16_t u16;
//! 16 bit signed variable.
-/** This is a typedef for signed short, it ensures portability of the engine. */
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
-typedef __int16 s16;
-#else
-typedef signed short s16;
-#endif
+typedef int16_t s16;
//! 32 bit unsigned variable.
-/** This is a typedef for unsigned int, it ensures portability of the engine. */
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
-typedef unsigned __int32 u32;
-#else
-typedef unsigned int u32;
-#endif
+typedef uint32_t u32;
//! 32 bit signed variable.
-/** This is a typedef for signed int, it ensures portability of the engine. */
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
-typedef __int32 s32;
-#else
-typedef signed int s32;
-#endif
+typedef int32_t s32;
#ifdef __IRR_HAS_S64
//! 64 bit unsigned variable.
-/** This is a typedef for 64bit uint, it ensures portability of the engine. */
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
-typedef unsigned __int64 u64;
-#elif defined(__GNUC__)
-#if defined(__WORDSIZE) && __WORDSIZE == 64
-typedef unsigned long int u64;
-#else
-__extension__ typedef unsigned long long u64;
-#endif
-#else
-typedef unsigned long long u64;
-#endif
+typedef uint64_t u64;
//! 64 bit signed variable.
-/** This is a typedef for 64bit int, it ensures portability of the engine. */
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
-typedef __int64 s64;
-#elif defined(__GNUC__)
-#if defined(__WORDSIZE) && __WORDSIZE == 64
-typedef long int s64;
-#else
-__extension__ typedef long long s64;
-#endif
-#else
-typedef long long s64;
-#endif
+typedef int64_t s64;
#endif // __IRR_HAS_S64