Remove Format/FormatArgs from the core/logic bridge.

This commit is contained in:
David Anderson
2015-08-30 18:03:31 -07:00
parent 2d40af31a2
commit 9ba1363d86
15 changed files with 84 additions and 75 deletions
+3 -2
View File
@@ -35,6 +35,7 @@
#include <ITextParsers.h>
#include <ctype.h>
#include "stringutil.h"
#include <am-string.h>
inline const char *_strstr(const char *str, const char *substr)
{
@@ -141,7 +142,7 @@ static cell_t sm_numtostr(IPluginContext *pCtx, const cell_t *params)
{
char *str;
pCtx->LocalToString(params[2], &str);
size_t res = smcore.Format(str, params[3], "%d", params[1]);
size_t res = ke::SafeSprintf(str, params[3], "%d", params[1]);
return static_cast<cell_t>(res);
}
@@ -174,7 +175,7 @@ static cell_t sm_floattostr(IPluginContext *pCtx, const cell_t *params)
{
char *str;
pCtx->LocalToString(params[2], &str);
size_t res = smcore.Format(str, params[3], "%f", sp_ctof(params[1]));
size_t res = ke::SafeSprintf(str, params[3], "%f", sp_ctof(params[1]));
return static_cast<cell_t>(res);
}