summaryrefslogtreecommitdiff
path: root/shell/source/tools/lngconvex/cmdline.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'shell/source/tools/lngconvex/cmdline.cxx')
-rw-r--r--shell/source/tools/lngconvex/cmdline.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/shell/source/tools/lngconvex/cmdline.cxx b/shell/source/tools/lngconvex/cmdline.cxx
index ffbd228e582a..e3f24e1d8b5c 100644
--- a/shell/source/tools/lngconvex/cmdline.cxx
+++ b/shell/source/tools/lngconvex/cmdline.cxx
@@ -17,27 +17,22 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <stdexcept>
#include "cmdline.hxx"
-
/** Simple command line abstraction
*/
// Creation
-
-CommandLine::CommandLine(size_t argc, char* argv[]) :
- m_argc(argc),
- m_argv(argv)
+CommandLine::CommandLine(size_t argc, char* argv[])
+ : m_argc(argc)
+ , m_argv(argv)
{
}
-
// Query
-
/** Returns an argument by name. If there are
duplicate argument names in the command line,
the first one wins.
@@ -58,13 +53,13 @@ std::string CommandLine::get_arg(const std::string& ArgumentName) const
{
std::string arg_value;
size_t i;
- for ( i = 0; i < m_argc; i++)
+ for (i = 0; i < m_argc; i++)
{
std::string arg = m_argv[i];
- if (ArgumentName == arg && ((i+1) < m_argc) && !is_arg_name(m_argv[i+1]))
+ if (ArgumentName == arg && ((i + 1) < m_argc) && !is_arg_name(m_argv[i + 1]))
{
- arg_value = m_argv[i+1];
+ arg_value = m_argv[i + 1];
break;
}
}
@@ -75,10 +70,8 @@ std::string CommandLine::get_arg(const std::string& ArgumentName) const
return arg_value;
}
-
// Command
-
/** Returns whether a given argument is an argument name
*/
bool CommandLine::is_arg_name(const std::string& Argument)