MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / GetAnsiEscapeCode

Function GetAnsiEscapeCode

modules/core/core/src/core/log/log_sink.cpp:233–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231#endif
232
233static const std::string_view GetAnsiEscapeCode(std::string& buf, EConsoleColor front, EConsoleColor back, EConsoleStyle style) SKR_NOEXCEPT
234{
235 buf.clear();
236 const auto fcv = GetFrontColor<ANSI::FrontColorSpec>(front);
237 const auto bcv = GetBackColor<ANSI::BackColorSpec>(back);
238 const auto scv = GetStyle<ANSI::StyleSpec>(style);
239 buf.append(fcv).append(bcv).append(scv);
240 return buf;
241}
242}
243
244void LogConsoleSink::set_front_color(LogLevel level, EConsoleColor front) SKR_NOEXCEPT

Callers 1

sinkMethod · 0.85

Calls 2

clearMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected