1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-02 19:39:12 +00:00

Codechange: Make std::stack use std::vector container in string formatting/drawing. (#7305)

This is a very minor performance increase which can add up during operations such
as sorting. Performance impact my be platform/compiler dependent.
This commit is contained in:
2019-03-02 08:06:02 +00:00
committed by GitHub
parent 7ecfae8f7f
commit 63fe6c6598
2 changed files with 3 additions and 2 deletions

View File

@@ -791,7 +791,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
WChar b = '\0';
uint next_substr_case_index = 0;
char *buf_start = buff;
std::stack<const char *> str_stack;
std::stack<const char *, std::vector<const char *>> str_stack;
str_stack.push(str_arg);
for (;;) {