From 7934b65de966837d401372e02d22cd9d3072eea9 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Sat, 9 Feb 2019 19:49:04 +0200 Subject: [PATCH] Don't compute string length twice. --- include/sqrat/sqratOverloadMethods.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sqrat/sqratOverloadMethods.h b/include/sqrat/sqratOverloadMethods.h index a512f142..b1bcc6d2 100644 --- a/include/sqrat/sqratOverloadMethods.h +++ b/include/sqrat/sqratOverloadMethods.h @@ -52,8 +52,8 @@ public: static void Get(const SQChar* name, int args, string & out) { SQChar buf[16] = {'_', 'o'}; - I32ToA_(args, &buf[2]); - out.append(buf); + unsigned l = I32ToA(args, &buf[2]); + out.append(buf, l); out.push_back('_'); out.append(name); }