aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFParser.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-12-19 16:26:21 +0100
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-12-31 20:37:35 +0100
commit846504129f58a638ba481c4329187be8ebb20419 (patch)
tree78129c3bc07095e43382ab4fe194e8b6eb8c6fb8 /libqpdf/QPDFParser.cc
parentb19e06fd8bc1d4fe032c4ad344bb60edb16867ae (diff)
downloadqpdf-846504129f58a638ba481c4329187be8ebb20419.tar.zst
Remove redundant parameter qpdf from QPDFParser::warn
Diffstat (limited to 'libqpdf/QPDFParser.cc')
-rw-r--r--libqpdf/QPDFParser.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/libqpdf/QPDFParser.cc b/libqpdf/QPDFParser.cc
index 640c406d..6a1525d4 100644
--- a/libqpdf/QPDFParser.cc
+++ b/libqpdf/QPDFParser.cc
@@ -441,14 +441,14 @@ QPDFParser::setDescription(
}
void
-QPDFParser::warn(QPDF* qpdf, QPDFExc const& e)
+QPDFParser::warn(QPDFExc const& e) const
{
// If parsing on behalf of a QPDF object and want to give a
// warning, we can warn through the object. If parsing for some
// other reason, such as an explicit creation of an object from a
// string, then just throw the exception.
- if (qpdf) {
- qpdf->warn(e);
+ if (context) {
+ context->warn(e);
} else {
throw e;
}
@@ -457,14 +457,8 @@ QPDFParser::warn(QPDF* qpdf, QPDFExc const& e)
void
QPDFParser::warn(qpdf_offset_t offset, std::string const& msg) const
{
- warn(
- context,
- QPDFExc(
- qpdf_e_damaged_pdf,
- input->getName(),
- object_description,
- offset,
- msg));
+ warn(QPDFExc(
+ qpdf_e_damaged_pdf, input->getName(), object_description, offset, msg));
}
void