Core/Misc: Fix no-pch build
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user