From d784e8033c0aafce9becf720dfedf1872c74983e Mon Sep 17 00:00:00 2001 From: m-holger Date: Thu, 1 Jun 2023 16:16:21 +0100 Subject: Code tidy - Clang-Tidy rule performance-for-range-copy --- libqpdf/QPDFObjectHandle.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libqpdf/QPDFObjectHandle.cc') 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& 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 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)) { -- cgit v1.2.3-54-g00ecf