[lldb/DWARF] Replace C style casts with static_cast<> (NFC)

Using static_cast instead of C style casts better conveys the code's
intent, is a tad more safe and stands out more.
This commit is contained in:
Jonas Devlieghere 2020-03-05 21:23:08 -08:00
parent 3c88489a06
commit 226d52b1fa
3 changed files with 4 additions and 4 deletions

View File

@ -3638,9 +3638,9 @@ bool DWARFASTParserClang::CopyUniqueClassMethodTypes(
}
DWARFASTParserClang *src_dwarf_ast_parser =
(DWARFASTParserClang *)SymbolFileDWARF::GetDWARFParser(*src_die.GetCU());
static_cast<DWARFASTParserClang *>(SymbolFileDWARF::GetDWARFParser(*src_die.GetCU()));
DWARFASTParserClang *dst_dwarf_ast_parser =
(DWARFASTParserClang *)SymbolFileDWARF::GetDWARFParser(*dst_die.GetCU());
static_cast<DWARFASTParserClang *>(SymbolFileDWARF::GetDWARFParser(*dst_die.GetCU()));
// Now do the work of linking the DeclContexts and Types.
if (fast_path) {

View File

@ -3867,7 +3867,7 @@ SymbolFileDWARFDebugMap *SymbolFileDWARF::GetDebugMapSymfile() {
lldb::ModuleSP module_sp(m_debug_map_module_wp.lock());
if (module_sp) {
m_debug_map_symfile =
(SymbolFileDWARFDebugMap *)module_sp->GetSymbolFile();
static_cast<SymbolFileDWARFDebugMap *>(module_sp->GetSymbolFile());
}
}
return m_debug_map_symfile;

View File

@ -529,7 +529,7 @@ SymbolFileDWARF *
SymbolFileDWARFDebugMap::GetSymbolFileAsSymbolFileDWARF(SymbolFile *sym_file) {
if (sym_file &&
sym_file->GetPluginName() == SymbolFileDWARF::GetPluginNameStatic())
return (SymbolFileDWARF *)sym_file;
return static_cast<SymbolFileDWARF *>(sym_file);
return nullptr;
}