mirror of https://github.com/kiwix/libkiwix.git
Dropped Book::getMutableDefaultIllustration()
Now a Book is created without a default illustration.
This commit is contained in:
parent
bd29c4c7ef
commit
c8da5eea2b
|
@ -120,7 +120,6 @@ class Book
|
|||
private: // functions
|
||||
std::string getCategoryFromTags() const;
|
||||
const Illustration& getDefaultIllustration() const;
|
||||
Illustration& getMutableDefaultIllustration();
|
||||
|
||||
protected: // data
|
||||
std::string m_id;
|
||||
|
|
|
@ -40,8 +40,6 @@ Book::Book() :
|
|||
m_pathValid(false),
|
||||
m_readOnly(false)
|
||||
{
|
||||
const auto illustration = std::make_shared<Illustration>();
|
||||
m_illustrations.assign(1, illustration);
|
||||
}
|
||||
|
||||
/* Destructor */
|
||||
|
@ -243,12 +241,6 @@ const Book::Illustration& Book::getDefaultIllustration() const
|
|||
throw std::runtime_error("No default illustration");
|
||||
}
|
||||
|
||||
Book::Illustration& Book::getMutableDefaultIllustration()
|
||||
{
|
||||
const Book* const const_this = this;
|
||||
return const_cast<Illustration&>(const_this->getDefaultIllustration());
|
||||
}
|
||||
|
||||
const std::string& Book::Illustration::getData() const
|
||||
{
|
||||
if (data.empty() && !url.empty()) {
|
||||
|
|
Loading…
Reference in New Issue