diff --git a/src/commands/CmdMove.cpp b/src/commands/CmdMove.cpp index cd8a6cce..d0080455 100644 --- a/src/commands/CmdMove.cpp +++ b/src/commands/CmdMove.cpp @@ -42,19 +42,17 @@ int CmdMove ( std::vector ids = cli.getIds(); if (ids.size() > 1) - throw std::string ("The 'move' command only supports a single ID."); - - int id; + { + throw std::string("The 'move' command only supports a single ID."); + } if (ids.empty()) { - id = 0; - } - else - { - id = ids[0]; + throw std::string ("ID must be specified. See 'timew help move'."); } + int id = ids[0]; + std::string new_start; for (auto& arg : cli._args) { @@ -62,9 +60,6 @@ int CmdMove ( new_start = arg.attribute ("raw"); } - if (! id) - throw std::string ("ID must be specified. See 'timew help move'."); - // Load the data. // Note: There is no filter. Interval filter;