| 45 | } |
| 46 | |
| 47 | void 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 | |
| 60 | bool RecentBooksStore::removeByPath(const std::string& path) { |
| 61 | auto it = |
no test coverage detected