mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-21 03:12:41 +01:00
Codechange: return std::string_view for Textbuf::GetText()
This commit is contained in:
@@ -281,9 +281,9 @@ void Textbuf::DiscardMarkedText(bool update)
|
||||
* Get the current text.
|
||||
* @return Current text.
|
||||
*/
|
||||
const char *Textbuf::GetText() const
|
||||
std::string_view Textbuf::GetText() const
|
||||
{
|
||||
return this->buf.c_str();
|
||||
return this->buf;
|
||||
}
|
||||
|
||||
/** Update the character iter after the text has changed. */
|
||||
|
||||
Reference in New Issue
Block a user