Dropped Book::getMutableDefaultIllustration()

Now a Book is created without a default illustration.
This commit is contained in:
Veloman Yunkan 2021-11-18 13:54:55 +04:00
parent bd29c4c7ef
commit c8da5eea2b
2 changed files with 0 additions and 9 deletions

View File

@ -120,7 +120,6 @@ class Book
private: // functions
std::string getCategoryFromTags() const;
const Illustration& getDefaultIllustration() const;
Illustration& getMutableDefaultIllustration();
protected: // data
std::string m_id;

View File

@ -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()) {