Fix code formatting and include order

Break long line in BookMetadataCache.cpp for better readability and move include directive to top of file in Logging.cpp to follow style guidelines.
This commit is contained in:
Justin Mitchell
2026-06-21 01:24:22 -04:00
parent 4e156e1617
commit 4e352b9894
18 changed files with 639 additions and 199 deletions
+2 -1
View File
@@ -496,7 +496,8 @@ BookMetadataCache::TocEntry BookMetadataCache::getTocEntry(const int index) {
BookMetadataCache::SpineEntry BookMetadataCache::readSpineEntry(HalFile& file) const {
SpineEntry entry;
if (!readStringBounded(file, entry.href) ||
file.read(&entry.cumulativeSize, sizeof(entry.cumulativeSize)) != static_cast<int>(sizeof(entry.cumulativeSize)) ||
file.read(&entry.cumulativeSize, sizeof(entry.cumulativeSize)) !=
static_cast<int>(sizeof(entry.cumulativeSize)) ||
file.read(&entry.tocIndex, sizeof(entry.tocIndex)) != static_cast<int>(sizeof(entry.tocIndex))) {
LOG_ERR("BMC", "Invalid spine cache entry");
return {};
+2 -2
View File
@@ -1,10 +1,10 @@
#include "Logging.h"
#include <BoardConfig.h>
#include <esp_rom_sys.h>
#include <string>
#include "Logging.h"
#define MAX_ENTRY_LEN 256
#define MAX_LOG_LINES 16
+2 -2
View File
@@ -222,8 +222,8 @@ bool HalClock::syncFromNTP() {
_cachedHour = dt.hour;
_cachedMinute = dt.minute;
_hasCachedTime = true;
LOG_INF("CLK", "RTC set to %04u-%02u-%02u %02u:%02u:%02u UTC", dt.year, dt.month, dt.day, dt.hour,
dt.minute, dt.second);
LOG_INF("CLK", "RTC set to %04u-%02u-%02u %02u:%02u:%02u UTC", dt.year, dt.month, dt.day, dt.hour, dt.minute,
dt.second);
return true;
}
return false;