clang-tidy: range loop conversions

Found with: modernize-loop-convert

Signed-off-by: Rosen Penev <rosenp@gmail.com>
main
Rosen Penev 4 years ago committed by Luis Díaz Más
parent 44256e8c5d
commit 8e52032ee0

File diff suppressed because it is too large Load Diff

@ -211,11 +211,8 @@ void push(Jzon::Node& node,const std::string& key,T i)
ABORT_IF_I_EMTPY ABORT_IF_I_EMTPY
Jzon::Object l ; Jzon::Object l ;
const Exiv2::LangAltValue& langs = dynamic_cast<const Exiv2::LangAltValue&>(i->value()); const Exiv2::LangAltValue& langs = dynamic_cast<const Exiv2::LangAltValue&>(i->value());
for ( Exiv2::LangAltValue::ValueType::const_iterator lang = langs.value_.begin() for (auto&& lang : langs.value_) {
; lang != langs.value_.end() l.Add(lang.first, lang.second);
; lang++
) {
l.Add(lang->first,lang->second);
} }
Jzon::Object o ; Jzon::Object o ;
o.Add("lang",l); o.Add("lang",l);
@ -350,10 +347,8 @@ int main(int argc, char* const argv[])
// create and populate a Jzon::Object for the namespaces // create and populate a Jzon::Object for the namespaces
Jzon::Object xmlns; Jzon::Object xmlns;
for ( auto it = namespaces.begin() ; it != namespaces.end() ; it++ ) { for (auto&& ns : namespaces) {
std::string ns = *it ; xmlns.Add(ns, nsDict[ns]);
std::string uri = nsDict[ns];
xmlns.Add(ns,uri);
} }
// add xmlns as Xmp.xmlns // add xmlns as Xmp.xmlns

@ -727,9 +727,8 @@ namespace Exiv2 {
assert(object != 0); assert(object != 0);
byte* p = object->start() + 2; byte* p = object->start() + 2;
for (TiffDirectory::Components::iterator i = object->components_.begin(); for (auto&& component : object->components_) {
i != object->components_.end(); ++i) { p += updateDirEntry(p, byteOrder(), component);
p += updateDirEntry(p, byteOrder(), *i);
} }
} }
@ -794,8 +793,8 @@ namespace Exiv2 {
static const char* synthesizedTags[] = { static const char* synthesizedTags[] = {
"Exif.MakerNote.Offset", "Exif.MakerNote.Offset",
}; };
for (unsigned int i = 0; i < EXV_COUNTOF(synthesizedTags); ++i) { for (auto&& synthesizedTag : synthesizedTags) {
pos = exifData_.findKey(ExifKey(synthesizedTags[i])); pos = exifData_.findKey(ExifKey(synthesizedTag));
if (pos != exifData_.end()) exifData_.erase(pos); if (pos != exifData_.end()) exifData_.erase(pos);
} }
} }
@ -1293,8 +1292,8 @@ namespace Exiv2 {
{ {
setMnState(); // All components to be post-processed must be from the Makernote setMnState(); // All components to be post-processed must be from the Makernote
postProc_ = true; postProc_ = true;
for (PostList::const_iterator pos = postList_.begin(); pos != postList_.end(); ++pos) { for (auto&& pos : postList_) {
(*pos)->accept(*this); pos->accept(*this);
} }
postProc_ = false; postProc_ = false;
setOrigState(); setOrigState();

Loading…
Cancel
Save