summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWoazboat <f.kargl@posteo.de>2015-05-05 22:21:07 +0200
committerWoazboat <f.kargl@posteo.de>2015-05-08 15:12:33 +0200
commited404bc2f6488a59da280697ad6c3a8ffcbab0fd (patch)
tree21440626838c8dc8d30e780f779f24ae8fe3dcbe /src
parentChanged Vector3 Equals function to avoid using memcmp (diff)
downloadcuberite-ed404bc2f6488a59da280697ad6c3a8ffcbab0fd.tar
cuberite-ed404bc2f6488a59da280697ad6c3a8ffcbab0fd.tar.gz
cuberite-ed404bc2f6488a59da280697ad6c3a8ffcbab0fd.tar.bz2
cuberite-ed404bc2f6488a59da280697ad6c3a8ffcbab0fd.tar.lz
cuberite-ed404bc2f6488a59da280697ad6c3a8ffcbab0fd.tar.xz
cuberite-ed404bc2f6488a59da280697ad6c3a8ffcbab0fd.tar.zst
cuberite-ed404bc2f6488a59da280697ad6c3a8ffcbab0fd.zip
Diffstat (limited to '')
-rw-r--r--src/Vector3.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Vector3.h b/src/Vector3.h
index 6164721da..d454fda06 100644
--- a/src/Vector3.h
+++ b/src/Vector3.h
@@ -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