mirror of
https://github.com/qpdf/qpdf.git
synced 2024-06-01 01:40:51 +00:00
Refactor QPDFValue::setDefaultDescription
This commit is contained in:
parent
f989de1bd7
commit
fe74f28dc4
|
@ -35,6 +35,8 @@ QPDFValue::getDescription()
|
|||
return description;
|
||||
}
|
||||
}
|
||||
} else if (og.isIndirect()) {
|
||||
return "object " + og.unparse(' ');
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -40,11 +40,6 @@ class QPDFValue
|
|||
void
|
||||
setDefaultDescription(QPDF* a_qpdf, QPDFObjGen const& a_og)
|
||||
{
|
||||
static auto default_description{
|
||||
std::make_shared<Description>("object $OG")};
|
||||
if (!object_description) {
|
||||
object_description = default_description;
|
||||
}
|
||||
qpdf = a_qpdf;
|
||||
og = a_og;
|
||||
}
|
||||
|
@ -52,7 +47,7 @@ class QPDFValue
|
|||
bool
|
||||
hasDescription()
|
||||
{
|
||||
return object_description != nullptr;
|
||||
return object_description || og.isIndirect();
|
||||
}
|
||||
void
|
||||
setParsedOffset(qpdf_offset_t offset)
|
||||
|
|
Loading…
Reference in New Issue
Block a user