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

Method copyWindow

common/script/scriptconsole.cpp:285–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285void ScriptConsole::copyWindow(size_t first, size_t count, std::vector<std::string>& out) const
286{
287 out.clear();
288 std::lock_guard<std::mutex> lock(mMutex);
289 if (first >= mLines.size()) {
290 return;
291 }
292 const size_t last = std::min(mLines.size(), first + count);
293 out.reserve(last - first);
294 for (size_t i = first; i < last; i++) {
295 out.push_back(mLines[i]);
296 }
297}
298
299ScriptConsole::ProgressSnapshot ScriptConsole::progress(void) const
300{

Callers 1

windowMethod · 0.80

Calls 3

clearMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected