diff options
| author | Stefan Boberg <[email protected]> | 2023-05-15 19:05:12 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2023-05-15 19:05:12 +0200 |
| commit | a23756b53a9682b70afe01ac51000f97b6677fd4 (patch) | |
| tree | 569d49eabd551b433e40543b5aea1bb7ddafd3b5 | |
| parent | removed excessive ZEN_UNUSED decls (diff) | |
| download | zen-a23756b53a9682b70afe01ac51000f97b6677fd4.tar.xz zen-a23756b53a9682b70afe01ac51000f97b6677fd4.zip | |
auto -> typed declarations
| -rw-r--r-- | src/zen/zen.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/zen/zen.cpp b/src/zen/zen.cpp index 3ae62e29d..4f798b863 100644 --- a/src/zen/zen.cpp +++ b/src/zen/zen.cpp @@ -359,7 +359,7 @@ main(int argc, char** argv) try { - auto ParseResult = Options.parse(argc, argv); + cxxopts::ParseResult ParseResult = Options.parse(argc, argv); if (ParseResult.count("help") || IsNullInvoke == 1) { @@ -369,7 +369,7 @@ main(int argc, char** argv) printf("available commands:\n"); - for (const auto& CmdInfo : Commands) + for (const CommandInfo& CmdInfo : Commands) { printf(" %-20s %s\n", CmdInfo.CmdName, CmdInfo.CmdSummary); } @@ -387,6 +387,7 @@ main(int argc, char** argv) if (StrCaseCompare(SubCommand.c_str(), CmdInfo.CmdName) == 0) { cxxopts::Options& VerbOptions = CmdInfo.Cmd->Options(); + try { return CmdInfo.Cmd->Run(GlobalOptions, (int)CommandArgVec.size(), CommandArgVec.data()); |