1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-06 23:02:42 +02:00

Pointer downcasts should use static_cast not reinterpret_cast

This commit is contained in:
Paul Licameli 2018-09-21 09:17:28 -04:00
parent bba16b3b37
commit 03dc815aee
3 changed files with 4 additions and 3 deletions

View File

@ -504,7 +504,7 @@ FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id,
}
mLogAxis = mAxis != 0;
mCloseButton = reinterpret_cast<wxButton*>(FindWindowById( wxID_CANCEL ));
mCloseButton = static_cast<wxButton*>(FindWindowById( wxID_CANCEL ));
mCloseButton->SetDefault();
mCloseButton->SetFocus();

View File

@ -481,7 +481,8 @@ void WaveTrack::DoSetMinimized(bool isMinimized){
// An awkward workaround for a function that lives 'in the wrong place'.
// We use magic numbers, 0 and 1, to tell it to zoom reset or zoom half-wave.
WaveTrackVRulerControls * pWtvc = reinterpret_cast<WaveTrackVRulerControls*>(pTvc.get());
WaveTrackVRulerControls * pWtvc =
static_cast<WaveTrackVRulerControls*>(pTvc.get());
if( pWtvc )
pWtvc->DoZoomPreset( isMinimized ? 1:0);
}

View File

@ -1714,7 +1714,7 @@ void LadspaEffect::OnSlider(wxCommandEvent & evt)
void LadspaEffect::OnTextCtrl(wxCommandEvent & evt)
{
LadspaEffect *that = reinterpret_cast<LadspaEffect *>(this);
LadspaEffect *that = this;
int p = evt.GetId() - ID_Texts;
float val;