MCPcopy Create free account
hub / github.com/DFHack/dfhack / flush_buffer

Method flush_buffer

library/ColorText.cpp:48–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46bool color_ostream::log_errors_to_stderr = false;
47
48void color_ostream::flush_buffer(bool flush)
49{
50 auto buffer = buf();
51 auto str = buffer->str();
52
53 if (!str.empty()) {
54 add_text(cur_color, buffer->str());
55 buffer->str(std::string());
56 }
57
58 if (flush)
59 flush_proxy();
60}
61
62void color_ostream::begin_batch()
63{

Callers 1

syncMethod · 0.80

Calls 3

bufFunction · 0.85
strMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected