Skip to content

Commit

Permalink
Add some const
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianFeldmann committed Dec 15, 2023
1 parent 6fc7365 commit 7424b4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions YUViewLib/src/playlistitem/playlistItemRawFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<const char *> extensions)
bool isInExtensions(const QString &testValue, const std::initializer_list<const char *> &extensions)
{
const auto it =
std::find_if(extensions.begin(), extensions.end(), [testValue](const char *extension) {
Expand Down Expand Up @@ -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));

Expand Down

0 comments on commit 7424b4a

Please sign in to comment.