mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
[clang-tidy] use dynamic_cast for unrelated types
Found with cppcoreguidelines-pro-type-static-cast-downcast Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
aae9ebfbd4
commit
1f01423f46
1 changed files with 1 additions and 1 deletions
|
@ -443,7 +443,7 @@ static bool handle_builtin_output(parser_t &parser, const std::shared_ptr<job_t>
|
|||
// need for a similar check for stderr.
|
||||
bool stdout_done = false;
|
||||
if (stdout_io && stdout_io->io_mode == io_mode_t::bufferfill) {
|
||||
auto stdout_buffer = static_cast<const io_bufferfill_t *>(stdout_io.get())->buffer();
|
||||
auto stdout_buffer = dynamic_cast<const io_bufferfill_t *>(stdout_io.get())->buffer();
|
||||
stdout_buffer->append_from_stream(stdout_stream);
|
||||
stdout_done = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue