MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / LogCallback

Method LogCallback

PanzerChasm/console.cpp:230–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230void Console::LogCallback( std::string str, const Log::LogLevel log_level )
231{
232 lines_.emplace_back( std::move(str) );
233
234 if( lines_.size() == c_max_lines )
235 lines_.pop_front();
236
237 lines_position_= 0u;
238
239 if( log_level == Log::LogLevel::User )
240 {
241 user_messages_.emplace_back();
242 user_messages_.back().text= lines_.back();
243 user_messages_.back().time= Time::CurrentTime();
244 }
245}
246
247void Console::WriteHistory()
248{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected