diff options
author | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2023-05-21 18:41:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-21 18:41:01 +0200 |
commit | bbe9f8b83c1e7d42f7e1f5b2ea613dc845a1de7c (patch) | |
tree | 89047a76039b7e98fcdd97eac0fa93081c201820 /libqpdf/QPDFEmbeddedFileDocumentHelper.cc | |
parent | 2028e35928ee8725128f52cae999ac6829dee2fc (diff) | |
parent | 49e6365f63f3ad09f04093d421caee04bc042c0d (diff) | |
download | qpdf-bbe9f8b83c1e7d42f7e1f5b2ea613dc845a1de7c.tar.zst |
Merge pull request #969 from m-holger/tidy
Code formating : drop 'this->' in 'this->m'
Diffstat (limited to 'libqpdf/QPDFEmbeddedFileDocumentHelper.cc')
-rw-r--r-- | libqpdf/QPDFEmbeddedFileDocumentHelper.cc | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/libqpdf/QPDFEmbeddedFileDocumentHelper.cc b/libqpdf/QPDFEmbeddedFileDocumentHelper.cc index 030f32d3..25c3c6ae 100644 --- a/libqpdf/QPDFEmbeddedFileDocumentHelper.cc +++ b/libqpdf/QPDFEmbeddedFileDocumentHelper.cc @@ -40,9 +40,8 @@ QPDFEmbeddedFileDocumentHelper::QPDFEmbeddedFileDocumentHelper(QPDF& qpdf) : if (names.isDictionary()) { auto embedded_files = names.getKey("/EmbeddedFiles"); if (embedded_files.isDictionary()) { - this->m->embedded_files = - std::make_shared<QPDFNameTreeObjectHelper>( - embedded_files, qpdf); + m->embedded_files = std::make_shared<QPDFNameTreeObjectHelper>( + embedded_files, qpdf); } } } @@ -50,7 +49,7 @@ QPDFEmbeddedFileDocumentHelper::QPDFEmbeddedFileDocumentHelper(QPDF& qpdf) : bool QPDFEmbeddedFileDocumentHelper::hasEmbeddedFiles() const { - return (this->m->embedded_files != nullptr); + return (m->embedded_files != nullptr); } void @@ -69,8 +68,7 @@ QPDFEmbeddedFileDocumentHelper::initEmbeddedFiles() if (!embedded_files.isDictionary()) { auto nth = QPDFNameTreeObjectHelper::newEmpty(this->qpdf); names.replaceKey("/EmbeddedFiles", nth.getObjectHandle()); - this->m->embedded_files = - std::make_shared<QPDFNameTreeObjectHelper>(nth); + m->embedded_files = std::make_shared<QPDFNameTreeObjectHelper>(nth); } } @@ -78,9 +76,9 @@ std::shared_ptr<QPDFFileSpecObjectHelper> QPDFEmbeddedFileDocumentHelper::getEmbeddedFile(std::string const& name) { std::shared_ptr<QPDFFileSpecObjectHelper> result; - if (this->m->embedded_files) { - auto i = this->m->embedded_files->find(name); - if (i != this->m->embedded_files->end()) { + if (m->embedded_files) { + auto i = m->embedded_files->find(name); + if (i != m->embedded_files->end()) { result = std::make_shared<QPDFFileSpecObjectHelper>(i->second); } } @@ -91,8 +89,8 @@ std::map<std::string, std::shared_ptr<QPDFFileSpecObjectHelper>> QPDFEmbeddedFileDocumentHelper::getEmbeddedFiles() { std::map<std::string, std::shared_ptr<QPDFFileSpecObjectHelper>> result; - if (this->m->embedded_files) { - for (auto const& i: *(this->m->embedded_files)) { + if (m->embedded_files) { + for (auto const& i: *(m->embedded_files)) { result[i.first] = std::make_shared<QPDFFileSpecObjectHelper>(i.second); } @@ -105,7 +103,7 @@ QPDFEmbeddedFileDocumentHelper::replaceEmbeddedFile( std::string const& name, QPDFFileSpecObjectHelper const& fs) { initEmbeddedFiles(); - this->m->embedded_files->insert(name, fs.getObjectHandle()); + m->embedded_files->insert(name, fs.getObjectHandle()); } bool @@ -114,8 +112,8 @@ QPDFEmbeddedFileDocumentHelper::removeEmbeddedFile(std::string const& name) if (!hasEmbeddedFiles()) { return false; } - auto iter = this->m->embedded_files->find(name); - if (iter == this->m->embedded_files->end()) { + auto iter = m->embedded_files->find(name); + if (iter == m->embedded_files->end()) { return false; } auto oh = iter->second; |