From e2544799a140d5d23bbf42eb4f15b5efb1eacda3 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Tue, 9 Nov 2021 18:40:28 +0400 Subject: [PATCH] Shorter Book::update() --- src/book.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/book.cpp b/src/book.cpp index 73063a141..de82c6fbc 100644 --- a/src/book.cpp +++ b/src/book.cpp @@ -55,27 +55,7 @@ bool Book::update(const kiwix::Book& other) if (m_id != other.m_id) return false; - m_readOnly = other.m_readOnly; - m_path = other.m_path; - m_pathValid = other.m_pathValid; - m_title = other.m_title; - m_description = other.m_description; - m_language = other.m_language; - m_creator = other.m_creator; - m_publisher = other.m_publisher; - m_date = other.m_date; - m_url = other.m_url; - m_name = other.m_name; - m_flavour = other.m_flavour; - m_tags = other.m_tags; - m_category = other.m_category; - m_origId = other.m_origId; - m_articleCount = other.m_articleCount; - m_mediaCount = other.m_mediaCount; - m_size = other.m_size; - m_illustrations = other.m_illustrations; - m_downloadId = other.m_downloadId; - + *this = other; return true; }