Make getHumanReadableFromPath method const.

This commit is contained in:
Matthieu Gautier 2019-08-08 14:26:49 +02:00
parent cbe8e20118
commit 656bf183b7
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ class Book
void update(const Reader& reader); void update(const Reader& reader);
void updateFromXml(const pugi::xml_node& node, const std::string& baseDir); void updateFromXml(const pugi::xml_node& node, const std::string& baseDir);
void updateFromOpds(const pugi::xml_node& node, const std::string& urlHost); void updateFromOpds(const pugi::xml_node& node, const std::string& urlHost);
std::string getHumanReadableIdFromPath(); std::string getHumanReadableIdFromPath() const;
bool readOnly() const { return m_readOnly; } bool readOnly() const { return m_readOnly; }
const std::string& getId() const { return m_id; } const std::string& getId() const { return m_id; }

View File

@ -156,7 +156,7 @@ void Book::updateFromOpds(const pugi::xml_node& node, const std::string& urlHost
} }
#undef VALUE #undef VALUE
std::string Book::getHumanReadableIdFromPath() std::string Book::getHumanReadableIdFromPath() const
{ {
std::string id = m_path; std::string id = m_path;
if (!id.empty()) { if (!id.empty()) {