forked from Imagelibrary/binutils-gdb
Use checked_static_cast in more places
I went through all the uses of dynamic_cast<> in gdb, looking for ones that could be replaced with checked_static_cast. This patch is the result. Regression tested on x86-64 Fedora 34.
This commit is contained in:
@@ -246,8 +246,7 @@ gdb_printing_disassembler::stream_from_gdb_disassemble_info (void *dis_info)
|
||||
{
|
||||
gdb_disassemble_info *di = (gdb_disassemble_info *) dis_info;
|
||||
gdb_printing_disassembler *dis
|
||||
= dynamic_cast<gdb_printing_disassembler *> (di);
|
||||
gdb_assert (dis != nullptr);
|
||||
= gdb::checked_static_cast<gdb_printing_disassembler *> (di);
|
||||
ui_file *stream = dis->stream ();
|
||||
gdb_assert (stream != nullptr);
|
||||
return stream;
|
||||
|
||||
Reference in New Issue
Block a user