command/Request: pass std::span to constructor
This commit is contained in:
parent
feb334756e
commit
a8452957fc
@ -421,7 +421,7 @@ command_process(Client &client, unsigned num, char *line) noexcept
|
||||
argv[n_args++] = a;
|
||||
}
|
||||
|
||||
Request args{argv, n_args};
|
||||
Request args{{argv, n_args}};
|
||||
|
||||
/* look up and invoke the command handler */
|
||||
|
||||
|
@ -34,8 +34,8 @@ class Request {
|
||||
std::span<const char *const> args;
|
||||
|
||||
public:
|
||||
explicit constexpr Request(const char *const*argv, std::size_t n)
|
||||
:args(argv, n) {}
|
||||
explicit constexpr Request(std::span<const char *const> _args) noexcept
|
||||
:args(_args) {}
|
||||
|
||||
constexpr bool empty() const noexcept {
|
||||
return args.empty();
|
||||
|
Loading…
Reference in New Issue
Block a user