mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 14:23:09 +00:00
Remove some useless casts
I think the warnings from -Wuseless-cast are mostly platform-specific but I hope these are correct.
This commit is contained in:
parent
fbaa5d193d
commit
de9874e4de
3 changed files with 3 additions and 2 deletions
|
@ -179,6 +179,7 @@ maybe_t<int> builtin_set_color(parser_t &parser, io_streams_t &streams, wchar_t
|
|||
outputter_t outp;
|
||||
|
||||
if (bold && enter_bold_mode) {
|
||||
// These casts are needed to work with different curses implementations.
|
||||
writembs_nofail(outp, tparm(const_cast<char *>(enter_bold_mode)));
|
||||
}
|
||||
|
||||
|
|
|
@ -387,7 +387,7 @@ void event_print(io_streams_t &streams, maybe_t<event_type_t> type_filter) {
|
|||
|
||||
if (!last_type || *last_type != evt->desc.type) {
|
||||
if (last_type) streams.out.append(L"\n");
|
||||
last_type = static_cast<event_type_t>(evt->desc.type);
|
||||
last_type = evt->desc.type;
|
||||
streams.out.append_format(L"Event %ls\n", event_name_for_type(*last_type));
|
||||
}
|
||||
switch (evt->desc.type) {
|
||||
|
|
|
@ -84,7 +84,7 @@ bool wreaddir_resolving(DIR *dir, const wcstring &dir_path, wcstring &out_name,
|
|||
if (stat(fullpath.c_str(), &buf) != 0) {
|
||||
is_dir = false;
|
||||
} else {
|
||||
is_dir = static_cast<bool>(S_ISDIR(buf.st_mode));
|
||||
is_dir = S_ISDIR(buf.st_mode);
|
||||
}
|
||||
}
|
||||
*out_is_dir = is_dir;
|
||||
|
|
Loading…
Reference in a new issue