mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Disable certain GCC pragmas when using other compilers
Fixes MSVC warning C4068 in public headers while keeping that warning disabled for uses of GCC pragmas in SFML source files.
This commit is contained in:
parent
0e16627677
commit
6451a29f49
@ -108,12 +108,16 @@ struct Vector4
|
||||
/// \param w Component of the 4D vector
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
#endif
|
||||
Vector4(T x, T y, T z, T w) : x(x), y(y), z(z), w(w)
|
||||
{
|
||||
}
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Conversion constructor
|
||||
|
@ -31,13 +31,17 @@ constexpr Vector2<T>::Vector2() : x(0), y(0)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
#endif
|
||||
template <typename T>
|
||||
constexpr Vector2<T>::Vector2(T x, T y) : x(x), y(y)
|
||||
{
|
||||
}
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -31,13 +31,17 @@ constexpr Vector3<T>::Vector3() : x(0), y(0), z(0)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
#endif
|
||||
template <typename T>
|
||||
constexpr Vector3<T>::Vector3(T x, T y, T z) : x(x), y(y), z(z)
|
||||
{
|
||||
}
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user