clang-tidy: range for loop conversions
Found with modernize-loop-convert Ran through git clang-format. Also removed several questionable loops and replaced with simpler algorithms. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Luis Díaz Más
parent
5a4c3cd057
commit
4ceb325c8f
@@ -45,17 +45,13 @@ try {
|
||||
|
||||
Exiv2::PreviewManager loader(*image);
|
||||
Exiv2::PreviewPropertiesList list = loader.getPreviewProperties();
|
||||
for (Exiv2::PreviewPropertiesList::iterator pos = list.begin(); pos != list.end(); pos++) {
|
||||
std::cout << pos->mimeType_
|
||||
<< " preview, type " << pos->id_ << ", "
|
||||
<< pos->size_ << " bytes, "
|
||||
<< pos->width_ << 'x' << pos->height_ << " pixels"
|
||||
for (auto&& pos : list) {
|
||||
std::cout << pos.mimeType_ << " preview, type " << pos.id_ << ", " << pos.size_ << " bytes, " << pos.width_
|
||||
<< 'x' << pos.height_ << " pixels"
|
||||
<< "\n";
|
||||
|
||||
Exiv2::PreviewImage preview = loader.getPreviewImage(*pos);
|
||||
preview.writeFile(filename + "_"
|
||||
+ Exiv2::toString(pos->width_) + "x"
|
||||
+ Exiv2::toString(pos->height_));
|
||||
Exiv2::PreviewImage preview = loader.getPreviewImage(pos);
|
||||
preview.writeFile(filename + "_" + Exiv2::toString(pos.width_) + "x" + Exiv2::toString(pos.height_));
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
|
||||
Reference in New Issue
Block a user