From 7424b4aad8dbf444f1920c17555f98ae03555da5 Mon Sep 17 00:00:00 2001 From: Christian Feldmann Date: Fri, 15 Dec 2023 14:21:54 +0100 Subject: [PATCH] Add some const --- YUViewLib/src/playlistitem/playlistItemRawFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YUViewLib/src/playlistitem/playlistItemRawFile.cpp b/YUViewLib/src/playlistitem/playlistItemRawFile.cpp index 7ff5fee23..0d586e683 100644 --- a/YUViewLib/src/playlistitem/playlistItemRawFile.cpp +++ b/YUViewLib/src/playlistitem/playlistItemRawFile.cpp @@ -55,7 +55,7 @@ constexpr auto YUV_EXTENSIONS = {"yuv", "nv12", "y4m"}; constexpr auto RGB_EXTENSIONS = {"rgb", "gbr", "bgr", "brg"}; constexpr auto RGBA_EXTENSIONS = {"rgba", "gbra", "bgra", "brga", "argb", "agbr", "abgr", "abrg"}; -bool isInExtensions(QString testValue, std::initializer_list extensions) +bool isInExtensions(const QString &testValue, const std::initializer_list &extensions) { const auto it = std::find_if(extensions.begin(), extensions.end(), [testValue](const char *extension) { @@ -569,7 +569,7 @@ ValuePairListSets playlistItemRawFile::getPixelValues(const QPoint &pixelPos, in void playlistItemRawFile::getSupportedFileExtensions(QStringList &allExtensions, QStringList &filters) { - for (const auto extensionsList : {YUV_EXTENSIONS, RGB_EXTENSIONS, RGBA_EXTENSIONS}) + for (const auto &extensionsList : {YUV_EXTENSIONS, RGB_EXTENSIONS, RGBA_EXTENSIONS}) for (const auto &extension : extensionsList) allExtensions.append(QString(extension));