Formatting
This commit is contained in:
parent
e8c6fac0a4
commit
818cb4921b
@ -107,7 +107,7 @@ bool Epub::parseTocNcxFile() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto ncxBuffer = static_cast<uint8_t *>(malloc(1024));
|
const auto ncxBuffer = static_cast<uint8_t*>(malloc(1024));
|
||||||
if (!ncxBuffer) {
|
if (!ncxBuffer) {
|
||||||
Serial.printf("[%lu] [EBP] Could not allocate memory for toc ncx parser\n", millis());
|
Serial.printf("[%lu] [EBP] Could not allocate memory for toc ncx parser\n", millis());
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
struct EpubTocEntry {
|
struct EpubTocEntry {
|
||||||
std::string title;
|
std::string title;
|
||||||
std::string href;
|
std::string href;
|
||||||
std::string anchor;
|
std::string anchor;
|
||||||
uint8_t level;
|
uint8_t level;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -155,7 +155,7 @@ void XMLCALL TocNcxParser::endElement(void* userData, const XML_Char* name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Push to vector
|
// 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
|
// Clear them so we don't re-add them if there are weird XML structures
|
||||||
self->currentLabel.clear();
|
self->currentLabel.clear();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user