clang format all of this

This commit is contained in:
2026-01-02 18:23:09 +01:00
parent 8c83bf9df1
commit 3a9b2647d1
9 changed files with 26 additions and 24 deletions

View File

@@ -12,7 +12,7 @@ class LCDDisplay {
private:
int _lcd = -1;
std::string _dev;
std::array<char, LCD_LINES * LCD_COLS + 8> writebuf{}; // 4x40 chars + 2x4 setcursor commands
std::array<char, LCD_LINES * LCD_COLS + 8> writebuf{}; // 4x40 chars + 2x4 setcursor commands
static constexpr bool dualDisp = (LCD_LINES * LCD_COLS > 80); // is it dual display device or not, evauluated from the size at compile time
void open(bool reopen = false);

View File

@@ -8,7 +8,9 @@
namespace cpu {
enum Module : uint8_t { unknown, k10temp, zenpower };
enum Module : uint8_t { unknown,
k10temp,
zenpower };
struct cpuSensors {
Module module = unknown;

View File

@@ -69,9 +69,9 @@ void log(LOG level, const std::source_location& loc, std::format_string<Args...>
{
auto now = std::chrono::system_clock::now();
auto local = std::chrono::current_zone()->to_local(now);
std::string msg = std::format("{:%x %H:%M:%S }", floor<std::chrono::milliseconds>(local)); // timestamp
std::format_to(std::back_inserter(msg), pattern, color, pFname(loc.function_name()), reset); // tag
std::format_to(std::back_inserter(msg), str, std::forward<Args>(args)...); // actual log message
std::string msg = std::format("{:%x %H:%M:%S }", floor<std::chrono::milliseconds>(local)); // timestamp
std::format_to(std::back_inserter(msg), pattern, color, pFname(loc.function_name()), reset); // tag
std::format_to(std::back_inserter(msg), str, std::forward<Args>(args)...); // actual log message
std::scoped_lock lock(fmtx);
gzFile file = gzopen(LOG_FILE_LOCATION, "ab");
@@ -82,7 +82,7 @@ void log(LOG level, const std::source_location& loc, std::format_string<Args...>
}
#endif
}
}
} // namespace utils
#else

View File

@@ -3,11 +3,12 @@
#include <fcntl.h>
#include <unistd.h>
#include <array>
#include <charconv>
#include <cstdint>
#include <log.hpp>
#include <filesystem>
#include <log.hpp>
#include <string>
namespace utils {
@@ -54,7 +55,6 @@ inline ssize_t readFile(const std::string& path, std::array<char, N>& buffer) {
return len;
}
/* reads a number fast and divides it if needed */
template <uint32_t Divider = 1, typename T, size_t N>
inline void fastReadNum(const std::string& path, std::array<char, N>& buf, T& result) {