diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-12-07 18:51:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-07 18:51:18 +0100 |
| commit | 8bbeee11734d3ba8e2cf15d19cb3c302f8bfdbf2 (patch) | |
| tree | 5b6654818049a0743f62defc090e86d4327cccbb /src/debug/Log.cpp | |
| parent | b1e5cc66bdb20b002c93479490c3a317552210b3 (diff) | |
core: Add clang-tidy (#8664)
This adds a .clang-tidy file for us.
It's not a strict requirement to be compliant, but I tuned it to be alright.
Diffstat (limited to 'src/debug/Log.cpp')
| -rw-r--r-- | src/debug/Log.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/debug/Log.cpp b/src/debug/Log.cpp index 5a314833..1563628c 100644 --- a/src/debug/Log.cpp +++ b/src/debug/Log.cpp @@ -18,7 +18,7 @@ void Debug::close() { logOfs.close(); } -void Debug::log(LogLevel level, std::string str) { +void Debug::log(eLogLevel level, std::string str) { if (level == TRACE && !trace) return; @@ -26,6 +26,7 @@ void Debug::log(LogLevel level, std::string str) { return; std::string coloredStr = str; + //NOLINTBEGIN switch (level) { case LOG: str = "[LOG] " + str; @@ -53,13 +54,14 @@ void Debug::log(LogLevel level, std::string str) { break; default: break; } + //NOLINTEND rollingLog += str + "\n"; if (rollingLog.size() > ROLLING_LOG_SIZE) rollingLog = rollingLog.substr(rollingLog.size() - ROLLING_LOG_SIZE); - if (RollingLogFollow::Get().IsRunning()) - RollingLogFollow::Get().AddLog(str); + if (SRollingLogFollow::get().isRunning()) + SRollingLogFollow::get().addLog(str); if (!disableLogs || !**disableLogs) { // log to a file |
