Skip to content

Commit

Permalink
Fix some test cases. Non capturing groups seem not to be supported by…
Browse files Browse the repository at this point in the history
… std::regexp.
  • Loading branch information
ChristianFeldmann committed Nov 27, 2024
1 parent c06647a commit 985fc94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions YUViewLib/src/filesource/FrameFormatGuess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ std::optional<Size> guessFrameSizeFromAcronymResolutionIndicators(const std::str
std::optional<int> guessFPSFromFPSOrHzIndicators(const std::string &name)
{
std::smatch frameSizeMatch;
const std::regex strExpr("([0-9]+)(?>FPS|fps|HZ|Hz)");
const std::regex strExpr("([0-9]+)(FPS|fps|HZ|Hz)");
if (std::regex_search(name, frameSizeMatch, strExpr))
return toUnsigned(frameSizeMatch[1].str());
return {};
Expand All @@ -142,7 +142,7 @@ std::optional<int> guessFPSFromFPSOrHzIndicators(const std::string &name)
std::optional<unsigned> guessBitDepthFromName(const std::string &name)
{
const auto REGEXP_LIST = {
"(8|9|10|12|16)-?(?>BIT|Bit|bit)", // E.g. 10bit, 10BIT, 10-bit, 10-BIT
"(8|9|10|12|16)-?(BIT|Bit|bit)", // E.g. 10bit, 10BIT, 10-bit, 10-BIT
"(?:_|\\.|-)(8|9|10|12|16)b(?:_|\\.|-)" // E.g. _16b_ .8b. -12b-
};

Expand Down

0 comments on commit 985fc94

Please sign in to comment.