aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2014-05-25 15:33:56 +0200
committerjackpoz <giacomopoz@gmail.com>2014-05-25 15:48:06 +0200
commitb4327bfc69ce7e1243f53256b8a55f8c5c0ac2f1 (patch)
tree0cea147150543624577f6a8ba5bc42cc52ffc3ba
parent2f0f8f8018f4786b9e3e3eab9a9ec17c02668923 (diff)
Core/Misc: Fix no-pch build
-rw-r--r--src/server/collision/Maps/MapTree.cpp2
-rw-r--r--src/server/shared/Packets/ByteBuffer.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp
index 60069b5c81f..d592d795125 100644
--- a/src/server/collision/Maps/MapTree.cpp
+++ b/src/server/collision/Maps/MapTree.cpp
@@ -157,7 +157,7 @@ namespace VMAP
{
float maxDist = (pos2 - pos1).magnitude();
// return false if distance is over max float, in case of cheater teleporting to the end of the universe
- if (maxDist == std::numeric_limits<float>::max() || !isfinite(maxDist))
+ if (maxDist == std::numeric_limits<float>::max() || !std::isfinite(maxDist))
return false;
// valid map coords should *never ever* produce float overflow, but this would produce NaNs too
diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h
index e06556423aa..9f766a72d19 100644
--- a/src/server/shared/Packets/ByteBuffer.h
+++ b/src/server/shared/Packets/ByteBuffer.h
@@ -31,6 +31,7 @@
#include <vector>
#include <cstring>
#include <time.h>
+#include <math.h>
// Root of ByteBuffer exception hierarchy
class ByteBufferException : public std::exception
@@ -241,7 +242,7 @@ class ByteBuffer
ByteBuffer &operator>>(float &value)
{
value = read<float>();
- if (!isfinite(value))
+ if (!std::isfinite(value))
throw ByteBufferException();
return *this;
}
@@ -249,7 +250,7 @@ class ByteBuffer
ByteBuffer &operator>>(double &value)
{
value = read<double>();
- if (!isfinite(value))
+ if (!std::isfinite(value))
throw ByteBufferException();
return *this;
}