Use const std::string& where possible in function params

If it's at all possible to use `const std::string&` when passing
`std::string`s around, then we use it. This is to limit the amount of
memory usage as a result of the frequent use of `std::string`s, so the
game no longer unnecessarily copies strings when it doesn't need to.
This commit is contained in:
Misa
2021-09-06 15:41:49 -07:00
parent ff07f9c268
commit 33c5b8b7c0
10 changed files with 49 additions and 49 deletions

View File

@@ -107,7 +107,7 @@ void textboxclass::resize(void)
h = (line.size() + 2) * 8;
}
void textboxclass::addline(std::string t)
void textboxclass::addline(const std::string& t)
{
line.push_back(t);
resize();