aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFObjectHandle.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-06-01 17:16:21 +0200
committerm-holger <m-holger@kubitscheck.org>2023-06-09 16:55:49 +0200
commitd784e8033c0aafce9becf720dfedf1872c74983e (patch)
tree1c7cbabef8eebf0899d2f98986792e855724cf9b /libqpdf/QPDFObjectHandle.cc
parent0ac005f0d96b427d1ddc92af5805aa05bfe86aca (diff)
downloadqpdf-d784e8033c0aafce9becf720dfedf1872c74983e.tar.zst
Code tidy - Clang-Tidy rule performance-for-range-copy
Diffstat (limited to 'libqpdf/QPDFObjectHandle.cc')
-rw-r--r--libqpdf/QPDFObjectHandle.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc
index 9ec87f79..3ce748b0 100644
--- a/libqpdf/QPDFObjectHandle.cc
+++ b/libqpdf/QPDFObjectHandle.cc
@@ -1048,7 +1048,7 @@ QPDFObjectHandle::makeResourcesIndirect(QPDF& owning_qpdf)
if (!sub.isDictionary()) {
continue;
}
- for (auto i2: sub.ditems()) {
+ for (auto const& i2: sub.ditems()) {
std::string const& key = i2.first;
QPDFObjectHandle val = i2.second;
if (!val.isIndirect()) {
@@ -1069,7 +1069,7 @@ QPDFObjectHandle::mergeResources(
auto make_og_to_name = [](QPDFObjectHandle& dict,
std::map<QPDFObjGen, std::string>& og_to_name) {
- for (auto i: dict.ditems()) {
+ for (auto const& i: dict.ditems()) {
if (i.second.isIndirect()) {
og_to_name[i.second.getObjGen()] = i.first;
}
@@ -1078,7 +1078,7 @@ QPDFObjectHandle::mergeResources(
// This algorithm is described in comments in QPDFObjectHandle.hh
// above the declaration of mergeResources.
- for (auto o_top: other.ditems()) {
+ for (auto const& o_top: other.ditems()) {
std::string const& rtype = o_top.first;
QPDFObjectHandle other_val = o_top.second;
if (hasKey(rtype)) {
@@ -1095,7 +1095,7 @@ QPDFObjectHandle::mergeResources(
std::set<std::string> rnames;
int min_suffix = 1;
bool initialized_maps = false;
- for (auto ov_iter: other_val.ditems()) {
+ for (auto const& ov_iter: other_val.ditems()) {
std::string const& key = ov_iter.first;
QPDFObjectHandle rval = ov_iter.second;
if (!this_val.hasKey(key)) {