Ensure the correct order of files and the TOC.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
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,8 +43,8 @@ struct document
|
||||
//! EPUB file.
|
||||
struct book
|
||||
{
|
||||
std::map<string, document> files; //!< filename, file
|
||||
std::map<string, string> toc; //!< title, href
|
||||
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)));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user