[11319] Revert "[11318] Check for NaN values in IsValidMapCoord() functions." Function finite(X) always(!) checks for NaN values.

Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
Ambal 2011-04-06 10:34:37 +03:00
parent cce8f56160
commit 0f12e9cc3e
3 changed files with 4 additions and 6 deletions

View file

@ -169,7 +169,7 @@ namespace MaNGOS
inline bool IsValidMapCoord(float c)
{
return !isnan(c) && finite(c) && (std::fabs(c) <= MAP_HALFSIZE - 0.5);
return finite(c) && (std::fabs(c) <= MAP_HALFSIZE - 0.5);
}
inline bool IsValidMapCoord(float x, float y)
@ -179,12 +179,12 @@ namespace MaNGOS
inline bool IsValidMapCoord(float x, float y, float z)
{
return IsValidMapCoord(x,y) && (!isnan(z) && finite(z));
return IsValidMapCoord(x,y) && finite(z);
}
inline bool IsValidMapCoord(float x, float y, float z, float o)
{
return IsValidMapCoord(x,y,z) && (!isnan(0) && finite(o));
return IsValidMapCoord(x,y,z) && finite(o);
}
}
#endif

View file

@ -125,13 +125,11 @@ typedef off_t ACE_OFF_T;
# define snprintf _snprintf
# define vsnprintf _vsnprintf
# define finite(X) _finite(X)
# define isnan(x) _isnan(x)
#else
# define stricmp strcasecmp
# define strnicmp strncasecmp
# define isnan(x) std::isnan(x)
# define I32FMT "%08X"
# if ACE_SIZEOF_LONG == 8

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11318"
#define REVISION_NR "11319"
#endif // __REVISION_NR_H__