diff options
author | Jack Lloyd <[email protected]> | 2015-12-30 23:35:16 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-12-30 23:35:16 -0500 |
commit | d4915aa4cd9c11879780267413f2980d0014240e (patch) | |
tree | 8663a7cde0ad9f7fc632c6c2f5ce33a733f8ed26 /src/cli/main.cpp | |
parent | d27416e791c9aed684efe0d6071fe66a43cf7af0 (diff) |
Avoid having Command* objects be created until requested.
Avoids various static init and destruction hassles.
Diffstat (limited to 'src/cli/main.cpp')
-rw-r--r-- | src/cli/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cli/main.cpp b/src/cli/main.cpp index f054e6005..f6bbcc30e 100644 --- a/src/cli/main.cpp +++ b/src/cli/main.cpp @@ -40,13 +40,13 @@ int main(int argc, char* argv[]) const std::string cmd_name = (argc <= 1) ? "help" : argv[1]; - if(cmd_name == "help" || cmd_name == "--help") + if(cmd_name == "help" || cmd_name == "--help" || cmd_name == "-h") { std::cout << main_help(); return 1; } - Botan_CLI::Command* cmd = Botan_CLI::Command::get_cmd(cmd_name); + std::unique_ptr<Botan_CLI::Command> cmd(Botan_CLI::Command::get_cmd(cmd_name)); if(!cmd) { |