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

Codechange: Use Utf8View::iterator in StringIterator.

This commit is contained in:
frosch
2025-04-01 14:58:16 +02:00
committed by frosch
parent b19e43ae99
commit 83401ad5e2
7 changed files with 53 additions and 79 deletions

View File

@@ -291,7 +291,7 @@ const char *Textbuf::GetText() const
/** Update the character iter after the text has changed. */
void Textbuf::UpdateStringIter()
{
this->char_iter->SetString(this->buf.c_str());
this->char_iter->SetString(this->buf);
size_t pos = this->char_iter->SetCurPosition(this->caretpos);
this->caretpos = pos == StringIterator::END ? 0 : (uint16_t)pos;
}