1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-24 12:44:10 +01:00

Codechange: Use parameterised GetString() in network-related windows. (#13635)

This commit is contained in:
Peter Nelson
2025-02-22 13:16:47 +00:00
committed by GitHub
parent 847fbe3348
commit 2b80812922
6 changed files with 82 additions and 118 deletions

View File

@@ -725,9 +725,9 @@ int GetStringHeight(StringID str, int maxw)
* @param maxw maximum string width
* @return number of lines of string when it is drawn
*/
int GetStringLineCount(StringID str, int maxw)
int GetStringLineCount(std::string_view str, int maxw)
{
Layouter layout(GetString(str), maxw);
Layouter layout(str, maxw);
return (uint)layout.size();
}