mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-27 21:39:37 +00:00
Book::Illustration got dimensions
This commit is contained in:
@ -226,8 +226,12 @@ void Book::setPath(const std::string& path)
|
||||
|
||||
const Book::Illustration& Book::getDefaultIllustration() const
|
||||
{
|
||||
assert(m_illustrations.size() == 1);
|
||||
return *m_illustrations.front();
|
||||
for ( const auto& ilPtr : m_illustrations ) {
|
||||
if (ilPtr->width == 48 && ilPtr->height == 48) {
|
||||
return *ilPtr;
|
||||
}
|
||||
}
|
||||
throw std::runtime_error("No default illustration");
|
||||
}
|
||||
|
||||
Book::Illustration& Book::getMutableDefaultIllustration()
|
||||
|
Reference in New Issue
Block a user