From b75ac2439196ecf95efe76e38ca2c3f1afcd6421 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Wed, 22 Oct 2014 22:43:15 -0200 Subject: Use std sized types instead of platform specific typedefs --- src/common/common_types.h | 43 +++++++++++-------------------------------- 1 file changed, 11 insertions(+), 32 deletions(-) (limited to 'src/common/common_types.h') diff --git a/src/common/common_types.h b/src/common/common_types.h index 00fde828..7ce6b224 100644 --- a/src/common/common_types.h +++ b/src/common/common_types.h @@ -25,42 +25,21 @@ #pragma once #include +#include #include // data_types__m128.cpp -#ifdef _WIN32 +typedef std::uint8_t u8; ///< 8-bit unsigned byte +typedef std::uint16_t u16; ///< 16-bit unsigned short +typedef std::uint32_t u32; ///< 32-bit unsigned word +typedef std::uint64_t u64; ///< 64-bit unsigned int -#include +typedef std::int8_t s8; ///< 8-bit signed byte +typedef std::int16_t s16; ///< 16-bit signed short +typedef std::int32_t s32; ///< 32-bit signed word +typedef std::int64_t s64; ///< 64-bit signed int -typedef unsigned __int8 u8; ///< 8-bit unsigned byte -typedef unsigned __int16 u16; ///< 16-bit unsigned short -typedef unsigned __int32 u32; ///< 32-bit unsigned word -typedef unsigned __int64 u64; ///< 64-bit unsigned int - -typedef signed __int8 s8; ///< 8-bit signed byte -typedef signed __int16 s16; ///< 16-bit signed short -typedef signed __int32 s32; ///< 32-bit signed word -typedef signed __int64 s64; ///< 64-bit signed int - -#else - -typedef unsigned char u8; ///< 8-bit unsigned byte -typedef unsigned short u16; ///< 16-bit unsigned short -typedef unsigned int u32; ///< 32-bit unsigned word -typedef unsigned long long u64; ///< 64-bit unsigned int - -typedef signed char s8; ///< 8-bit signed byte -typedef signed short s16; ///< 16-bit signed short -typedef signed int s32; ///< 32-bit signed word -typedef signed long long s64; ///< 64-bit signed int - -// For using windows lock code -#define TCHAR char -#define LONG int - -#endif // _WIN32 - -typedef float f32; ///< 32-bit floating point -typedef double f64; ///< 64-bit floating point +typedef float f32; ///< 32-bit floating point +typedef double f64; ///< 64-bit floating point #include "common/common.h" -- cgit v1.2.3