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

@ -727,9 +727,8 @@ namespace Exiv2 {
assert(object != 0);
byte* p = object->start() + 2;
for (TiffDirectory::Components::iterator i = object->components_.begin();
i != object->components_.end(); ++i) {
p += updateDirEntry(p, byteOrder(), *i);
for (auto&& component : object->components_) {
p += updateDirEntry(p, byteOrder(), component);
}
}
@ -794,8 +793,8 @@ namespace Exiv2 {
static const char* synthesizedTags[] = {
"Exif.MakerNote.Offset",
};
for (unsigned int i = 0; i < EXV_COUNTOF(synthesizedTags); ++i) {
pos = exifData_.findKey(ExifKey(synthesizedTags[i]));
for (auto&& synthesizedTag : synthesizedTags) {
pos = exifData_.findKey(ExifKey(synthesizedTag));
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
postProc_ = true;
for (PostList::const_iterator pos = postList_.begin(); pos != postList_.end(); ++pos) {
(*pos)->accept(*this);
for (auto&& pos : postList_) {
pos->accept(*this);
}
postProc_ = false;
setOrigState();

Loading…
Cancel
Save