MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / updateBook

Method updateBook

src/RecentBooksStore.cpp:47–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void RecentBooksStore::updateBook(const std::string& path, const std::string& title, const std::string& author,
48 const std::string& coverBmpPath) {
49 auto it =
50 std::find_if(recentBooks.begin(), recentBooks.end(), [&](const RecentBook& book) { return book.path == path; });
51 if (it != recentBooks.end()) {
52 RecentBook& book = *it;
53 book.title = title;
54 book.author = author;
55 book.coverBmpPath = coverBmpPath;
56 saveToFile();
57 }
58}
59
60bool RecentBooksStore::removeByPath(const std::string& path) {
61 auto it =

Callers 1

loadRecentCoversMethod · 0.80

Calls 2

endMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected