1
0
Fork 0

Ignoring Clang warnings for strict float comparison in Vector::Equals()

This commit is contained in:
Woazboat 2015-05-05 22:21:07 +02:00
parent 689fe6041c
commit ed404bc2f6
1 changed files with 11 additions and 1 deletions

View File

@ -124,9 +124,19 @@ public:
inline bool Equals(const Vector3<T> & a_Rhs) const
{
// Perform a bitwise comparison of the contents - we want to know whether this object is exactly equal
// Perform a strict comparison of the contents - we want to know whether this object is exactly equal
// To perform EPS-based comparison, use the EqualsEps() function
#ifndef __GNUC__
#pragma clang diagnostics push
#pragma clang diagnostics ignored "-Wfloat-equal"
#endif
return !((x != a_Rhs.x) || (y != a_Rhs.y) || (z != a_Rhs.z));
#ifndef __GNUC__
#pragma clang diagnostics pop
#endif
}
inline bool EqualsEps(const Vector3<T> & a_Rhs, T a_Eps) const