mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-14 16:46:28 +01:00
Fewer C-style pointer casts of tracks; comments justify static_cast
This commit is contained in:
@@ -1036,7 +1036,9 @@ void MixerBoard::UpdateTrackClusters()
|
||||
#else
|
||||
mMixerTrackClusters[nClusterIndex]->mLeftTrack = (WaveTrack*)pLeftTrack;
|
||||
#endif
|
||||
mMixerTrackClusters[nClusterIndex]->mRightTrack = (WaveTrack*)pRightTrack;
|
||||
// Assume linked track is wave or null
|
||||
mMixerTrackClusters[nClusterIndex]->mRightTrack =
|
||||
static_cast<WaveTrack*>(pRightTrack);
|
||||
mMixerTrackClusters[nClusterIndex]->UpdateForStateChange();
|
||||
}
|
||||
else
|
||||
@@ -1051,7 +1053,9 @@ void MixerBoard::UpdateTrackClusters()
|
||||
wxSize clusterSize(kMixerTrackClusterWidth, nClusterHeight);
|
||||
pMixerTrackCluster =
|
||||
safenew MixerTrackCluster(mScrolledWindow, this, mProject,
|
||||
(WaveTrack*)pLeftTrack, (WaveTrack*)pRightTrack,
|
||||
static_cast<WaveTrack*>(pLeftTrack),
|
||||
// Assume linked track is wave or null
|
||||
static_cast<WaveTrack*>(pRightTrack),
|
||||
clusterPos, clusterSize);
|
||||
if (pMixerTrackCluster)
|
||||
mMixerTrackClusters.Add(pMixerTrackCluster);
|
||||
|
||||
Reference in New Issue
Block a user