From 818cb4921be0d1ee6874a7231ced5f056d2ee867 Mon Sep 17 00:00:00 2001 From: Dave Allie Date: Sun, 21 Dec 2025 16:47:54 +1100 Subject: [PATCH] Formatting --- lib/Epub/Epub.cpp | 2 +- lib/Epub/Epub/EpubTocEntry.h | 6 +++--- lib/Epub/Epub/parsers/TocNcxParser.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Epub/Epub.cpp b/lib/Epub/Epub.cpp index 8b8701e..cc3bc90 100644 --- a/lib/Epub/Epub.cpp +++ b/lib/Epub/Epub.cpp @@ -107,7 +107,7 @@ bool Epub::parseTocNcxFile() { return false; } - const auto ncxBuffer = static_cast(malloc(1024)); + const auto ncxBuffer = static_cast(malloc(1024)); if (!ncxBuffer) { Serial.printf("[%lu] [EBP] Could not allocate memory for toc ncx parser\n", millis()); return false; diff --git a/lib/Epub/Epub/EpubTocEntry.h b/lib/Epub/Epub/EpubTocEntry.h index 27a2ba4..94f0c90 100644 --- a/lib/Epub/Epub/EpubTocEntry.h +++ b/lib/Epub/Epub/EpubTocEntry.h @@ -4,7 +4,7 @@ struct EpubTocEntry { std::string title; -std::string href; -std::string anchor; -uint8_t level; + std::string href; + std::string anchor; + uint8_t level; }; diff --git a/lib/Epub/Epub/parsers/TocNcxParser.cpp b/lib/Epub/Epub/parsers/TocNcxParser.cpp index 28e6b27..0a613f3 100644 --- a/lib/Epub/Epub/parsers/TocNcxParser.cpp +++ b/lib/Epub/Epub/parsers/TocNcxParser.cpp @@ -155,7 +155,7 @@ void XMLCALL TocNcxParser::endElement(void* userData, const XML_Char* name) { } // Push to vector - self->toc.push_back({ std::move(self->currentLabel), std::move(href), std::move(anchor), self->currentDepth }); + self->toc.push_back({std::move(self->currentLabel), std::move(href), std::move(anchor), self->currentDepth}); // Clear them so we don't re-add them if there are weird XML structures self->currentLabel.clear();