summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
authorPeterN <peter@fuzzle.org>2019-03-02 08:06:02 +0000
committerGitHub <noreply@github.com>2019-03-02 08:06:02 +0000
commit63fe6c65983a4cf2eba4995d03abd7e8a39c4a43 (patch)
tree7e96914c221dc953e127a2c839692d049f25d84a /src/strings.cpp
parent7ecfae8f7f42906065d8861d424271c1a412ff12 (diff)
downloadopenttd-63fe6c65983a4cf2eba4995d03abd7e8a39c4a43.tar.xz
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.
Diffstat (limited to 'src/strings.cpp')
-rw-r--r--src/strings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index 2cc3a23be..a3ece9830 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -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 (;;) {