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 {
// Type definitions
typedef unsigned int Bits;
using Bits = unsigned int;
// Class Simplex
/**

View File

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

View File

@ -30,9 +30,9 @@
namespace reactphysics3d {
#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
typedef float decimal;
using decimal = float;
#endif
}

View File

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