Commit 43983109f25ba12db3fded12d0ea9a991b8a1d5c

Authored by m-holger
1 parent 114bffa0

Change QPDFObjectHandle::shallowCopyInternal to copy scalars

Showing 1 changed file with 1 additions and 6 deletions
libqpdf/QPDFObjectHandle.cc
@@ -2266,12 +2266,7 @@ QPDFObjectHandle::shallowCopyInternal( @@ -2266,12 +2266,7 @@ QPDFObjectHandle::shallowCopyInternal(
2266 QTC::TC("qpdf", "QPDFObjectHandle ERR shallow copy stream"); 2266 QTC::TC("qpdf", "QPDFObjectHandle ERR shallow copy stream");
2267 throw std::runtime_error("attempt to make a shallow copy of a stream"); 2267 throw std::runtime_error("attempt to make a shallow copy of a stream");
2268 } 2268 }
2269 -  
2270 - if (isArray() || isDictionary()) {  
2271 - new_obj = QPDFObjectHandle(obj->shallowCopy());  
2272 - } else {  
2273 - new_obj = *this;  
2274 - } 2269 + new_obj = QPDFObjectHandle(obj->shallowCopy());
2275 2270
2276 std::set<QPDFObjGen> visited; 2271 std::set<QPDFObjGen> visited;
2277 new_obj.copyObject(visited, false, first_level_only, false); 2272 new_obj.copyObject(visited, false, first_level_only, false);