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/JSON.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libqpdf/JSON.cc') diff --git a/libqpdf/JSON.cc b/libqpdf/JSON.cc index c02e06b8..407e4a64 100644 --- a/libqpdf/JSON.cc +++ b/libqpdf/JSON.cc @@ -20,7 +20,7 @@ JSON::JSON_dictionary::unparse(size_t depth) const { std::string result = "{"; bool first = true; - for (auto const& iter : members) { + for (auto const& iter: members) { if (first) { first = false; } else { @@ -44,7 +44,7 @@ JSON::JSON_array::unparse(size_t depth) const { std::string result = "["; bool first = true; - for (auto const& element : elements) { + for (auto const& element: elements) { if (first) { first = false; } else { @@ -304,7 +304,7 @@ JSON::forEachDictItem( if (v == nullptr) { return false; } - for (auto const& k : v->members) { + for (auto const& k: v->members) { fn(k.first, JSON(k.second)); } return true; @@ -317,7 +317,7 @@ JSON::forEachArrayItem(std::function fn) const if (v == nullptr) { return false; } - for (auto const& i : v->elements) { + for (auto const& i: v->elements) { fn(JSON(i)); } return true; @@ -379,7 +379,7 @@ JSON::checkSchemaInternal( if (sch_dict && (!pattern_key.empty())) { auto pattern_schema = sch_dict->members[pattern_key].get(); - for (auto const& iter : this_dict->members) { + for (auto const& iter: this_dict->members) { std::string const& key = iter.first; checkSchemaInternal( this_dict->members[key].get(), @@ -389,7 +389,7 @@ JSON::checkSchemaInternal( prefix + "." + key); } } else if (sch_dict) { - for (auto& iter : sch_dict->members) { + for (auto& iter: sch_dict->members) { std::string const& key = iter.first; if (this_dict->members.count(key)) { checkSchemaInternal( @@ -409,7 +409,7 @@ JSON::checkSchemaInternal( } } } - for (auto const& iter : this_dict->members) { + for (auto const& iter: this_dict->members) { std::string const& key = iter.first; if (sch_dict->members.count(key) == 0) { QTC::TC("libtests", "JSON key extra in object"); @@ -431,7 +431,7 @@ JSON::checkSchemaInternal( return false; } int i = 0; - for (auto const& element : this_arr->elements) { + for (auto const& element: this_arr->elements) { checkSchemaInternal( element.get(), sch_arr->elements.at(0).get(), -- cgit v1.2.3-54-g00ecf