Fix Windows build, again.

This commit is contained in:
David Anderson
2014-04-22 20:04:12 -07:00
parent cb32e3d8f9
commit c64edf31fc
3 changed files with 17 additions and 3 deletions
+2 -1
View File
@@ -35,6 +35,7 @@
#include "common_logic.h"
#include "MersenneTwister.h"
#include <IPluginSys.h>
#include <am-utility.h>
/****************************************
* *
@@ -119,7 +120,7 @@ static cell_t sm_FloatNe(IPluginContext *pCtx, const cell_t *params)
static cell_t sm_FloatNot(IPluginContext *pCtx, const cell_t *params)
{
float val = sp_ctof(params[1]);
if (isnan(val))
if (ke::IsNaN(val))
return 1;
return val ? 0 : 1;
}
+3 -2
View File
@@ -33,12 +33,12 @@
#include <ctype.h>
#include <stdarg.h>
#include <ITextParsers.h>
#include <float.h>
#include "sm_stringutil.h"
#include "Logger.h"
#include "PlayerManager.h"
#include "logic_bridge.h"
#include "sourcemod.h"
#include <am-utility.h>
#define LADJUST 0x00000004 /* left adjustment */
#define ZEROPAD 0x00000080 /* zero (as opposed to blank) pad */
@@ -214,7 +214,8 @@ void AddFloat(char **buf_p, size_t &maxlen, double fval, int width, int prec, in
int significant_digits = 0; // number of significant digits written
const int MAX_SIGNIFICANT_DIGITS = 16;
if (isnan(fval)) {
if (ke::IsNaN(fval))
{
AddString(buf_p, maxlen, "NaN", width, prec);
return;
}