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:
parent
bba16b3b37
commit
03dc815aee
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user