2
1
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:
m-holger 2023-02-15 11:30:33 +00:00
parent f989de1bd7
commit fe74f28dc4
2 changed files with 3 additions and 6 deletions

View File

@ -35,6 +35,8 @@ QPDFValue::getDescription()
return description;
}
}
} else if (og.isIndirect()) {
return "object " + og.unparse(' ');
}
return {};
}

View File

@ -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)