mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 14:43:41 +08:00
io.h: Add missing override
Found with clang's -Winconsistent-missing-destructor-override Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
586ac3dfa7
commit
69d0bb7c0d
@ -412,7 +412,7 @@ std::string wcs2string(const wcstring &input) {
|
||||
|
||||
for (auto wc : input) {
|
||||
if (wc == INTERNAL_SEPARATOR) {
|
||||
; // do nothing
|
||||
// do nothing
|
||||
} else if (wc >= ENCODE_DIRECT_BASE && wc < ENCODE_DIRECT_BASE + 256) {
|
||||
result.push_back(wc - ENCODE_DIRECT_BASE);
|
||||
} else if (MB_CUR_MAX == 1) { // single-byte locale (C/POSIX/ISO-8859)
|
||||
@ -450,7 +450,7 @@ static char *wcs2str_internal(const wchar_t *in, char *out) {
|
||||
|
||||
while (in[in_pos]) {
|
||||
if (in[in_pos] == INTERNAL_SEPARATOR) {
|
||||
; // do nothing
|
||||
// do nothing
|
||||
} else if (in[in_pos] >= ENCODE_DIRECT_BASE && in[in_pos] < ENCODE_DIRECT_BASE + 256) {
|
||||
out[out_pos++] = in[in_pos] - ENCODE_DIRECT_BASE;
|
||||
} else if (MB_CUR_MAX == 1) // single-byte locale (C/POSIX/ISO-8859)
|
||||
|
@ -208,12 +208,12 @@ extern const bool has_working_tty_timestamps;
|
||||
// `__attribute__((noreturn))` on the exit_without_destructors() function.
|
||||
// TODO: we use C++11 [[noreturn]] now, does that change things?
|
||||
#define FATAL_EXIT() \
|
||||
{ \
|
||||
do { \
|
||||
char exit_read_buff; \
|
||||
show_stackframe(L'E'); \
|
||||
ignore_result(read(0, &exit_read_buff, 1)); \
|
||||
exit_without_destructors(1); \
|
||||
}
|
||||
} while (0)
|
||||
|
||||
/// Exit the program at once after emitting an error message and stack trace if possible.
|
||||
/// We use our own private implementation of `assert()` for two reasons. First, some implementations
|
||||
|
@ -1483,7 +1483,7 @@ void completer_t::perform() {
|
||||
}) != std::end(prefix_cmds);
|
||||
if (!is_subcommand) break;
|
||||
tokens.erase(tokens.begin());
|
||||
};
|
||||
}
|
||||
}
|
||||
// Empty process (cursor is after one of ;, &, |, \n, &&, || modulo whitespace).
|
||||
if (tokens.empty()) {
|
||||
|
@ -506,7 +506,7 @@ class env_scoped_impl_t : public environment_t {
|
||||
|
||||
std::shared_ptr<environment_t> snapshot() const;
|
||||
|
||||
virtual ~env_scoped_impl_t() = default;
|
||||
~env_scoped_impl_t() override = default;
|
||||
|
||||
std::shared_ptr<const null_terminated_array_t<char>> export_array();
|
||||
|
||||
|
@ -221,7 +221,6 @@ int futimes(int fd, const struct timeval *times) {
|
||||
#if HAVE_GETTEXT
|
||||
char *fish_gettext(const char *msgid) {
|
||||
return gettext(msgid);
|
||||
;
|
||||
}
|
||||
|
||||
char *fish_bindtextdomain(const char *domainname, const char *dirname) {
|
||||
|
@ -91,7 +91,6 @@ static maybe_t<wcstring> sequence_name(wchar_t wc) {
|
||||
}
|
||||
}
|
||||
return none();
|
||||
;
|
||||
}
|
||||
|
||||
/// Return true if the character must be escaped when used in the sequence of chars to be bound in
|
||||
|
@ -1202,7 +1202,7 @@ wcstring history_session_id(const environment_t &vars) {
|
||||
if (session_id.empty()) {
|
||||
result.clear();
|
||||
} else if (session_id == L"default") {
|
||||
; // using the default value
|
||||
// using the default value
|
||||
} else if (valid_var_name(session_id)) {
|
||||
result = session_id;
|
||||
} else {
|
||||
|
4
src/io.h
4
src/io.h
@ -219,7 +219,7 @@ class io_pipe_t : public io_data_t {
|
||||
io_pipe_t(int fd, bool is_input, autoclose_fd_t pipe_fd)
|
||||
: io_data_t(io_mode_t::pipe, fd), pipe_fd_(std::move(pipe_fd)), is_input_(is_input) {}
|
||||
|
||||
~io_pipe_t();
|
||||
~io_pipe_t() override;
|
||||
|
||||
int pipe_fd() const { return pipe_fd_.fd(); }
|
||||
};
|
||||
@ -246,7 +246,7 @@ class io_bufferfill_t : public io_data_t {
|
||||
write_fd_(std::move(write_fd)),
|
||||
buffer_(std::move(buffer)) {}
|
||||
|
||||
~io_bufferfill_t();
|
||||
~io_bufferfill_t() override;
|
||||
|
||||
std::shared_ptr<io_buffer_t> buffer() const { return buffer_; }
|
||||
|
||||
|
@ -857,7 +857,7 @@ bool parse_ll_t::top_node_handle_terminal_types(const parse_token_t &token) {
|
||||
} else if (stack_top.keyword == parse_keyword_end &&
|
||||
token.type == parse_token_type_terminate &&
|
||||
this->report_error_for_unclosed_block()) {
|
||||
; // handled by report_error_for_unclosed_block
|
||||
// handled by report_error_for_unclosed_block
|
||||
} else {
|
||||
const wcstring expected = stack_top.user_presentable_description();
|
||||
this->parse_error_unexpected_token(expected.c_str(), token);
|
||||
|
@ -420,7 +420,7 @@ class job_t {
|
||||
/// The job is OK to be externally visible, e.g. to the user via `jobs`
|
||||
bool is_visible() const {
|
||||
return !is_completed() && is_constructed() && !flags().disown_requested;
|
||||
};
|
||||
}
|
||||
bool skip_notification() const { return properties.skip_notification; }
|
||||
bool from_event_handler() const { return properties.from_event_handler; }
|
||||
|
||||
|
@ -2082,7 +2082,7 @@ void reader_data_t::super_highlight_me_plenty(int match_highlight_pos_adjust, bo
|
||||
const wcstring &cmd = el->text, &suggest = autosuggestion;
|
||||
if (can_autosuggest() && !suggest.empty() &&
|
||||
string_prefixes_string_case_insensitive(cmd, suggest)) {
|
||||
; // the autosuggestion is still reasonable, so do nothing
|
||||
// the autosuggestion is still reasonable, so do nothing
|
||||
} else {
|
||||
update_autosuggestion();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user