1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 17:32:45 +01:00

Codechange: use const for std::string_view where appropriate

This commit is contained in:
Rubidium
2025-04-29 07:10:48 +02:00
committed by rubidium42
parent 78250c3bba
commit af25eecc15
34 changed files with 87 additions and 87 deletions

View File

@@ -417,7 +417,7 @@ Textbuf::Textbuf(uint16_t max_bytes, uint16_t max_chars)
* Copy a string into the textbuffer.
* @param text Source.
*/
void Textbuf::Assign(const std::string_view text)
void Textbuf::Assign(std::string_view text)
{
size_t bytes = std::min<size_t>(this->max_bytes - 1, text.size());
this->buf = StrMakeValid(text.substr(0, bytes));