Ensure the correct order of files and the TOC.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
b53e99306c
commit
d0738891c2
|
@ -58,7 +58,7 @@ book read(const fs::path filepath, const bool raw)
|
|||
{
|
||||
doc.text_raw = zip::read_file(filepath, entry);
|
||||
}
|
||||
current_book.files.insert({entry, doc});
|
||||
current_book.files.emplace_back(entry, doc);
|
||||
}
|
||||
|
||||
return current_book;
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace epubgrep::book
|
||||
{
|
||||
|
@ -41,9 +43,9 @@ struct document
|
|||
//! EPUB file.
|
||||
struct book
|
||||
{
|
||||
std::map<string, document> files; //!< filename, file
|
||||
std::map<string, string> toc; //!< title, href
|
||||
string language; //!< Book language
|
||||
std::vector<std::pair<string, document>> files; //!< filename, file
|
||||
std::vector<std::pair<string, string>> toc; //!< title, href
|
||||
string language; //!< Book language
|
||||
} __attribute__((aligned(128)));
|
||||
|
||||
//! Read and process book.
|
||||
|
|
Loading…
Reference in New Issue