mirror of
https://github.com/qpdf/qpdf.git
synced 2025-02-02 11:58:25 +00:00
Remove redundant parameter qpdf from QPDFParser::warn
This commit is contained in:
parent
b19e06fd8b
commit
846504129f
@ -441,14 +441,14 @@ QPDFParser::setDescription(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
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
|
// If parsing on behalf of a QPDF object and want to give a
|
||||||
// warning, we can warn through the object. If parsing for some
|
// warning, we can warn through the object. If parsing for some
|
||||||
// other reason, such as an explicit creation of an object from a
|
// other reason, such as an explicit creation of an object from a
|
||||||
// string, then just throw the exception.
|
// string, then just throw the exception.
|
||||||
if (qpdf) {
|
if (context) {
|
||||||
qpdf->warn(e);
|
context->warn(e);
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@ -457,14 +457,8 @@ QPDFParser::warn(QPDF* qpdf, QPDFExc const& e)
|
|||||||
void
|
void
|
||||||
QPDFParser::warn(qpdf_offset_t offset, std::string const& msg) const
|
QPDFParser::warn(qpdf_offset_t offset, std::string const& msg) const
|
||||||
{
|
{
|
||||||
warn(
|
warn(QPDFExc(
|
||||||
context,
|
qpdf_e_damaged_pdf, input->getName(), object_description, offset, msg));
|
||||||
QPDFExc(
|
|
||||||
qpdf_e_damaged_pdf,
|
|
||||||
input->getName(),
|
|
||||||
object_description,
|
|
||||||
offset,
|
|
||||||
msg));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -41,7 +41,7 @@ class QPDFParser
|
|||||||
|
|
||||||
void warn(qpdf_offset_t offset, std::string const& msg) const;
|
void warn(qpdf_offset_t offset, std::string const& msg) const;
|
||||||
void warn(std::string const& msg) const;
|
void warn(std::string const& msg) const;
|
||||||
static void warn(QPDF*, QPDFExc const&);
|
void warn(QPDFExc const&) const;
|
||||||
void setDescription(
|
void setDescription(
|
||||||
std::shared_ptr<QPDFObject>& obj, qpdf_offset_t parsed_offset);
|
std::shared_ptr<QPDFObject>& obj, qpdf_offset_t parsed_offset);
|
||||||
std::shared_ptr<InputSource> input;
|
std::shared_ptr<InputSource> input;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user