Formatting

This commit is contained in:
Dave Allie 2025-12-21 16:47:54 +11:00
parent e8c6fac0a4
commit 818cb4921b
No known key found for this signature in database
GPG Key ID: F2FDDB3AD8D0276F
3 changed files with 5 additions and 5 deletions

View File

@ -107,7 +107,7 @@ bool Epub::parseTocNcxFile() {
return false;
}
const auto ncxBuffer = static_cast<uint8_t *>(malloc(1024));
const auto ncxBuffer = static_cast<uint8_t*>(malloc(1024));
if (!ncxBuffer) {
Serial.printf("[%lu] [EBP] Could not allocate memory for toc ncx parser\n", millis());
return false;

View File

@ -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;
};

View File

@ -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();