Skip to content

Commit

Permalink
Use ammper iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianFeldmann committed Jul 26, 2024
1 parent 4f503b6 commit 3a8c9ec
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions YUViewLib/src/video/yuv/PixelFormatYUVGuess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,8 @@ PixelFormatYUV guessFormatFromSizeAndName(const Size size,
// We already extracted a bit depth from the name. Only try that.
bitDepths = {bitDepth};

// Make iterable ... how?
for (std::size_t i = 0; i < SubsamplingMapper.size(); ++i)
for (const auto &[subsampling, subsamplingName] : SubsamplingMapper)
{
const auto subsampling = SubsamplingMapper.at(i).value();
const auto subsamplingName = SubsamplingMapper.getName(subsampling);

auto nameLower = functions::toLower(name);
if (nameLower.find(subsamplingName) != std::string::npos)
{
Expand Down

0 comments on commit 3a8c9ec

Please sign in to comment.