MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / appendChar

Method appendChar

common/script/scriptconsole.cpp:84–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void ScriptConsole::appendChar(char c)
85{
86 if (!mOpen || mLines.empty() || mLines.back().size() >= mWidth) {
87 mLines.push_back(std::string());
88 mLines.back().reserve(mWidth);
89 mOpen = true;
90 while (mLines.size() > MAX_LINES) {
91 mLines.pop_front();
92 }
93 }
94 mLines.back().push_back(c);
95}
96
97void ScriptConsole::write(const char* data, size_t len)
98{

Callers

nothing calls this directly

Calls 5

stringFunction · 0.85
backMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected