No more warnings for use of long long

This commit is contained in:
Christophe Riccio 2016-07-16 22:25:09 +02:00
parent 0671e609bb
commit c80e142816
2 changed files with 41 additions and 21 deletions

View File

@ -43,9 +43,9 @@ namespace detail
# pragma GCC diagnostic pop # pragma GCC diagnostic pop
# elif GLM_COMPILER & GLM_COMPILER_CLANG # elif (GLM_COMPILER & GLM_COMPILER_CLANG)
# pragma clang diagnostic push # pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wno-c++11-long-long" # pragma clang diagnostic ignored "-Wc++11-long-long"
typedef signed long long sint64; typedef signed long long sint64;
typedef unsigned long long uint64; typedef unsigned long long uint64;
@ -109,12 +109,6 @@ namespace detail
typedef long type; typedef long type;
}; };
template <>
struct make_signed<long long>
{
typedef long long type;
};
template <> template <>
struct make_signed<unsigned char> struct make_signed<unsigned char>
{ {
@ -139,12 +133,6 @@ namespace detail
typedef long type; typedef long type;
}; };
template <>
struct make_signed<unsigned long long>
{
typedef long long type;
};
template <typename genType> template <typename genType>
struct make_unsigned struct make_unsigned
{}; {};
@ -173,12 +161,6 @@ namespace detail
typedef unsigned long type; typedef unsigned long type;
}; };
template <>
struct make_unsigned<long long>
{
typedef unsigned long long type;
};
template <> template <>
struct make_unsigned<unsigned char> struct make_unsigned<unsigned char>
{ {
@ -203,11 +185,48 @@ namespace detail
typedef unsigned long type; typedef unsigned long type;
}; };
# if GLM_COMPILER & GLM_COMPILER_GCC
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wno-long-long"
# endif
# if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wc++11-long-long"
# endif
template <>
struct make_signed<long long>
{
typedef long long type;
};
template <>
struct make_signed<unsigned long long>
{
typedef long long type;
};
template <>
struct make_unsigned<long long>
{
typedef unsigned long long type;
};
template <> template <>
struct make_unsigned<unsigned long long> struct make_unsigned<unsigned long long>
{ {
typedef unsigned long long type; typedef unsigned long long type;
}; };
# if GLM_COMPILER & GLM_COMPILER_GCC
# pragma GCC diagnostic pop
# endif
# if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic pop
# endif
# endif//GLM_HAS_MAKE_SIGNED # endif//GLM_HAS_MAKE_SIGNED
}//namespace detail }//namespace detail

View File

@ -79,6 +79,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
- Added PowerPC CPUs detection - Added PowerPC CPUs detection
- Use Cuda built-in function for abs function implementation with Cuda compiler - Use Cuda built-in function for abs function implementation with Cuda compiler
- Factorized GLM_COMPILER_LLVM and GLM_COMPILER_APPLE_CLANG into GLM_COMPILER_CLANG - Factorized GLM_COMPILER_LLVM and GLM_COMPILER_APPLE_CLANG into GLM_COMPILER_CLANG
- No more warnings for use of long long
##### Fixes: ##### Fixes:
- Fixed GTX_extended_min_max filename typo #386 - Fixed GTX_extended_min_max filename typo #386