Skip to content

Commit

Permalink
OrcCommand: UtilitiesMain: add EnumOption
Browse files Browse the repository at this point in the history
  • Loading branch information
jgautier-anssi authored and fabienfl-orc committed May 5, 2023
1 parent 0435d20 commit 466a30f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/OrcCommand/UtilitiesMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,14 @@ class UtilitiesMain

bool ToggleBooleanOption(LPCWSTR szArg, LPCWSTR szOption, bool& bOption);

template <typename _EnumT>
bool EnumOption(LPCWSTR szArg, LPCWSTR szOption, _EnumT& eOption, _EnumT eValue) {
if (_wcsnicmp(szArg, szOption, wcslen(szOption)))
return false;
eOption = eValue;
return true;
}

bool ShadowsOption(
LPCWSTR szArg,
LPCWSTR szOption,
Expand Down

0 comments on commit 466a30f

Please sign in to comment.