diff options
author | Robin Burchell <robin+git@viroteck.net> | 2019-05-17 12:59:37 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-17 15:49:37 +0200 |
commit | c478503581dbc89d1483398e760e5e59f4c07f79 (patch) | |
tree | c77abf2eeb31d5b9770eac8ee4d8a9e3e1d11994 /AK | |
parent | 729507f2bde0a9ec4324f51c68c5646d593605f8 (diff) | |
download | serenity-c478503581dbc89d1483398e760e5e59f4c07f79.zip |
ArgsParser: Remove prefix from constructor
It makes sense to keep this consistent between applications, and the
purpose of the string is not immediately obvious from an API perspective.
If we need to make it configurable later, that can come from a setter.
Diffstat (limited to 'AK')
-rw-r--r-- | AK/ArgsParser.cpp | 4 | ||||
-rw-r--r-- | AK/ArgsParser.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/AK/ArgsParser.cpp b/AK/ArgsParser.cpp index d98fffcea3..0e2b629775 100644 --- a/AK/ArgsParser.cpp +++ b/AK/ArgsParser.cpp @@ -28,8 +28,8 @@ ArgsParser::Arg::Arg(const String& name, const String& value_name, const String& : name(name), description(description), value_name(value_name), required(required) {} -ArgsParser::ArgsParser(const String& program_name, const String& prefix) - : m_program_name(program_name), m_prefix(prefix) +ArgsParser::ArgsParser(const String& program_name) + : m_program_name(program_name), m_prefix("-") {} ArgsParserResult ArgsParser::parse(const int argc, const char** argv) diff --git a/AK/ArgsParser.h b/AK/ArgsParser.h index 856e1ed976..8879b127bc 100644 --- a/AK/ArgsParser.h +++ b/AK/ArgsParser.h @@ -30,7 +30,7 @@ private: class ArgsParser { public: - ArgsParser(const String& program_name, const String& prefix); + ArgsParser(const String& program_name); ArgsParserResult parse(const int argc, const char** argv); |