mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 19:08:59 +00:00
Remove redundant parameter cross_indirect from QPDFObjectHandle::copyObject
This commit is contained in:
parent
ebc15f4dd0
commit
585ecf17c8
@ -1628,10 +1628,7 @@ class QPDFObjectHandle
|
||||
void objectWarning(std::string const& warning);
|
||||
void assertType(char const* type_name, bool istype);
|
||||
bool dereference();
|
||||
void copyObject(
|
||||
std::set<QPDFObjGen>& visited,
|
||||
bool cross_indirect,
|
||||
bool stop_at_streams);
|
||||
void copyObject(std::set<QPDFObjGen>& visited, bool stop_at_streams);
|
||||
void disconnect();
|
||||
void setParsedOffset(qpdf_offset_t offset);
|
||||
void parseContentStream_internal(
|
||||
|
@ -2219,7 +2219,7 @@ QPDFObjectHandle::unsafeShallowCopy()
|
||||
|
||||
void
|
||||
QPDFObjectHandle::copyObject(
|
||||
std::set<QPDFObjGen>& visited, bool cross_indirect, bool stop_at_streams)
|
||||
std::set<QPDFObjGen>& visited, bool stop_at_streams)
|
||||
{
|
||||
assertInitialized();
|
||||
if (isStream()) {
|
||||
@ -2259,10 +2259,7 @@ QPDFObjectHandle::copyObject(
|
||||
int n = array->getNItems();
|
||||
for (int i = 0; i < n; ++i) {
|
||||
items.push_back(array->getItem(i));
|
||||
if ((cross_indirect || (!items.back().isIndirect()))) {
|
||||
items.back().copyObject(
|
||||
visited, cross_indirect, stop_at_streams);
|
||||
}
|
||||
items.back().copyObject(visited, stop_at_streams);
|
||||
}
|
||||
new_obj = QPDF_Array::create(items);
|
||||
} else if (isDictionary()) {
|
||||
@ -2270,9 +2267,7 @@ QPDFObjectHandle::copyObject(
|
||||
auto dict = asDictionary();
|
||||
for (auto const& key: getKeys()) {
|
||||
items[key] = dict->getKey(key);
|
||||
if ((cross_indirect || (!items[key].isIndirect()))) {
|
||||
items[key].copyObject(visited, cross_indirect, stop_at_streams);
|
||||
}
|
||||
items[key].copyObject(visited, stop_at_streams);
|
||||
}
|
||||
new_obj = QPDF_Dictionary::create(items);
|
||||
} else {
|
||||
@ -2309,7 +2304,7 @@ void
|
||||
QPDFObjectHandle::makeDirect(bool allow_streams)
|
||||
{
|
||||
std::set<QPDFObjGen> visited;
|
||||
copyObject(visited, true, allow_streams);
|
||||
copyObject(visited, allow_streams);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user