Skip to content

Commit

Permalink
command_line/arguments: Clean up the operator organisation for argume…
Browse files Browse the repository at this point in the history
…nts_t slightly
  • Loading branch information
dragonmux committed Jan 9, 2024
1 parent dc466bd commit 935e55f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions impl/command_line/arguments.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,8 @@ namespace substrate::commandLine
arguments_t::arguments_t(const arguments_t &arguments) noexcept = default;
arguments_t::arguments_t(arguments_t &&arguments) noexcept = default;
arguments_t::~arguments_t() noexcept = default;
arguments_t &arguments_t::operator =(const arguments_t &arguments) noexcept = default;
arguments_t &arguments_t::operator =(arguments_t &&arguments) noexcept = default;
size_t arguments_t::count() const noexcept
{ return _arguments.size(); }
size_t arguments_t::countMatching(const std::string_view &option) const noexcept
Expand All @@ -487,10 +489,6 @@ namespace substrate::commandLine
arguments_t::iterator_t arguments_t::find(const std::string_view &option) const noexcept
{ return _arguments.find(option); }

arguments_t &arguments_t::operator =(const arguments_t &arguments) noexcept = default;

arguments_t &arguments_t::operator =(arguments_t &&arguments) noexcept = default;

// NOLINTNEXTLINE(readability-convert-member-functions-to-static)
std::vector<const item_t *> arguments_t::findAll(const std::string_view &option) const noexcept
{
Expand Down
2 changes: 1 addition & 1 deletion substrate/command_line/arguments
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace substrate::commandLine
using storage_t = std::multiset<item_t, std::less<void>>;
using iterator_t = typename storage_t::const_iterator;

storage_t _arguments;
storage_t _arguments{};

[[nodiscard]] std::optional<bool> parseArgument(internal::tokeniser_t &lexer, const options_t &options,
const optionsVisited_t &globalOptions, optionsVisited_t &optionsVisited) noexcept;
Expand Down

0 comments on commit 935e55f

Please sign in to comment.