Codechange: Use StringBuilder to create encoded strings.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "script_object.hpp"
|
||||
#include "../../strings_func.h"
|
||||
#include "../../core/string_builder.hpp"
|
||||
|
||||
#include <variant>
|
||||
|
||||
@@ -141,7 +142,7 @@ private:
|
||||
|
||||
ParamCheck(StringIndexInTab owner, int idx, Param *param) : owner(owner), idx(idx), param(param) {}
|
||||
|
||||
void Encode(std::back_insert_iterator<std::string> &output, std::string_view cmd);
|
||||
void Encode(StringBuilder &output, std::string_view cmd);
|
||||
};
|
||||
|
||||
using ParamList = std::vector<ParamCheck>;
|
||||
@@ -168,7 +169,7 @@ private:
|
||||
* @param args The parameters to be consumed.
|
||||
* @param first Whether it's the first call in the recursion.
|
||||
*/
|
||||
void _GetEncodedText(std::back_insert_iterator<std::string> &output, int ¶m_count, ParamSpan args, bool first);
|
||||
void _GetEncodedText(StringBuilder &output, int ¶m_count, ParamSpan args, bool first);
|
||||
|
||||
/**
|
||||
* Set a parameter, where the value is the first item on the stack.
|
||||
|
||||
Reference in New Issue
Block a user