Don't compute string length twice.

This commit is contained in:
Sandu Liviu Catalin
2019-02-09 19:49:04 +02:00
parent d0c8dc3071
commit 7934b65de9
+2 -2
View File
@@ -52,8 +52,8 @@ public:
static void Get(const SQChar* name, int args, string & out) { static void Get(const SQChar* name, int args, string & out) {
SQChar buf[16] = {'_', 'o'}; SQChar buf[16] = {'_', 'o'};
I32ToA_(args, &buf[2]); unsigned l = I32ToA(args, &buf[2]);
out.append(buf); out.append(buf, l);
out.push_back('_'); out.push_back('_');
out.append(name); out.append(name);
} }