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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user