aboutsummaryrefslogtreecommitdiff
path: root/src/argument_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/argument_parser.cpp')
-rw-r--r--src/argument_parser.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/argument_parser.cpp b/src/argument_parser.cpp
index 94c6a4a..fd18bc7 100644
--- a/src/argument_parser.cpp
+++ b/src/argument_parser.cpp
@@ -19,9 +19,9 @@ void optarg_error(char arg, const std::string_view &error) noexcept
/**
* Returns the current optarg as a string view.
*/
-std::string_view get_str_optarg() noexcept
+auto get_str_optarg() noexcept -> std::string_view
{
- return std::string_view(optarg);
+ return {optarg};
}
/**
@@ -30,7 +30,7 @@ std::string_view get_str_optarg() noexcept
* @param arg The current command-line argument character
* @param check_zero Whether or not to make sure that the result is not zero
*/
-uint32_t get_uint_optarg(char arg, bool check_zero = false) noexcept
+auto get_uint_optarg(char arg, bool check_zero = false) noexcept -> uint32_t
{
auto conversion_result = str_to_uint(get_str_optarg());
@@ -49,10 +49,10 @@ ArgumentParser::ArgumentParser(
{
}
-ParsedArguments ArgumentParser::parse(
+auto ArgumentParser::parse(
const std::vector<option> &options, const std::string_view &short_options,
const int &argc,
- char *const *argv) noexcept // NOLINT(cppcoreguidelines-avoid-c-arrays,
+ char *const *argv) noexcept -> ParsedArguments // NOLINT(cppcoreguidelines-avoid-c-arrays,
// modernize-avoid-c-arrays)
{
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)