From c1d3fb077800f9ff68a4ab9a520aeafa763d2c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Thu, 30 Sep 2021 22:05:15 +0200 Subject: [PATCH] Proper use of range for --- common/comic.cpp | 4 ++-- common/gl/yacreader_flow_gl.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/comic.cpp b/common/comic.cpp index 50a31d2c..b6ea1792 100644 --- a/common/comic.cpp +++ b/common/comic.cpp @@ -27,7 +27,7 @@ QStringList Comic::getSupportedImageFormats() { QList supportedImageFormats = QImageReader::supportedImageFormats(); QStringList supportedImageFormatStrings; - for (QByteArray item : supportedImageFormats) { + for (QByteArray &item : supportedImageFormats) { supportedImageFormatStrings.append(QString::fromLocal8Bit("*." + item)); } return supportedImageFormatStrings; @@ -37,7 +37,7 @@ QStringList Comic::getSupportedImageLiteralFormats() { QList supportedImageFormats = QImageReader::supportedImageFormats(); QStringList supportedImageFormatStrings; - for (QByteArray item : supportedImageFormats) { + for (QByteArray &item : supportedImageFormats) { supportedImageFormatStrings.append(QString::fromLocal8Bit(item)); } return supportedImageFormatStrings; diff --git a/common/gl/yacreader_flow_gl.cpp b/common/gl/yacreader_flow_gl.cpp index ba61a2b7..07d19062 100644 --- a/common/gl/yacreader_flow_gl.cpp +++ b/common/gl/yacreader_flow_gl.cpp @@ -1276,7 +1276,7 @@ YACReaderPageFlowGL::~YACReaderPageFlowGL() makeCurrent(); - for (auto image : images) { + for (auto &image : images) { if (image.texture != defaultTexture) { if (image.texture->isCreated()) { image.texture->destroy();