Skip to content

Commit

Permalink
KnobChoice::choiceMatch: bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Jul 4, 2017
1 parent a981ee5 commit 5551454
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Engine/KnobTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,9 @@ bool BothAreSpaces(char lhs, char rhs) { return (lhs == rhs) && (lhs == ' '); }
// 5- paren/bracket-insensitive match (for WriteFFmpeg's format and codecs)
// 6- if the choice ends with " 1" try to match exactly everything before that (for formats with PAR=1, where the PAR was removed)
// returns index if choice was matched, -1 if not matched
#pragma message WARN("choiceMatch() should be moved into filterKnobChoiceOptionCompat().")
// TODO: choiceMatch() should be moved into filterKnobChoiceOptionCompat()
// TODO: filterKnobChoiceOptionCompat() should be used everywhere instead of choiceMatch()
int
KnobChoice::choiceMatch(const std::string& choice,
const std::vector<ChoiceOption>& entries,
Expand Down Expand Up @@ -1039,6 +1042,7 @@ KnobChoice::choiceMatch(const std::string& choice,
if (matchedEntry) {
*matchedEntry = entries[i];
}
return i;
}
}

Expand Down

0 comments on commit 5551454

Please sign in to comment.