mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
One more usage of Book::getLanguages()
`Book::getLanguages()` is used instead of `Book::getLanguage()` when determining the set of languages for a collection of books.
This commit is contained in:
committed by
Matthieu Gautier
parent
51fcb90dc0
commit
2550306052
@ -223,7 +223,8 @@ typedef std::set<std::string> Languages;
|
||||
Languages getLanguages(const Library& lib, const Library::BookIdSet& bookIds) {
|
||||
Languages langs;
|
||||
for ( const auto& b : bookIds ) {
|
||||
langs.insert(lib.getBookById(b).getLanguage());
|
||||
const auto bookLangs = lib.getBookById(b).getLanguages();
|
||||
langs.insert(bookLangs.begin(), bookLangs.end());
|
||||
}
|
||||
return langs;
|
||||
}
|
||||
|
Reference in New Issue
Block a user