mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Move integer types to beast/CStdInt.h
This commit is contained in:
@@ -224,6 +224,8 @@ Some files contain portions of these external projects, licensed separately:
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#include "../../beast/CStdInt.h"
|
||||
|
||||
namespace beast
|
||||
{
|
||||
|
||||
|
||||
@@ -24,75 +24,6 @@
|
||||
#ifndef BEAST_MATHSFUNCTIONS_H_INCLUDED
|
||||
#define BEAST_MATHSFUNCTIONS_H_INCLUDED
|
||||
|
||||
//==============================================================================
|
||||
/*
|
||||
This file sets up some handy mathematical typdefs and functions.
|
||||
*/
|
||||
|
||||
//==============================================================================
|
||||
// Definitions for the int8, int16, int32, int64 and pointer_sized_int types.
|
||||
|
||||
/** A platform-independent 8-bit signed integer type. */
|
||||
typedef signed char int8;
|
||||
/** A platform-independent 8-bit unsigned integer type. */
|
||||
typedef unsigned char uint8;
|
||||
/** A platform-independent 16-bit signed integer type. */
|
||||
typedef signed short int16;
|
||||
/** A platform-independent 16-bit unsigned integer type. */
|
||||
typedef unsigned short uint16;
|
||||
/** A platform-independent 32-bit signed integer type. */
|
||||
typedef signed int int32;
|
||||
/** A platform-independent 32-bit unsigned integer type. */
|
||||
typedef unsigned int uint32;
|
||||
|
||||
#if BEAST_MSVC
|
||||
/** A platform-independent 64-bit integer type. */
|
||||
typedef __int64 int64;
|
||||
/** A platform-independent 64-bit unsigned integer type. */
|
||||
typedef unsigned __int64 uint64;
|
||||
/** A platform-independent macro for writing 64-bit literals, needed because
|
||||
different compilers have different syntaxes for this.
|
||||
|
||||
E.g. writing literal64bit (0x1000000000) will translate to 0x1000000000LL for
|
||||
GCC, or 0x1000000000 for MSVC.
|
||||
*/
|
||||
#define literal64bit(longLiteral) ((__int64) longLiteral)
|
||||
#else
|
||||
/** A platform-independent 64-bit integer type. */
|
||||
typedef long long int64;
|
||||
/** A platform-independent 64-bit unsigned integer type. */
|
||||
typedef unsigned long long uint64;
|
||||
/** A platform-independent macro for writing 64-bit literals, needed because
|
||||
different compilers have different syntaxes for this.
|
||||
|
||||
E.g. writing literal64bit (0x1000000000) will translate to 0x1000000000LL for
|
||||
GCC, or 0x1000000000 for MSVC.
|
||||
*/
|
||||
#define literal64bit(longLiteral) (longLiteral##LL)
|
||||
#endif
|
||||
|
||||
|
||||
#if BEAST_64BIT
|
||||
/** A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
|
||||
typedef int64 pointer_sized_int;
|
||||
/** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
|
||||
typedef uint64 pointer_sized_uint;
|
||||
#elif BEAST_MSVC
|
||||
/** A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
|
||||
typedef _W64 int pointer_sized_int;
|
||||
/** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
|
||||
typedef _W64 unsigned int pointer_sized_uint;
|
||||
#else
|
||||
/** A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
|
||||
typedef int pointer_sized_int;
|
||||
/** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
|
||||
typedef unsigned int pointer_sized_uint;
|
||||
#endif
|
||||
|
||||
#if BEAST_MSVC
|
||||
typedef pointer_sized_int ssize_t;
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
// Some indispensible min/max functions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user