Skip to content

Commit 466a30f

Browse files
jgautier-anssifabienfl-orc
authored andcommitted
OrcCommand: UtilitiesMain: add EnumOption
1 parent 0435d20 commit 466a30f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/OrcCommand/UtilitiesMain.h

+8
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,14 @@ class UtilitiesMain
614614

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

617+
template <typename _EnumT>
618+
bool EnumOption(LPCWSTR szArg, LPCWSTR szOption, _EnumT& eOption, _EnumT eValue) {
619+
if (_wcsnicmp(szArg, szOption, wcslen(szOption)))
620+
return false;
621+
eOption = eValue;
622+
return true;
623+
}
624+
617625
bool ShadowsOption(
618626
LPCWSTR szArg,
619627
LPCWSTR szOption,

0 commit comments

Comments
 (0)