mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 10:06:49 +08:00
[clang-tidy] mark single argument constructors explicit
Found with hicpp-explicit-conversions Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
aff6a74770
commit
925c7a998a
|
@ -40,7 +40,7 @@ struct option_spec_t {
|
|||
int num_allowed{0};
|
||||
int num_seen{0};
|
||||
|
||||
option_spec_t(wchar_t s) : short_flag(s) {}
|
||||
explicit option_spec_t(wchar_t s) : short_flag(s) {}
|
||||
};
|
||||
using option_spec_ref_t = std::unique_ptr<option_spec_t>;
|
||||
|
||||
|
|
|
@ -1299,7 +1299,7 @@ class universal_notifier_named_pipe_t : public universal_notifier_t {
|
|||
}
|
||||
|
||||
public:
|
||||
universal_notifier_named_pipe_t(const wchar_t *test_path)
|
||||
explicit universal_notifier_named_pipe_t(const wchar_t *test_path)
|
||||
: pipe_fd(-1),
|
||||
readback_time_usec(0),
|
||||
readback_amount(0),
|
||||
|
|
|
@ -58,7 +58,7 @@ struct main_thread_request_t {
|
|||
relaxed_atomic_bool_t done{false};
|
||||
void_function_t func;
|
||||
|
||||
main_thread_request_t(void_function_t &&f) : func(f) {}
|
||||
explicit main_thread_request_t(void_function_t &&f) : func(f) {}
|
||||
|
||||
// No moving OR copying
|
||||
// main_thread_requests are always stack allocated, and we deal in pointers to them
|
||||
|
|
|
@ -59,7 +59,7 @@ class scoped_buffer_t {
|
|||
screen_t &screen_;
|
||||
|
||||
public:
|
||||
scoped_buffer_t(screen_t &s) : screen_(s) { screen_.outp().beginBuffering(); }
|
||||
explicit scoped_buffer_t(screen_t &s) : screen_(s) { screen_.outp().beginBuffering(); }
|
||||
|
||||
~scoped_buffer_t() { screen_.outp().endBuffering(); }
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user