From 38532ccdad20485f1a4b79ca8d1acc19df67c00b Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 26 Feb 2007 08:50:25 +0000 Subject: [PATCH] removed redundant float native --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40543 --- core/smn_float.cpp | 14 -------------- plugins/include/float.inc | 8 -------- 2 files changed, 22 deletions(-) diff --git a/core/smn_float.cpp b/core/smn_float.cpp index 4973a22f..9f72c38a 100644 --- a/core/smn_float.cpp +++ b/core/smn_float.cpp @@ -163,19 +163,6 @@ static cell_t sm_FloatRound(IPluginContext *pCtx, const cell_t *params) return static_cast(val); } -static cell_t sm_FloatStr(IPluginContext *pCtx, const cell_t *params) -{ - char *str; - - pCtx->LocalToString(params[1], &str); - if (!strlen(str)) - { - return 0; - } - - return sp_ftoc((float)atof(str)); -} - static cell_t sm_FloatFraction(IPluginContext *pCtx, const cell_t *params) { float val = sp_ctof(params[1]); @@ -244,7 +231,6 @@ static cell_t sm_ArcTangent2(IPluginContext *pCtx, const cell_t *params) REGISTER_NATIVES(floatnatives) { {"float", sm_float}, - {"FloatStr", sm_FloatStr}, {"FloatMul", sm_FloatMul}, {"FloatDiv", sm_FloatDiv}, {"FloatAdd", sm_FloatAdd}, diff --git a/plugins/include/float.inc b/plugins/include/float.inc index 0d9f8139..f71ac877 100644 --- a/plugins/include/float.inc +++ b/plugins/include/float.inc @@ -41,14 +41,6 @@ enum floatround_method */ native Float:float(value); -/** - * Converts a string into a floating point value. - * - * @param str String to convert. - * @return Converted floating point number. - */ -native Float:FloatStr(const String:str[]); - /** * Multiplies two floats together. *