mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-07 15:22:34 +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;
|
mLogAxis = mAxis != 0;
|
||||||
|
|
||||||
mCloseButton = reinterpret_cast<wxButton*>(FindWindowById( wxID_CANCEL ));
|
mCloseButton = static_cast<wxButton*>(FindWindowById( wxID_CANCEL ));
|
||||||
mCloseButton->SetDefault();
|
mCloseButton->SetDefault();
|
||||||
mCloseButton->SetFocus();
|
mCloseButton->SetFocus();
|
||||||
|
|
||||||
|
@ -481,7 +481,8 @@ void WaveTrack::DoSetMinimized(bool isMinimized){
|
|||||||
|
|
||||||
// An awkward workaround for a function that lives 'in the wrong place'.
|
// 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.
|
// 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 )
|
if( pWtvc )
|
||||||
pWtvc->DoZoomPreset( isMinimized ? 1:0);
|
pWtvc->DoZoomPreset( isMinimized ? 1:0);
|
||||||
}
|
}
|
||||||
|
@ -1714,7 +1714,7 @@ void LadspaEffect::OnSlider(wxCommandEvent & evt)
|
|||||||
|
|
||||||
void LadspaEffect::OnTextCtrl(wxCommandEvent & evt)
|
void LadspaEffect::OnTextCtrl(wxCommandEvent & evt)
|
||||||
{
|
{
|
||||||
LadspaEffect *that = reinterpret_cast<LadspaEffect *>(this);
|
LadspaEffect *that = this;
|
||||||
int p = evt.GetId() - ID_Texts;
|
int p = evt.GetId() - ID_Texts;
|
||||||
|
|
||||||
float val;
|
float val;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user