Replace typedefs by c++11 alias declaration

This commit is contained in:
Daniel Chappuis 2016-07-06 07:05:34 +02:00
parent 942b63b48d
commit be957ba41a
4 changed files with 12 additions and 12 deletions

View File

@ -34,7 +34,7 @@
namespace reactphysics3d { namespace reactphysics3d {
// Type definitions // Type definitions
typedef unsigned int Bits; using Bits = unsigned int;
// Class Simplex // Class Simplex
/** /**

View File

@ -46,15 +46,15 @@ namespace reactphysics3d {
// ------------------- Type definitions ------------------- // // ------------------- Type definitions ------------------- //
typedef unsigned int uint; using uint = unsigned int;
typedef long unsigned int luint; using luint = long unsigned int;
typedef luint bodyindex; using bodyindex = luint;
typedef std::pair<bodyindex, bodyindex> bodyindexpair; using bodyindexpair = std::pair<bodyindex, bodyindex>;
typedef signed short int16; using int16 = signed short;
typedef signed int int32; using int32 = signed int;
typedef unsigned short uint16; using uint16 = unsigned short;
typedef unsigned int uint32; using uint32 = unsigned int;
// ------------------- Enumerations ------------------- // // ------------------- Enumerations ------------------- //

View File

@ -30,9 +30,9 @@
namespace reactphysics3d { namespace reactphysics3d {
#if defined(IS_DOUBLE_PRECISION_ENABLED) // If we are compiling for double precision #if defined(IS_DOUBLE_PRECISION_ENABLED) // If we are compiling for double precision
typedef double decimal; using decimal = double;
#else // If we are compiling for single precision #else // If we are compiling for single precision
typedef float decimal; using decimal = float;
#endif #endif
} }

View File

@ -35,7 +35,7 @@
namespace reactphysics3d { namespace reactphysics3d {
// Type for the overlapping pair ID // Type for the overlapping pair ID
typedef std::pair<uint, uint> overlappingpairid; using overlappingpairid = std::pair<uint, uint>;
// Class OverlappingPair // Class OverlappingPair
/** /**