MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / DeleteAll

Method DeleteAll

src/textbuf.cpp:112–119  ·  view source on GitHub ↗

* Delete every character in the textbuffer */

Source from the content-addressed store, hash-verified

110 * Delete every character in the textbuffer
111 */
112void Textbuf::DeleteAll()
113{
114 this->buf.clear();
115 this->chars = 1;
116 this->pixels = this->caretpos = this->caretxoffs = 0;
117 this->markpos = this->markend = this->markxoffs = this->marklength = 0;
118 this->UpdateStringIter();
119}
120
121/**
122 * Insert a character to a textbuffer. If maxwidth of the Textbuf is zero,

Callers 9

TextbufMethod · 0.95
HandleKeyPressMethod · 0.95
UpdateSignEditWindowMethod · 0.80
IConsoleClearCommandFunction · 0.80
IConsoleHistoryNavigateFunction · 0.80
HandleEditBoxKeyMethod · 0.80
RandomTownNameMethod · 0.80
ClickEditBoxMethod · 0.80
OnClickMethod · 0.80

Calls 2

UpdateStringIterMethod · 0.95
clearMethod · 0.45

Tested by

no test coverage detected