From 7f023701dd843749cf878baabeb3d33917fda62f Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 30 Apr 2022 09:43:07 -0400 Subject: Formatting: remove space in range-style for loops Change .clang-format and commit automated changes from a fresh run of format-code --- libqpdf/QPDFObjectHandle.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'libqpdf/QPDFObjectHandle.cc') diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index 9bdf1a64..c156e627 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -949,7 +949,7 @@ void QPDFObjectHandle::setArrayFromVector(std::vector const& items) { if (isArray()) { - for (auto const& item : items) { + for (auto const& item: items) { checkOwnership(item); } dynamic_cast(obj.get())->setFromVector(items); @@ -1108,7 +1108,7 @@ QPDFObjectHandle::isOrHasName(std::string const& value) if (isNameAndEquals(value)) { return true; } else if (isArray()) { - for (auto& item : aitems()) { + for (auto& item: aitems()) { if (item.isNameAndEquals(value)) { return true; } @@ -1123,12 +1123,12 @@ QPDFObjectHandle::makeResourcesIndirect(QPDF& owning_qpdf) if (!isDictionary()) { return; } - for (auto const& i1 : ditems()) { + for (auto const& i1: ditems()) { QPDFObjectHandle sub = i1.second; if (!sub.isDictionary()) { continue; } - for (auto i2 : sub.ditems()) { + for (auto i2: sub.ditems()) { std::string const& key = i2.first; QPDFObjectHandle val = i2.second; if (!val.isIndirect()) { @@ -1150,7 +1150,7 @@ QPDFObjectHandle::mergeResources( auto make_og_to_name = [](QPDFObjectHandle& dict, std::map& og_to_name) { - for (auto i : dict.ditems()) { + for (auto i: dict.ditems()) { if (i.second.isIndirect()) { og_to_name[i.second.getObjGen()] = i.first; } @@ -1159,7 +1159,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 o_top: other.ditems()) { std::string const& rtype = o_top.first; QPDFObjectHandle other_val = o_top.second; if (hasKey(rtype)) { @@ -1178,7 +1178,7 @@ QPDFObjectHandle::mergeResources( std::set rnames; int min_suffix = 1; bool initialized_maps = false; - for (auto ov_iter : other_val.ditems()) { + for (auto ov_iter: other_val.ditems()) { std::string const& key = ov_iter.first; QPDFObjectHandle rval = ov_iter.second; if (!this_val.hasKey(key)) { @@ -1212,12 +1212,12 @@ QPDFObjectHandle::mergeResources( } } else if (this_val.isArray() && other_val.isArray()) { std::set scalars; - for (auto this_item : this_val.aitems()) { + for (auto this_item: this_val.aitems()) { if (this_item.isScalar()) { scalars.insert(this_item.unparse()); } } - for (auto other_item : other_val.aitems()) { + for (auto other_item: other_val.aitems()) { if (other_item.isScalar()) { if (scalars.count(other_item.unparse()) == 0) { QTC::TC("qpdf", "QPDFObjectHandle merge array"); @@ -2950,7 +2950,7 @@ QPDFObjectHandle::copyStream() QPDFObjectHandle result = newStream(this->getOwningQPDF()); QPDFObjectHandle dict = result.getDict(); QPDFObjectHandle old_dict = getDict(); - for (auto& iter : QPDFDictItems(old_dict)) { + for (auto& iter: QPDFDictItems(old_dict)) { if (iter.second.isIndirect()) { dict.replaceKey(iter.first, iter.second); } else { -- cgit v1.2.3-54-g00ecf