diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-09-09 16:36:47 -0400 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-09-09 16:36:47 -0400 |
commit | cd23f9f22ce463e78d2a52b37798fbfd75ac9631 (patch) | |
tree | dd35e90c0f40098addfd86cabfe1a8fc28a5b3eb /floattypes.h | |
parent | 3ceeb3729cf510ba5c27a1d90d0ff31d0e90c158 (diff) | |
download | vecmathlib-cd23f9f22ce463e78d2a52b37798fbfd75ac9631.zip vecmathlib-cd23f9f22ce463e78d2a52b37798fbfd75ac9631.tar.gz |
Prefer "long" over "long long" if both types are the same
Diffstat (limited to 'floattypes.h')
-rw-r--r-- | floattypes.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/floattypes.h b/floattypes.h index e1ce044..1964fcf 100644 --- a/floattypes.h +++ b/floattypes.h @@ -52,8 +52,16 @@ namespace vml_std { typedef ::int16_t int16_t; typedef ::uint32_t uint32_t; typedef ::int32_t int32_t; +#if __SIZEOF_LONG__ == 8 + // Even if both "long" and "long long" have the same size, they are + // still different types. In many cases, it is then preferable to + // use "long" instead of "long long" in this case. + typedef unsigned long uint64_t; + typedef long int64_t; +#else typedef ::uint64_t uint64_t; typedef ::int64_t int64_t; +#endif |