diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2020-01-07 12:13:03 +0100 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2020-01-07 13:03:56 +0100 |
| commit | 65fdb34219f33b2871a532a38814ac4ebea10abc (patch) | |
| tree | 5ddc3e81290641e13302734ec37030f3013ca77d /lldb/source/Target | |
| parent | 14cd4a5b32478f76b9fa58825b7c92ba0dd5bc2b (diff) | |
| download | bcm5719-llvm-65fdb34219f33b2871a532a38814ac4ebea10abc.tar.gz bcm5719-llvm-65fdb34219f33b2871a532a38814ac4ebea10abc.zip | |
[lldb][NFC] Use static_cast instead of reinterpret_cast where possible
Summary: There are a few places in LLDB where we do a `reinterpret_cast` for conversions that we could also do with `static_cast`. This patch moves all this code to `static_cast`.
Reviewers: shafik, JDevlieghere, labath
Reviewed By: labath
Subscribers: arphaman, usaxena95, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D72161
Diffstat (limited to 'lldb/source/Target')
| -rw-r--r-- | lldb/source/Target/Target.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 83dc3de3ce5..e35a10a3f6b 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -3978,14 +3978,14 @@ void TargetProperties::SetRequireHardwareBreakpoints(bool b) { void TargetProperties::Arg0ValueChangedCallback(void *target_property_ptr, OptionValue *) { TargetProperties *this_ = - reinterpret_cast<TargetProperties *>(target_property_ptr); + static_cast<TargetProperties *>(target_property_ptr); this_->m_launch_info.SetArg0(this_->GetArg0()); } void TargetProperties::RunArgsValueChangedCallback(void *target_property_ptr, OptionValue *) { TargetProperties *this_ = - reinterpret_cast<TargetProperties *>(target_property_ptr); + static_cast<TargetProperties *>(target_property_ptr); Args args; if (this_->GetRunArguments(args)) this_->m_launch_info.GetArguments() = args; @@ -3994,14 +3994,14 @@ void TargetProperties::RunArgsValueChangedCallback(void *target_property_ptr, void TargetProperties::EnvVarsValueChangedCallback(void *target_property_ptr, OptionValue *) { TargetProperties *this_ = - reinterpret_cast<TargetProperties *>(target_property_ptr); + static_cast<TargetProperties *>(target_property_ptr); this_->m_launch_info.GetEnvironment() = this_->GetEnvironment(); } void TargetProperties::InputPathValueChangedCallback(void *target_property_ptr, OptionValue *) { TargetProperties *this_ = - reinterpret_cast<TargetProperties *>(target_property_ptr); + static_cast<TargetProperties *>(target_property_ptr); this_->m_launch_info.AppendOpenFileAction( STDIN_FILENO, this_->GetStandardInputPath(), true, false); } @@ -4009,7 +4009,7 @@ void TargetProperties::InputPathValueChangedCallback(void *target_property_ptr, void TargetProperties::OutputPathValueChangedCallback(void *target_property_ptr, OptionValue *) { TargetProperties *this_ = - reinterpret_cast<TargetProperties *>(target_property_ptr); + static_cast<TargetProperties *>(target_property_ptr); this_->m_launch_info.AppendOpenFileAction( STDOUT_FILENO, this_->GetStandardOutputPath(), false, true); } @@ -4017,7 +4017,7 @@ void TargetProperties::OutputPathValueChangedCallback(void *target_property_ptr, void TargetProperties::ErrorPathValueChangedCallback(void *target_property_ptr, OptionValue *) { TargetProperties *this_ = - reinterpret_cast<TargetProperties *>(target_property_ptr); + static_cast<TargetProperties *>(target_property_ptr); this_->m_launch_info.AppendOpenFileAction( STDERR_FILENO, this_->GetStandardErrorPath(), false, true); } @@ -4025,7 +4025,7 @@ void TargetProperties::ErrorPathValueChangedCallback(void *target_property_ptr, void TargetProperties::DetachOnErrorValueChangedCallback( void *target_property_ptr, OptionValue *) { TargetProperties *this_ = - reinterpret_cast<TargetProperties *>(target_property_ptr); + static_cast<TargetProperties *>(target_property_ptr); if (this_->GetDetachOnError()) this_->m_launch_info.GetFlags().Set(lldb::eLaunchFlagDetachOnError); else @@ -4035,7 +4035,7 @@ void TargetProperties::DetachOnErrorValueChangedCallback( void TargetProperties::DisableASLRValueChangedCallback( void *target_property_ptr, OptionValue *) { TargetProperties *this_ = - reinterpret_cast<TargetProperties *>(target_property_ptr); + static_cast<TargetProperties *>(target_property_ptr); if (this_->GetDisableASLR()) this_->m_launch_info.GetFlags().Set(lldb::eLaunchFlagDisableASLR); else @@ -4045,7 +4045,7 @@ void TargetProperties::DisableASLRValueChangedCallback( void TargetProperties::DisableSTDIOValueChangedCallback( void *target_property_ptr, OptionValue *) { TargetProperties *this_ = - reinterpret_cast<TargetProperties *>(target_property_ptr); + static_cast<TargetProperties *>(target_property_ptr); if (this_->GetDisableSTDIO()) this_->m_launch_info.GetFlags().Set(lldb::eLaunchFlagDisableSTDIO); else |

