mirror of https://github.com/kiwix/libkiwix.git
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:
parent
51fcb90dc0
commit
2550306052
|
@ -223,7 +223,8 @@ typedef std::set<std::string> Languages;
|
||||||
Languages getLanguages(const Library& lib, const Library::BookIdSet& bookIds) {
|
Languages getLanguages(const Library& lib, const Library::BookIdSet& bookIds) {
|
||||||
Languages langs;
|
Languages langs;
|
||||||
for ( const auto& b : bookIds ) {
|
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;
|
return langs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue