summaryrefslogtreecommitdiff
path: root/shell/source/tools
diff options
context:
space:
mode:
Diffstat (limited to 'shell/source/tools')
-rw-r--r--shell/source/tools/lngconvex/cmdline.cxx19
-rw-r--r--shell/source/tools/lngconvex/cmdline.hxx13
2 files changed, 9 insertions, 23 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)
diff --git a/shell/source/tools/lngconvex/cmdline.hxx b/shell/source/tools/lngconvex/cmdline.hxx
index bbf5afa5b0e5..507ace6174de 100644
--- a/shell/source/tools/lngconvex/cmdline.hxx
+++ b/shell/source/tools/lngconvex/cmdline.hxx
@@ -24,23 +24,18 @@
#include <sal/config.h>
-
/** Simple command line abstraction
*/
class CommandLine
{
public:
-
// Creation
-
CommandLine(size_t argc, char* argv[]);
-
// Query
-
/** Returns an argument by name. If there are
duplicate argument names in the command line,
the first one wins.
@@ -59,18 +54,16 @@ public:
*/
std::string get_arg(const std::string& ArgumentName) const;
-
private:
-
/** Returns whether a given argument is an argument name
*/
static bool is_arg_name(const std::string& Argument);
private:
- size_t m_argc;
- char** m_argv;
+ size_t m_argc;
+ char** m_argv;
-// prevent copy and assignment
+ // prevent copy and assignment
private:
CommandLine(const CommandLine&) = delete;
CommandLine& operator=(const CommandLine&) = delete;